Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- Dependencies


local Log = require(ReplicatedStorage.Libraries.Log)
local ClientCharacterHandler = require(ReplicatedStorage.Core.ClientCharacterHandler)
local ClientGameHandler = require(ReplicatedStorage.Core.ClientGameHandler)
local Roact = require(ReplicatedStorage.Packages.Roact)
local App = require(ReplicatedStorage.RoactComponents.App)
local Cmdr = require(ReplicatedStorage.CmdrClient)
local PingHandler = require(ReplicatedStorage.Libraries.PingHandler)
--!strict


local Sift = script.Parent.Parent

local Util = require(Sift.Util)
local _T = require(Sift.Types)

local function compare(a, b)
	if type(a) ~= "table" or type(b) ~= "table" then
		return a == b
	end

	for key, value in pairs(a) do
		if b[key] ~= value then
			return false
		end
	end

	for key, value in pairs(b) do
		if a[key] ~= value then
			return false
		end
	end

	return true
end
-- When the weapon is deactivated


function weaponTemplate:OnDeactivate()
	
end

function weaponTemplate:OnStartFiring()
end

function weaponTemplate:OnStopFiring()
	
	-- Is Server
	if not self.isClient then
		self.rewardTimer:Stop()
	end
end

function weaponTemplate:OnFire()
	
	

	if not self.isClient then
		self.gun.Barrel.Shoot:Play()
	end

		
	-- Is Client
	if self.isClient then
		local newProjectile = self.projectileModel:Clone()
		local randomPoint = weaponTemplate.getUnitSpherePoint()
		local newBullet = bullet.new(newProjectile, self.ownerPlayer, 50, self.gun.firePart.Position, self.gun.firePart.CFrame.LookVector + randomPoint * self.coneSpread, 500, "Physics", false)
		newBullet.Name = newProjectile.Name
		replicateProjectile_Re:FireServer(newBullet)
	end
		

			
	if not self.isClient then
		-- Ensure they don't run multiple timers

		if not self.rewardTimer:IsRunning() and self.rewardTimer.runningTicks == 0 then
			spawn(function() self.rewardTimer:Start() end) 
		end
	end
end
--		body.FB.BrickColor = bool and BrickColor.new("Pearl") or BrickColor.new("Black")


		body.FB.Material = bool and "Neon" or "SmoothPlastic"
		body.FB.Light.Enabled = bool
		body.HG.Material = bool and "Neon" or "SmoothPlastic"
		body.HG.BrickColor = bool and BrickColor.new("White") or BrickColor.new("Really black")
		body.GH.Material = bool and "Neon" or "SmoothPlastic"
		body.GH.BrickColor = bool and BrickColor.new("Bright orange") or BrickColor.new("Bright orange")
		body.KK.Material = bool and "Neon" or "SmoothPlastic"
		body.KK.BrickColor = bool and BrickColor.new("Bright orange") or BrickColor.new("Bright orange")
		body.LeftIn.Material = bool and "Neon" or "SmoothPlastic"
		body.LeftIn.BrickColor = bool and BrickColor.new("White") or BrickColor.new("Really black")
		body.RightIn.Material = bool and "Neon" or "SmoothPlastic"
		body.RightIn.BrickColor = bool and BrickColor.new("White") or BrickColor.new("Really black")
		body.FB.BrickColor = bool and BrickColor.new("White") or BrickColor.new("Sand violet metallic")
--[[
	
	StreamableUtil.Compound(observers: {Observer}, handler: ({[child: string]: Instance}, maid: Maid) -> void): Maid
	
	Example:
	
		local streamable1 = Streamable.new(someModel, "SomeChild")
		local streamable2 = Streamable.new(anotherModel, "AnotherChild")
		
		StreamableUtil.Compound({streamable1, streamable2}, function(streamables, maid)
			local someChild = streamables[1].Instance
			local anotherChild = streamables[2].Instance
			maid:GiveTask(function()
				-- Cleanup
			end)
		end)
	
--]]




local Maid = require(script.Parent.Maid)


local StreamableUtil = {}


function StreamableUtil.Compound(streamables, handler)
	local compoundMaid = Maid.new()
	local observeAllMaid = Maid.new()
	local allAvailable = false
	local function Check()
		if (allAvailable) then return end
		for _,streamable in ipairs(streamables) do
			if (not streamable.Instance) then
				return
			end
		end
		allAvailable = true
		handler(streamables, observeAllMaid)
	end
	local function Cleanup()
		if (not allAvailable) then return end
		allAvailable = false
		observeAllMaid:DoCleaning()
	end
	for _,streamable in ipairs(streamables) do
		compoundMaid:GiveTask(streamable:Observe(function(_child, maid)
			Check()
			maid:GiveTask(function()
				Cleanup()
			end)
		end))
	end
	compoundMaid:GiveTask(Cleanup)
	return compoundMaid
end


return StreamableUtil
-- events



REMOTES.Booster.OnServerEvent:connect(function(player, action, item)
	local character	= player.Character
	if character then
		local equipped	= character.Equipped.Value
		
		if item == equipped then
			if action == "Init" then
				Init(player, item)
			elseif action == "Use" then
				if inits[player] then
					if inits[player].Item == item then
						local elapsed	= tick() - inits[player].Start
						local config	= require(item.Config)
						local dif		= math.abs(elapsed - config.UseTime)
						
						if dif <= 0.5 then
							local humanoid	= character.Humanoid
							if config.Boost == "Armor" then
								ServerScriptService.ArmorScript.Boost:Fire(character, config.Potency)
								REMOTES.Effect:FireAllClients("Booster", character, "Armor")
							elseif config.Boost == "Health" then
								humanoid.Health	= math.min(humanoid.Health + config.Potency, humanoid.MaxHealth)
								REMOTES.Effect:FireAllClients("Booster", character, "Health")
							end
							item.Stack.Value	= item.Stack.Value - 1
							if item.Stack.Value == 0 then
								item:Destroy()
							end
						end
					end
				end
			end
		end
	end
end)

Players.PlayerRemoving:connect(function(player)
	if inits[player] then
		inits[player]	= nil
	end
end)
--[=[
	@param optionB Option
	@return Option
	If both `self` and `optionB` have values _or_ both don't have a value,
	then this returns None. Otherwise, it returns the option that does have
	a value.
]=]


function Option:XOr(optB)
	local someOptA = self:IsSome()
	local someOptB = optB:IsSome()
	if someOptA == someOptB then
		return Option.None
	elseif someOptA then
		return self
	else
		return optB
	end
end
--[[
	Controller that sets different user interface views for the client. Listens to player state updates, creating and
	destructing views as necessary.
]]


local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Logger = require(ReplicatedStorage.Dependencies.GameUtils.Logger)

local UIViews = ReplicatedStorage.Source.UIViews

local views = {
	pregame = require(UIViews.PreGame),
	warmup = require(UIViews.Warmup),
	game = require(UIViews.Game),
	spectating = require(UIViews.Spectating),
	postGame = require(UIViews.PostGame)
}

local currentView

local UIController = {}
-- Ensures that SenseManager does nothing if accidentally required on client


if not RunService:IsServer() then
	return SenseManager
end

local octree = Octree.new()
local budgetRunner = BudgetRunner.new(FRAME_BUDGET)
local agentQueue = CircularQueue.new()
local agentIdToRootPart = {}
local enabled = true

local queryCount = 0
local queryDuration = 0
local lastMetricReportTime = tick()

function SenseManager.registerEvent(eventData)
	if enabled then
		return octree:registerEvent(eventData)
	else
		return nil
	end
end

function SenseManager.registerAgent(agentId, rootPart)
	if enabled then
		agentIdToRootPart[agentId] = rootPart
		agentQueue:push(agentId)
	end
end

function SenseManager.unregisterAgent(agentId)
	if enabled then
		agentIdToRootPart[agentId] = nil
		agentQueue:remove(agentId)
	end
end

function SenseManager.removeEventById(eventId)
	if enabled then
		octree:removeEventById(eventId)
	end
end

function SenseManager.queryRegion(center, volume)
	if enabled then
		local startTime = tick()
		local result = octree:queryRegion(center, volume)
		local endTime = tick()
		
		queryDuration = queryDuration + endTime - startTime
		queryCount = queryCount + 1
		
		return result
	else
		return {}
	end
end

function SenseManager.querySphere(center, radius)
	if enabled then
		local startTime = tick()
		local diameter = radius * 2
		local result = {}
		
		for _, event in ipairs(octree:queryRegion(center, Vector3.new(diameter, diameter, diameter))) do
			if (event.position - center).Magnitude < radius then
				table.insert(result, event)
			end
		end
		local endTime = tick()
		
		queryDuration = queryDuration + endTime - startTime
		queryCount = queryCount + 1
	
		return result
	else
		return {}
	end
end

function SenseManager.setEnabled(state)
	if state ~= enabled then
		if state then
			octree = Octree.new()
			agentQueue = CircularQueue.new()
			agentIdToRootPart = {}
		else
			octree:destroy()
			agentQueue = nil
			agentIdToRootPart = nil
		end
		
		enabled = state
	end
end

RunService.Heartbeat:Connect(function()
	local frameBudgetFull = false
	
	local startAgentId = agentQueue:next()
	local currAgentId = startAgentId
	if currAgentId then
		budgetRunner:tear()
		repeat
			local rootPart = agentIdToRootPart[currAgentId]
			if rootPart then
				frameBudgetFull = not budgetRunner:run(function()
					Blackboards.getAgentBlackboard(currAgentId).senseEvents = SenseManager.querySphere(rootPart.Position, SENSE_RADIUS)
				end)
			end
			currAgentId = agentQueue:next()
		until(frameBudgetFull or currAgentId == startAgentId)
	end
	
	local currTime = tick()
	if currTime >= lastMetricReportTime + METRIC_REPORT_RATE then
		SenseManagerStatEvent:FireAllClients(currTime - lastMetricReportTime, queryCount, queryDuration)
		queryDuration = 0
		queryCount = 0
		lastMetricReportTime = currTime
	end
end)

return SenseManager
-- Optimized CFrame interpolator module ~ by Stravant
-- Based off of code by Treyreynolds posted on the Roblox Developer Forum



local fromAxisAngle = CFrame.fromAxisAngle
local components = CFrame.new().components
local inverse = CFrame.new().inverse
local v3 = Vector3.new
local acos = math.acos
local sqrt = math.sqrt
local invroot2 = 1/math.sqrt(2)

return function(c0, c1, t) -- (CFrame from, CFrame to) -> (float theta, (float fraction -> CFrame between))
	-- The expanded matrix
	local _, _, _, xx, yx, zx, 
	               xy, yy, zy, 
	               xz, yz, zz = components(inverse(c0)*c1)
	
	-- The cos-theta of the axisAngles from 
	local cosTheta = (xx + yy + zz - 1)/2
	
	-- Rotation axis
	local rotationAxis = v3(yz-zy, zx-xz, xy-yx)
	
	-- The position to tween through
	local positionDelta = (c1.p - c0.p)
		
	-- Theta
	local theta;			
		
	-- Catch degenerate cases
	if cosTheta >= 0.999 then
			return c0 + positionDelta*t
	elseif cosTheta <= -0.999 then
		-- Case exactly opposite rotations, disambiguate
		theta = math.pi
		xx = (xx + 1) / 2
		yy = (yy + 1) / 2
		zz = (zz + 1) / 2
		if xx > yy and xx > zz then
			if xx < 0.001 then
				rotationAxis = v3(0, invroot2, invroot2)
			else
				local x = sqrt(xx)
				xy = (xy + yx) / 4
				xz = (xz + zx) / 4
				rotationAxis = v3(x, xy/x, xz/x)
			end
		elseif yy > zz then
			if yy < 0.001 then
				rotationAxis = v3(invroot2, 0, invroot2)
			else
				local y = sqrt(yy)
				xy = (xy + yx) / 4
				yz = (yz + zy) / 4
				rotationAxis = v3(xy/y, y, yz/y)
			end	
		else
			if zz < 0.001 then
				rotationAxis = v3(invroot2, invroot2, 0)
			else
				local z = sqrt(zz)
				xz = (xz + zx) / 4
				yz = (yz + zy) / 4
				rotationAxis = v3(xz/z, yz/z, z)
			end
		end
	else
		-- Normal case, get theta from cosTheta
		theta = acos(cosTheta)
	end
	
	return c0*fromAxisAngle(rotationAxis, theta*t) + positionDelta*t
end
-- Bind function to fire event


fireEvent.OnServerEvent:connect(function(player, target)
	if tool.Parent == player.Character then
		-- If tool has enough shots then fires. Otherwise reloads.
		if currentAmmo <= 0 then
			return reload()
		end
		if canFire then
			canFire = false
			currentAmmo = currentAmmo - 1
			fireSound:Play()
			createBullet(target)
			delay(attackCooldown, function()
				canFire = true
			end)
		end
	end
end)
-----------------------------------------------| Save Stats |------------------------------------------------------------




local DataStoreService = game:GetService("DataStoreService")
local myDataStore = DataStoreService:GetDataStore("myDataStore")


game.Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player

	local Time = Instance.new("IntValue")
	Time.Name = "Speed"
	Time.Parent = leaderstats

	local playerUserId = "Player"..player.UserId

	local data 

	local success, errormessage = pcall(function()
		data = myDataStore:GetAsync(playerUserId) 
	end)


	if success then
		Time.Value = data  
	end

	while wait(1) do
		player.leaderstats.Speed.Value = player.leaderstats.Speed.Value + 1 --Don't change it or it will make it go up twice
	end
end)

game.Players.PlayerRemoving:Connect(function(player)
	local playerUserId = "Player"..player.UserId

	local data = player.leaderstats.Speed.Value

	myDataStore:SetAsync(playerUserId, data)   

end)
-- Make a base cosmetic bullet object. This will be cloned every time we fire off a ray.


local CosmeticBullet = Instance.new("Part")
CosmeticBullet.Material = Enum.Material.Neon
CosmeticBullet.Color = Color3.fromRGB(0, 196, 255)
CosmeticBullet.CanCollide = false
CosmeticBullet.Anchored = true
CosmeticBullet.Size = Vector3.new(0.2, 0.2, 2.4)
--Redirects velocity


function MathUtils:GroundAccelerate(wishDir, wishSpeed, accel, velocity, dt)
    --Cap velocity
    local speed = velocity.Magnitude
    if speed > wishSpeed then
        velocity = velocity.unit * wishSpeed
    end

    local wishVel = wishDir * wishSpeed
    local pushDir = wishVel - velocity

    local pushLen = pushDir.magnitude

    local canPush = accel * dt * wishSpeed

    if canPush > pushLen then
        canPush = pushLen
    end
    if canPush < 0.00001 then
        return velocity
    end
    return velocity + (canPush * pushDir.Unit)
end

function MathUtils:Accelerate(wishDir, wishSpeed, accel, velocity, dt)
    local speed = velocity.magnitude

    local currentSpeed = velocity:Dot(wishDir)
    local addSpeed = wishSpeed - currentSpeed

    if addSpeed <= 0 then
        return velocity
    end

    local accelSpeed = accel * dt * wishSpeed
    if accelSpeed > addSpeed then
        accelSpeed = addSpeed
    end

    velocity = velocity + (accelSpeed * wishDir)

    --if we're already going over max speed, don't go any faster than that
    --Or you'll get strafe jumping!
    if speed > wishSpeed and velocity.magnitude > speed then
        velocity = velocity.unit * speed
    end
    return velocity
end

function MathUtils:CapVelocity(velocity, maxSpeed)
    local mag = velocity.magnitude
    mag = math.min(mag, maxSpeed)
    if mag > 0.01 then
        return velocity.Unit * mag
    end
    return Vector3.zero
end


function MathUtils:ClipVelocity(input, normal, overbounce)
    local backoff = input:Dot(normal)

    if backoff < 0 then
        backoff = backoff * overbounce
    else
        backoff = backoff / overbounce
    end

    local changex = normal.x * backoff
    local changey = normal.y * backoff
    local changez = normal.z * backoff

    return Vector3.new(input.x - changex, input.y - changey, input.z - changez)
end
--------------------------------------------------------------------------------



while true do
	while Humanoid.Health < Humanoid.MaxHealth do
		if Character:FindFirstChild("Regen") then
			local dt = task.wait(0.000001)
			local dh = dt*75/100*Humanoid.MaxHealth
			
			Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
		else
			local dt = wait(REGEN_STEP)
			local dh = dt*REGEN_RATE*Humanoid.MaxHealth
			
			Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
		end
	end
	Humanoid.HealthChanged:Wait()
end
--[=[
	@function equalsDeep
	@within Array

	@param ... ...{any} -- The arrays to compare.
	@return boolean -- Whether the arrays are equal.

	Compares two arrays for equality using deep comparison.

	```lua
	local array = { 1, 2, 3, { 4, 5 } }
	local other = { 1, 2, 3, { 4, 5 } }

	local value = EqualsDeep(array, other) -- true
	local value = EqualsDeep(array, other, { 1, 2, 3, { 4, 5 } }) -- true
	local value = EqualsDeep(array, other, { 1, 2, 3, { 4, 6 } }) -- false
	```
]=]


local function equalsDeep<T>(...: { T }): boolean
	if Util.equalObjects(...) then
		return true
	end

	local totalArgs = select("#", ...)
	local firstItem = select(1, ...)

	for i = 2, totalArgs do
		local item = select(i, ...)

		if not compareDeep(firstItem, item) then
			return false
		end
	end

	return true
end

return equalsDeep
--[[
	Based on the given [UserInputType], a cooresponding enum representing the
	current device is returned.

	```lua
	getCurrentDevice(Enum.UserInputType.KeyCode) -- "Computer"
	getCurrentDevice(Enum.UserInputType.Touch) -- "Mobile"
	getCurrentDevice(Enum.UserInputType.Gamepad1) -- "Gamepad"
	```

	@within Modules
]]



local function getCurrentDevice(inputType: Enum.UserInputType)
	for group, patterns in pairs(constants.DeviceInputTypePatterns) do
		for _, pattern in ipairs(patterns) do
			if inputType.Name:match(pattern) then
				return enums.Device[group]
			end
		end
	end

	return enums.Device.Unknown
end

return getCurrentDevice
--- FUNCTIONS ---



uis.InputBegan:Connect(function(Input, Typing)
	if not Typing and Input.UserInputType.Name == "Keyboard" then
		if Input.KeyCode.Name == "Space" then

			if player.Character:GetAttribute("State") == "Sitting" then
				player.Character.PrimaryPart.Anchored = false
				player.Character:SetAttribute("State", nil)
			end
			
		end
	end
end)
--[[
	INPUT: Object part
	OUTPUT: Player player, Object character
--]]


local Players = game:GetService'Players'

return function(part)
	if not part then return nil end
	
	local player
	local current = part
	while true do
		player = Players:GetPlayerFromCharacter(current)
		if not player then
			current = current.Parent
			if not current or current == game then
				break
			end
		else
			break
		end
	end
	
	return player, player and player.Character
end
--// YOU ARE A SKID WHOEVER WROTE THIS



local lastplayed = 0

while wait(math.random(400,700)) do
	local Ran = Random.new(tick() + math.random(math.random(1, 50), math.random(51, 100)))
	local i = Ran:NextInteger(1, 11)

	local ann = "Announcement"..i

	if i ~= lastplayed then
		script.Parent[ann]:Play()
		lastplayed = i
	end
end
--Music interface


function music_class:Update(id, volume, reset)
	--Update volume
	volume = tonumber(volume)
	if volume ~= nil and volume ~= self.music_volume then
		self.music.Volume = volume
		self.music_volume = volume
	end

	--Update id
	id = tostring(id)
	if id ~= self.music_id or reset then
		self.music:Stop()
		self.music.SoundId = "rbxassetid://"..id
		self.music_id = id
		self.music:Play()
	end
end

return music_class
--[[
	Called when the goal state changes value; this will initiate a new tween.
	Returns false as the current value doesn't change right away.
]]


function class:update(): boolean
	local goalValue = self._goalState:get(false)

	-- if the goal hasn't changed, then this is a TweenInfo change.
	-- in that case, if we're not currently animating, we can skip everything
	if goalValue == self._nextValue and not self._currentlyAnimating then
		return false
	end

	local tweenInfo = self._tweenInfo
	if self._tweenInfoIsState then
		tweenInfo = tweenInfo:get()
	end

	-- if we receive a bad TweenInfo, then error and stop the update
	if typeof(tweenInfo) ~= "TweenInfo" then
		logErrorNonFatal("mistypedTweenInfo", nil, typeof(tweenInfo))
		return false
	end

	self._prevValue = self._currentValue
	self._nextValue = goalValue

	self._currentTweenStartTime = os.clock()
	self._currentTweenInfo = tweenInfo

	local tweenDuration = tweenInfo.DelayTime + tweenInfo.Time
	if tweenInfo.Reverses then
		tweenDuration += tweenInfo.Time
	end
	tweenDuration *= tweenInfo.RepeatCount + 1
	self._currentTweenDuration = tweenDuration

	-- start animating this tween
	TweenScheduler.add(self)

	return false
end

local function Tween<T>(
	goalState: PubTypes.StateObject<PubTypes.Animatable>,
	tweenInfo: PubTypes.CanBeState<TweenInfo>?
): Types.Tween<T>
	local currentValue = goalState:get(false)

	-- apply defaults for tween info
	if tweenInfo == nil then
		tweenInfo = TweenInfo.new()
	end

	local dependencySet = {[goalState] = true}
	local tweenInfoIsState = xtypeof(tweenInfo) == "State"

	if tweenInfoIsState then
		dependencySet[tweenInfo] = true
	end

	local startingTweenInfo = tweenInfo
	if tweenInfoIsState then
		startingTweenInfo = startingTweenInfo:get()
	end

	-- If we start with a bad TweenInfo, then we don't want to construct a Tween
	if typeof(startingTweenInfo) ~= "TweenInfo" then
		logError("mistypedTweenInfo", nil, typeof(startingTweenInfo))
	end

	local self = setmetatable({
		type = "State",
		kind = "Tween",
		dependencySet = dependencySet,
		-- if we held strong references to the dependents, then they wouldn't be
		-- able to get garbage collected when they fall out of scope
		dependentSet = setmetatable({}, WEAK_KEYS_METATABLE),
		_goalState = goalState,
		_tweenInfo = tweenInfo,
		_tweenInfoIsState = tweenInfoIsState,

		_prevValue = currentValue,
		_nextValue = currentValue,
		_currentValue = currentValue,

		-- store current tween into separately from 'real' tween into, so it
		-- isn't affected by :setTweenInfo() until next change
		_currentTweenInfo = tweenInfo,
		_currentTweenDuration = 0,
		_currentTweenStartTime = 0,
		_currentlyAnimating = false
	}, CLASS_METATABLE)

	initDependency(self)
	-- add this object to the goal state's dependent set
	goalState.dependentSet[self] = true

	return self
end

return Tween
--!strict
--[=[
	@function reduce
	@within Array

	@param array {T} -- The array to reduce.
	@param reducer (accumulator: U, value: T, index: number, array: {T}) -> U -- The reducer to use.
	@param initialReduction? U = {T}[1] -- The initial accumulator value.
	@return U -- The final accumulator value.

	Reduces the array using the given reducer and initial accumulator value.
	If no `initialReduction` value is given, the first item in the array is used.

	```lua
	local array = { 1, 2, 3 }

	local value = Reduce(array, function(accumulator, item, index)
		return accumulator - item
	end) -- -4

	local value = Reduce(array, function(accumulator, item, index)
		table.insert(accumulator, item)
		return accumulator
	end, {}) -- { 1, 2, 3 }
	```
]=]


local function reduce<T, U>(
	array: { T },
	reducer: (accumulator: U, value: T, index: number, array: { T }) -> U,
	initReduction: U?
): U
	local result = initReduction
	local start = 1

	if result == nil then
		result = array[1]
		start = 2
	end

	for index = start, #array do
		result = reducer(result, array[index], index, array)
	end

	return result
end

return reduce
--	mouse.Icon = "rbxasset://textures\\GunCursor.png"


	while true do
		wait()
	end
end

function onUnequippedLocal(mouse)

end

function Equip(mouse)
wait(0.01)
tool.GripPos=Vector3.new(0,0,0)
arms = {tool.Parent:FindFirstChild("Left Arm"), tool.Parent:FindFirstChild("Right Arm")}
torso = tool.Parent:FindFirstChild("Torso") 
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = nil
sh[2].Part1 = nil
local weld1 = Instance.new("Weld") -- left arm
weld55 = weld1
weld1.Part0 = torso
weld1.Parent = torso
weld1.Part1 = arms[1]
weld1.C1 = f(-1.12,0.3,-0.84,75,-4,15)
welds[1] = weld1
local weld2 = Instance.new("Weld") -- right arm
weld33 = weld2
weld2.Part0 = torso
weld2.Parent = torso
weld2.Part1 = arms[2]
weld2.C1 = f(0.1,0.17,-1.14,72,2,-52)
welds[2] = weld2
local weld3 = Instance.new("Weld") -- right arm
weld77 = weld3
weld3.Part0 = torso
weld3.Parent = torso
weld3.Part1 = tool.Handle
weld3.C1 = f(-0.76,1.93,-1.73,5,-90,0)
welds[3] = weld2
end
else
end
else
end
end

function Unequip(mouse)
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = arms[1]
sh[2].Part1 = arms[2]
welds[1].Parent = nil
welds[2].Parent = nil
end
else
end
else
end
end

tool.Unequipped:connect(onUnequippedLocal)

tool.Equipped:connect(onEquippedLocal)
tool.Equipped:connect(Equip)
tool.Unequipped:connect(Unequip)