Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- animação para o TextLabel


local function animateTextLabel()
	local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
	local startingText = textLabel.Text
	local currentValue = tonumber(numValue.Value)
	local targetValue = currentValue
	local decimal = string.match(tostring(currentValue), "%.(%d+)")
	if decimal then
		targetValue = math.floor(currentValue)
	end
	for i = 1, 10^(#tostring(targetValue)-1) do
		local newValue = currentValue - (currentValue % i)
		if newValue == targetValue then
			textLabel.Text = commaSeparateNumber(tostring(newValue)) .. (decimal and "." .. decimal or "")
			break
		else
			textLabel.Text = commaSeparateNumber(tostring(newValue)) .. (decimal and "." .. decimal or "")
			wait(0.05)
		end
	end
	wait(0.5)
	textLabel.Text = startingText
end

updateTextLabel() -- atualiza o TextLabel ao iniciar o jogo
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,VRecoil = {13,17}				--- Vertical Recoil
	,HRecoil = {6,10}				--- Horizontal Recoil
	,AimRecover = .825				---- Between 0 & 1
	
	,RecoilPunch = .15
	,VPunchBase = 3.5					--- Vertical Punch
	,HPunchBase = 2					--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless
	
	,AimRecoilReduction = 5 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0.2
	,MinRecoilPower = .5
	,MaxRecoilPower = 3
	,RecoilPowerStepAmount = .25
	
	,MinSpread = 0.56				--- Min bullet spread value | Studs
	,MaxSpread = 36					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 0.5
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0.25				--- Weapon Base Sway | Studs
	,MaxSway =	1.5					--- Max sway value based on player stamina | Studs
--- Points


   Points.Value = Points1:GetAsync(Plr.UserId) or Points.Value
	   Points1:SetAsync(Plr.UserId, Points.Value)
      Points.Changed:connect(function()
	   Points1:SetAsync(Plr.UserId, Points.Value)
   end)
end)

game.Players.PlayerAdded:Connect(function(plr)
	wait(.1)
	local Exp = plr.Data.Exp
	local Levels = plr.Data.Levels
	local ExpNeed = plr.Data.ExpNeed
	local Points = plr.Data.Points
	
	while wait() do
		if Exp.Value >= (100 * (Levels.Value + 1)) and Levels.Value <= 399 then
			Levels.Value = Levels.Value + 1
			Points.Value = Points.Value + 3
			Exp.Value = Exp.Value - ExpNeed.Value
			ExpNeed.Value = ExpNeed.Value + 100
			game.ReplicatedStorage.LevelSystem.LevelUpGui:FireClient(plr)
		end
	end
end)

game.Players.PlayerRemoving:connect(function(Player)
	Level1:SetAsync(Player.UserId, Player.Data.Levels.Value)
	Beli11:SetAsync(Player.UserId, Player.Data.Beli.Value)
	Exp1:SetAsync(Player.UserId, Player.Data.Exp.Value)
	ExpNeed1:SetAsync(Player.UserId, Player.Data.ExpNeed.Value)
	SwordP1:SetAsync(Player.UserId, Player.Data.SwordP.Value)
	DefenseP1:SetAsync(Player.UserId, Player.Data.DefenseP.Value)
	LuckP1:SetAsync(Player.UserId, Player.Data.LuckP.Value)
	SpecialP1:SetAsync(Player.UserId, Player.Data.SpecialP.Value)
	Sword1:SetAsync(Player.UserId, Player.Data.Sword.Value)
	Defense1:SetAsync(Player.UserId, Player.Data.Defense.Value)
	Luck1:SetAsync(Player.UserId, Player.Data.Luck.Value)
	Special1:SetAsync(Player.UserId, Player.Data.Special.Value)
	Points1:SetAsync(Player.UserId, Player.Data.Points.Value)
end)
--Main function


local function AttachAuraControl(source_part, eff_cont) --(source_part, effect_container)
	
	local AnimObj
	
	local function Start()
		AnimObj = {}
		AnimObj["LastUpdate"] = tick()
		
		AnimObj["Parts"] = {}
		
		for i = 1, 4 do
			local np = EFFECT_LIB.NewInvisiblePart()
			local fire = Instance.new("Fire")
			fire.SecondaryColor = Color3.new(0,0,0)
			fire.Parent = np
			
			AnimObj["Parts"][i] = np
	
			np.Parent = eff_cont
		end
	end
	
	local function Update()
		local loop = EFFECT_LIB.Loop(3)
		
		for i = 1, #AnimObj["Parts"] do
			AnimObj["Parts"][i].CFrame = source_part:GetRenderCFrame() * CFrame.Angles(0, math.rad(loop * 360 + (360 / #AnimObj["Parts"] * (i - 1))), 0) * CFrame.new(0, -3, -1.5) * CFrame.Angles(math.rad(-55), 0, 0) * CFrame.Angles(0, 0, 0)
		end
	end
	
	local function Stop()
		eff_cont:ClearAllChildren()
		AnimObj = nil
	end
	
	return {Start = Start, Update = Update, Stop = Stop}
end

return AttachAuraControl
-- for changing size


function UITween.size(object, size, time, delay, override, callback)
	
	local tweenSize = TweenInfo.new(
		time, --Time
		Enum.EasingStyle.Quint, --EasingStyle
		Enum.EasingDirection.Out, --EasingDirection
		0, --Repeat count
		false, --Reverses if true
		delay, --Delay time
		override,
		callback
	)
	
	local tween = tweenService:Create(object, tweenSize, {Size = size})
	tween:Play()

end

function UITween.rotate(object, rotation, time, delay, override, callback)

	local tweenSize = TweenInfo.new(
		time, --Time
		Enum.EasingStyle.Quint, --EasingStyle
		Enum.EasingDirection.Out, --EasingDirection
		0, --Repeat count
		false, --Reverses if true
		delay, --Delay time
		override,
		callback
	)

	local tween = tweenService:Create(object, tweenSize, {Rotation = rotation})
	tween:Play()

end
--!strict
--[[
    Returns true if A and B are 'similar' - i.e. any user of A would not need
    to recompute if it changed to B.
]]



local function isSimilar(a: any, b: any): boolean
    -- HACK: because tables are mutable data structures, don't make assumptions
    -- about similarity from equality for now (see issue #44)
    if typeof(a) == "table" then
        return false
    else
        return a == b
    end
end

return isSimilar
-- Re-export all top-level public types


export type ReactEmpty = ReactTypes.ReactEmpty
export type ReactFragment = ReactTypes.ReactFragment
export type ReactNodeList = ReactTypes.ReactNodeList
export type ReactProviderType<T> = ReactTypes.ReactProviderType<T>
export type ReactConsumer<T> = ReactTypes.ReactConsumer<T>
export type ReactProvider<T> = ReactTypes.ReactProvider<T>
export type ReactContext<T> = ReactTypes.ReactContext<T>
export type ReactPortal = ReactTypes.ReactPortal
export type RefObject = ReactTypes.RefObject
export type EventPriority = ReactTypes.EventPriority
export type ReactFundamentalComponentInstance<C, H> = ReactTypes.ReactFundamentalComponentInstance<C, H>
export type ReactFundamentalImpl<C, H> = ReactTypes.ReactFundamentalImpl<C, H>
export type ReactFundamentalComponent<C, H> = ReactTypes.ReactFundamentalComponent<C, H>
export type ReactScope = ReactTypes.ReactScope
export type ReactScopeQuery = ReactTypes.ReactScopeQuery
export type ReactScopeInstance = ReactTypes.ReactScopeInstance
---------------
--// Preset Variables
---------------


local Players = game.Players
local Lighting = game.Lighting
local ReplicatedStorage = game.ReplicatedStorage
local RemoteEvents = ReplicatedStorage.RemoteEvents
local STC = RemoteEvents.STC --// [STC] Send
local CTS = RemoteEvents.CTS --// [CTS] Receive
local RepAssets = ReplicatedStorage.RepAssets
local TweenService = game:GetService("TweenService")
local DataStoreService = game:GetService("DataStoreService")
local ServerStorage = game.ServerStorage
local StorageAssets = ServerStorage.StorageAssets
-- Handle event fire


local function toggleDoor(player, door)
	local motor = rightMotor
	if door == "left" then
		motor = leftMotor
	end
	-- Check distance to the character's Torso. If too far, don't do anything
	if player.Character and player.Character:FindFirstChild("Torso") then	
		local torso = player.Character:FindFirstChild("Torso")
		local toTorso = torso.Position - cabinet.Bottom.Position
		if toTorso.magnitude < clickDistance then
			if open then
				motor.DesiredAngle = 0
				open = false
			else
				motor.DesiredAngle = math.pi/2
				open = true
			end
		end
	end
end

for _, Part in pairs(cabinet:GetChildren()) do
	if Part:FindFirstChild("ROBLOXInteractionEvent") and (string.match(Part.Name, "Door") or string.match(Part.Name, "Handle") or string.match(Part.Name, "Padding")) then
		local event = Part:FindFirstChild("ROBLOXInteractionEvent")
		local door = "right"
		if string.match(Part.Name, "Left") then
			door = "left"
		end
		event.OnServerEvent:connect(function(player, arguments) toggleDoor(player, door) end)
	end
end
--!strict


local LuauPolyfill = script.Parent.Parent
local types = require(LuauPolyfill.types)
type Array<T> = types.Array<T>
type Object = types.Object
type callbackFn<T> = (element: T, index: number, array: Array<T>) -> ()
type callbackFnWithThisArg<T, U> = (thisArg: U, element: T, index: number, array: Array<T>) -> ()
--[[
	Stores shared state for dependency management functions.
]]



local Package = script.Parent.Parent
local Types = require(Package.Types)

type SharedState = {
	dependencySet: Types.Set<Types.Dependency<any>>?,

	initialisedStack: {Types.Set<Types.Dependency<any>>},
	initialisedStackSize: number
}

local sharedState: SharedState = {
	-- The set where used dependencies should be saved to.
	dependencySet = nil,

	-- A stack of sets where newly created dependencies should be stored.
	initialisedStack = {},
	initialisedStackSize = 0
}

return sharedState
--[[Read line 24 of the script. Just edit the word "D4Tide" to whatever the gun name you want. The gun must be in the lighting for this to work. I'd reccomend you add a regen.]]



local debounce = false

function getPlayer(humanoid) 
local players = game.Players:children() 
for i = 1, #players do 
if players[i].Character.Humanoid == humanoid then return players[i] end 
end 
return nil 
end 

function onTouch(part) 

local human = part.Parent:findFirstChild("Humanoid") 
if (human ~= nil) and debounce == false then

debounce = true

local player = getPlayer(human) 

if (player == nil) then return end 

game.Lighting.Uzi:clone().Parent = player.Backpack

wait(5)
debounce = false
end
end


script.Parent.Touched:connect(onTouch)
----------------------------------------------------------------------------------------------------
--------------------=[ OUTROS ]=--------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,FastReload = true					--- Automatically operates the bolt on reload if needed
	,SlideLock = true
	,MoveBolt = false
	,BoltLock = false
	,CanBreachDoor = false
	,CanBreak = true					--- Weapon can jam?
	,JamChance = 1000					--- This old piece of brick doesn't work fine >;c
	,IncludeChamberedBullet = true		--- Include the chambered bullet on next reload
	,Chambered = true					--- Start with the gun chambered?
	,LauncherReady = false				--- Start with the GL ready?
	,CanCheckMag = true					--- You can check the magazine
	,ArcadeMode = false					--- You can see the bullets left in magazine
	,RainbowMode = false				--- Operation: Party Time xD
	,ModoTreino = false					--- Surrender enemies instead of killing them
	,GunSize = 4.5
	,GunFOVReduction = 5

	,BoltExtend = Vector3.new(0, 0, 0.4)
	,SlideExtend = Vector3.new(0, 0, 0.4)
-- Based on https://developmentarc.gitbooks.io/react-indepth/content/life_cycle/update/using_should_component_update.html


function TableUtils.shallowEqual(left, right)
	if left == right then
		return true
	end
	if type(left) ~= "table" or type(right) ~= "table" then
		return false
	end
	local leftKeys = TableUtils.keys(left)
	local rightKeys = TableUtils.keys(right)
	if #leftKeys ~= #rightKeys then
		return false
	end
	return TableUtils.all(
		left,
		function(value, key)
			return value == right[key]
		end
	)
end

function TableUtils.serialize(input, serializer)
	serializer = serializer or function(value)
			return tostring(value)
		end
	assert(type(input) == "table")
	assert(type(serializer) == "function")
	return "{" ..
		table.concat(
			TableUtils.map(
				input,
				function(element, i)
					return tostring(i) .. "=" .. serializer(element)
				end
			),
			","
		) ..
			"}"
end

function TableUtils.append(...)
	local result = {}
	for i = 1, select("#", ...) do
		local x = select(i, ...)
		if type(x) == "table" then
			for _, y in ipairs(x) do
				table.insert(result, y)
			end
		else
			table.insert(result, x)
		end
	end

	return result
end

function TableUtils.sort(input, comparator)
	assert(tea.table(input), input)

	local FunctionUtils = require(script.Parent.FunctionUtils)
	assert(comparator == nil or FunctionUtils.isCallable(comparator), "comparator must be callable or nil")

	comparator = comparator or function(a, b)
			return a < b
		end

	table.sort(
		input,
		function(a, b)
			local result = comparator(a, b)

			if type(result) ~= "boolean" and result ~= nil then
				error("sort comparator must return a boolean or nil")
			end

			return result
		end
	)

	return input
end

return TableUtils
--// Handling Settings		


	Firerate = 67 / 720; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 2; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
-- (Hat Giver Script - Loaded.)



debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "Werewolf"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(2, 3, 3) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentForward = Vector3.new(-0, -0, -1)
		h.AttachmentPos = Vector3.new(-0, 0.45, -0.1)
		h.AttachmentRight = Vector3.new(1, 0, 0)
		h.AttachmentUp = Vector3.new(0, 1, 0)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
--[[
	Stores Luau type definitions shared across scripts in Fusion.
]]



export type Set<T> = {[T]: any}

export type State<T> = {get: (State<T>) -> T}
export type StateOrValue<T> = State<T> | T

export type Symbol = {
	type: string,
	name: string,
	key: string?
}

export type Error = {
	raw: string,
	message: string,
	trace: string
}

export type Dependency<T> = State<T> & {
	dependentSet: Set<Dependent<any>>
}

export type Dependent<T> = State<T> & {
	update: (Dependent<T>) -> boolean,
	dependencySet: Set<Dependency<any>>
}

export type Animatable =
	number |
	CFrame |
	Color3 |
	ColorSequenceKeypoint |
	DateTime |
	NumberRange |
	NumberSequenceKeypoint |
	PhysicalProperties |
	Ray |
	Rect |
	Region3 |
	Region3int16 |
	UDim |
	UDim2 |
	Vector2 |
	Vector2int16 |
	Vector3 |
	Vector3int16

return nil
--[=[
	@class Input

	The Input package provides access to various user input classes.

	- [PreferredInput](/api/PreferredInput)
	- [Mouse](/api/Mouse)
	- [Keyboard](/api/Keyboard)
	- [Touch](/api/Touch)
	- [Gamepad](/api/Gamepad)

	Reference the desired input modules via the Input package to get started:

	```lua
	local PreferredInput = require(Packages.Input).PreferredInput
	local Mouse = require(Packages.Input).Mouse
	local Keyboard = require(Packages.Input).Keyboard
	local Touch = require(Packages.Input).Touch
	local Gamepad = require(Packages.Input).Gamepad
	```
]=]



return {
	PreferredInput = require(script.PreferredInput),
	Mouse = require(script.Mouse),
	Keyboard = require(script.Keyboard),
	Touch = require(script.Touch),
	Gamepad = require(script.Gamepad),
}
--// Aim|Zoom|Sensitivity Customization


	ZoomSpeed = 0.23; -- The lower the number the slower and smoother the tween
	AimZoom = 45; -- Default zoom
	AimSpeed = 0.23;
	UnaimSpeed = 0.23;
	CycleAimZoom = 30; -- Cycled zoom
	MouseSensitivity = 0.5; -- Number between 0.1 and 1
	SensitivityIncrement = 0.05; -- No touchy
--			setAnimationSpeed(animSpeed)


		end
	end
end

function rollAnimation(animName)
	local roll = math.random(1, animTable[animName].totalWeight) 
	local origRoll = roll
	local idx = 1
	while (roll > animTable[animName][idx].weight) do
		roll = roll - animTable[animName][idx].weight
		idx = idx + 1
	end
	return idx
end

local function switchToAnim(anim, animName, transitionTime, humanoid, priority, speed)
	-- switch animation		
	if (anim ~= currentAnimInstance) then
		
		if (currentAnimTrack ~= nil) then
			currentAnimTrack:Stop(transitionTime)
			currentAnimTrack:Destroy()
		end
--[[
	configure(config: table): nil
	Overrides default configuration options.
	This function can only be called from a server-side Script.
	The possible options are:

	-- Boolean flag to toggle the Dev Module on/off
	enabled = true,

	-- Table of images to include as art assets
	assets = defaultArtAssets,

	-- Maximum number of artwork that can be placed by each player
	quotaPerPlayer = 2,

	-- Number of rows in the canvas grid
	rowsPerCanvas = 2,

	-- Number of columns in the canvas grid
	colsPerCanvas = 5,

	-- Number of items to skip when paging left and right
	itemsPerPage = 3,

	-- Proximity prompt configurations
	promptKeyCode = Enum.KeyCode.E,
	promptRequiresLineOfSight = true,
	promptMaxActivationDistance = 10,
	promptExclusivity = Enum.ProximityPromptExclusivity.OnePerButton,
	promptImage = "rbxassetid://8076723774",

	-- Image for the left arrow (previous page)
	leftArrowPageImage = "rbxassetid://6998633654",

	-- Image for the left arrow (previous item)
	leftArrowItemImage = "rbxassetid://8072765021",

	-- Image for the right arrow (next page)
	rightArrowPageImage = "rbxassetid://6998635824",

	-- Image for the right arrow (next item)
	rightArrowItemImage = "rbxassetid://8072764852",

	-- Padding for canvas
	canvasPaddingLeft = UDim.new(0, 8),
	canvasPaddingRight = UDim.new(0, 8),
	canvasPaddingTop = UDim.new(0, 8),
	canvasPaddingBottom = UDim.new(0, 8),

	-- Whether page hotkeys are used. If true, nextPageKey and prevPageKey are used to cycle between pages
	usePageHotkeys = true,

	-- Key used to cycle to the next page of art items
	nextPageKey = Enum.KeyCode.E,

	-- Key used to cycle to the next art item
	nextItemKey = Enum.KeyCode.Right,

	-- Key used to cycle to the previous page of art items
	prevPageKey = Enum.KeyCode.Q,

	-- Key used to cycle to the previous art item
	prevItemKey = Enum.KeyCode.Left,
]]


SurfaceArt.configure({
	rowsPerCanvas = 2,
	colsPerCanvas = 5,
	assets = {
		BloxyAward = {
			name = "Bloxy Award",
			assetId = "rbxassetid://7322500962",
		},
		RobloxStudioBlue = {
			name = "Roblox Studio in Blue",
			assetId = "rbxassetid://7322508294",
		},
	},
	quotaPerPlayer = 3,
})
--[[
Replaces the colors of a model.
--]]


local function ReplaceColors(Map,OldColor,NewColor)
	for _,Part in pairs(Map:GetDescendants()) do
		if Part:IsA("BasePart") and Part.BrickColor == OldColor then
			Part.BrickColor = NewColor
			Part.Material = "SmoothPlastic"
		end
	end
end
-- Selection


local function scrollToBottom()
	local ScrollingFrame = Buttons:FindFirstAncestorOfClass("ScrollingFrame")
	if ScrollingFrame then
		local bottom = Vector2.new(ScrollingFrame.CanvasPosition, ScrollingFrame.AbsoluteCanvasSize.Y)
		ScrollingFrame.CanvasPosition = bottom
	end
end

Cancel.SelectionGained:Connect(scrollToBottom)
Submit.SelectionGained:Connect(scrollToBottom)
-- The subset of a Promise that React APIs rely on. This resolves a value.
-- This doesn't require a return value neither from the handler nor the
-- then function.
-- FIXME: workaround for Luau recursive type used with different parameters. delete this copy once that issue is resolved.


export type _Thenable<R> = {
	andThen: <U>(self: _Thenable<R>, onFulfill: (R) -> ...U, onReject: (error: any) -> ...U) -> (),
}

export type Thenable<R> = {
	andThen: <U>(
		self: Thenable<R>,
		onFulfill: (R) -> ...(_Thenable<U> | U),
		onReject: (error: any) -> ...(_Thenable<U> | U)
		-- FIXME Luau: need union type packs to parse () | Thenable<U>: CLI-49836
	) -> nil | _Thenable<U>,
}

return exports
------------------------------------------------------------------------
-- string to number converter (was luaO_str2d from lobject.c)
-- * returns the number, nil if fails (originally returns a boolean)
-- * conversion function originally lua_str2number(s,p), a macro which
--   maps to the strtod() function by default (from luaconf.h)
------------------------------------------------------------------------


function luaX:str2d(s)
  local result = tonumber(s)
  if result then return result end
  -- conversion failed
  if string.lower(string.sub(s, 1, 2)) == "0x" then  -- maybe an hexadecimal constant?
    result = tonumber(s, 16)
    if result then return result end  -- most common case
    -- Was: invalid trailing characters?
    -- In C, this function then skips over trailing spaces.
    -- true is returned if nothing else is found except for spaces.
    -- If there is still something else, then it returns a false.
    -- All this is not necessary using Lua's tonumber.
  end
  return nil
end
--https://en.wikipedia.org/wiki/For_loop



local currentPlaying
localAnimationPlayer = game:GetService("ReplicatedStorage").AnimationManager.LocalScriptAPI

for i,v in pairs(script.Parent:GetChildren()) do
	if v:IsA("TextButton") and v.Name ~= "Cancel" then
		v.AnimRef.Value = game:GetService("ReplicatedStorage").FemaleAnimations:FindFirstChild(v.Name)
	end
end

function FindAnimRef(parent)
	local childs = parent:GetChildren()
	for i, v in pairs(childs) do
		if v:IsA("ObjectValue") then
			return v.Value
		end
	end
end

for i, v in pairs(script.Parent:GetChildren()) do
	if v:IsA("TextButton") then
		v.MouseButton1Click:Connect(function()
			local char = game.Players.LocalPlayer.Character
			if char.Humanoid.Health > 1 then
				if currentPlaying == v then
					localAnimationPlayer.StopAnimationOnHumanoid:FireServer(char.Humanoid)
					currentPlaying = nil
				else
					local animation = FindAnimRef(v)
					if animation then
						localAnimationPlayer.PlayAnimation:InvokeServer(animation, game.Players.LocalPlayer.Character)
						currentPlaying = v
					end
				end
			end
		end)
	end
end
--[[
	Yield until the promise is completed.
	This matches the execution model of normal Roblox functions.
]]


function Promise.prototype:await()
	self._unhandledRejection = false

	if self._status == Promise.Status.Started then
		local result
		local resultLength
		local bindable = Instance.new("BindableEvent")

		self:andThen(
			function(...)
				resultLength, result = pack(...)
				bindable:Fire(true)
			end,
			function(...)
				resultLength, result = pack(...)
				bindable:Fire(false)
			end
		)

		local ok = bindable.Event:Wait()
		bindable:Destroy()

		return ok, unpack(result, 1, resultLength)
	elseif self._status == Promise.Status.Resolved then
		return true, unpack(self._values, 1, self._valuesLength)
	elseif self._status == Promise.Status.Rejected then
		return false, unpack(self._values, 1, self._valuesLength)
	end
end
-- --Remove the double brackets around this part to rename and unanchor everything --



for i = 1, #c do
	if c[i].className == "Part" then
		c[i].Anchored = false;
		if c[i].Name ~= "Handle" then
			c[i].Name = "H" .. a;
			a = a + 1;
		end
	end
end



if hand == nil then
	print("Handle not Found! Try again!")
	script.Disabled = true;
	script:Remove()
end

local s = script.WeldScript:Clone();
s.Disabled = false;

for i = 1, #c do
	if c[i].className == "Part" and c[i] ~= hand and c[i].Anchored == false then
		table.insert(parts, c[i])
	end
end

for i = 1, #parts do
	local c0 = hand.CFrame:inverse()
	local c1 = parts[i].CFrame:inverse()
	local val1 = Instance.new("CFrameValue")
	val1.Name = parts[i].Name .. "C0"
	val1.Value = c0
	val1.Parent = s
	local val2 = Instance.new("CFrameValue")
	val2.Name = parts[i].Name .. "C1"
	val2.Value = c1
	val2.Parent = s
	local w = Instance.new("Weld")
	w.Parent = hand
	w.Part0 = hand
	w.Part1 = parts[i]
	w.C0 = c0
	w.C1 = c1
end

s.Parent = tool

script:Remove()