Roblox/luau_corpus huggingface dataset:
--banto.Health.Changed:connect(function()
--local hitSound = soundBank[math.random(1,#soundBank)]:Clone()
--hitSound.PlayOnRemove = true
--hitSound.Parent = banto.PrimaryPart
--wait()
--hitSound:Destroy()
--end)

local gruntCoroutine = coroutine.wrap(function()
	while wait(math.random(30,60)) do
		local soundBank = banto.Head:GetChildren()
		local randomSound = soundBank[math.random(1,#soundBank)]
		randomSound:Play()
	end
end)
gruntCoroutine()

while true do
	bp.Parent = banto.PrimaryPart
	local goal
	repeat 
		local ray = Ray.new(
			Vector3.new(origin.p.x+math.random(-tether,tether),100,origin.p.z+math.random(-tether,tether)),
			Vector3.new(0,-1000,0)
			)
		local part,pos,norm,mat = workspace:FindPartOnRay(ray,banto)
		if part == workspace.Terrain and mat ~= Enum.Material.Water then
			goal = pos+Vector3.new(0,2.25,0)
		end
		wait()
	until goal
	-- move the banto to the newfound goal
	walk:Play()
	bg.CFrame = CFrame.new(banto.PrimaryPart.Position,goal)
	bp.Position = (CFrame.new(banto.PrimaryPart.Position,goal)*CFrame.new(0,0,-100)).p

	local start = tick()
	repeat wait(1/2) 
		local ray = Ray.new(banto.PrimaryPart.Position,Vector3.new(0,-1000,0))
		--local part,pos,norm,mat = workspace:FindPartOnRay(ray,banto)
		--banto:MoveTo(Vector3.new(banto.PrimaryPart.Position.X,pos.Y+2.25,banto.PrimaryPart.Position.Z))
		--bp.Position = Vector3.new(bp.Position.X,pos.Y+2.25,bp.Position.Z)

	until (banto.PrimaryPart.Position-goal).magnitude < 10 or tick()-start >10
	walk:Stop()
	bp.Parent = nil
	wait(math.random(3,8))
end
--Player.CameraMode = "LockFirstPerson"
elseif key == "q" or key== "ButtonL2" and zoomed then
zoomed = false
Cam.FieldOfView = 70
animation:Stop()
Player.Character.Humanoid.CameraOffset = Vector3.new(0,0,0)
-- Note: The active transparency controller could be made to listen for this event itself.
function CameraModule:OnCameraSubjectChanged()
	local camera = workspace.CurrentCamera
	local cameraSubject = camera and camera.CameraSubject

	if self.activeTransparencyController then
		self.activeTransparencyController:SetSubject(cameraSubject)
	end

	if self.activeOcclusionModule then
		self.activeOcclusionModule:OnCameraSubjectChanged(cameraSubject)
	end

	self:ActivateCameraController(nil, camera.CameraType)
end

function CameraModule:OnCameraTypeChanged(newCameraType: Enum.CameraType)
	if newCameraType == Enum.CameraType.Scriptable then
		if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter then
			CameraUtils.restoreMouseBehavior()
		end
	end

	-- Forward the change to ActivateCameraController to handle
	self:ActivateCameraController(nil, newCameraType)
end
--------------------------PC AUTO JUMPER-------------------------------

local function GetCharacter()
	return Player and Player.Character
end

local function GetTorso()
	local humanoid = findPlayerHumanoid(Player)
	return humanoid and humanoid.Torso
end

local function IsPartAHumanoid(part)
	return part and part.Parent and (part.Parent:FindFirstChild('Humanoid') ~= nil)
end

local function doAutoJump()
	local character = GetCharacter()
	if (character == nil) then
		return;
	end

	local humanoid = findPlayerHumanoid(Player)
	if (humanoid == nil) then
		return;
	end

	local rayLength = 1.5;
	-- This is how high a ROBLOXian jumps from the mid point of his torso
	local jumpHeight = 7.0;

	local torso = GetTorso()
	if (torso == nil) then
		return;
	end

	local torsoCFrame = torso.CFrame;
	local torsoLookVector = torsoCFrame.lookVector;
	local torsoPos = torsoCFrame.p;

	local torsoRay = Ray.new(torsoPos + Vector3_new(0, -torso.Size.Y/2, 0), torsoLookVector * rayLength);
	local jumpRay = Ray.new(torsoPos + Vector3_new(0, jumpHeight - torso.Size.Y, 0), torsoLookVector * rayLength);

	local hitPart, _ = RayCastIgnoreList(workspace, torsoRay, {character}, false)
	local jumpHitPart, _ = RayCastIgnoreList(workspace, jumpRay, {character}, false)

	if (hitPart and jumpHitPart == nil and hitPart.CanCollide == true) then
		 -- NOTE: this follow line is not in the C++ impl, but an improvement  in Click to Move
		if not IsPartAHumanoid(hitPart) then
			humanoid.Jump = true;
		end
	end
end

local NO_JUMP_STATES =
{
	[Enum.HumanoidStateType.FallingDown] = false;
	[Enum.HumanoidStateType.Flying] = false;
	[Enum.HumanoidStateType.Freefall] = false;
	[Enum.HumanoidStateType.GettingUp] = false;
	[Enum.HumanoidStateType.Ragdoll] = false;
	[Enum.HumanoidStateType.Running] = false;
	[Enum.HumanoidStateType.Seated] = false;
	[Enum.HumanoidStateType.Swimming] = false;

	-- Special case to detect if we are on a ladder
	[Enum.HumanoidStateType.Climbing] = false;
}

local function enableAutoJump()
	local humanoid = findPlayerHumanoid(Player)
	local currentState = humanoid and humanoid:GetState()
	if currentState then
		return NO_JUMP_STATES[currentState] == nil
	end
	return false
end

local function getAutoJump()
	return true
end

local function vec3IsZero(vec3)
	return vec3.magnitude < 0.05
end
-- Local Functions
local function setCollisionGroupForPart(part)
	if part:IsA("BasePart") then
		previousCollisionGroups[part] = part.CollisionGroupId
		PhysicsService:SetPartCollisionGroup(part, playerCollisionGroupName)
	end
end
 
local function setCollisionGroupForObject(object)
	setCollisionGroupForPart(object)
	for _, object in ipairs(object:GetDescendants()) do
		setCollisionGroupForPart(object)
	end
end
 
local function resetCollisionGroup(object)
	local previousCollisionGroupId = previousCollisionGroups[object]
	if not previousCollisionGroupId then return end 
 
	local previousCollisionGroupName = PhysicsService:GetCollisionGroupName(previousCollisionGroupId)
	if not previousCollisionGroupName then return end
 
	PhysicsService:SetPartCollisionGroup(object, previousCollisionGroupName)
	previousCollisionGroups[object] = nil
end
 
local function onCharacterAdded(character)
	setCollisionGroupForObject(character)
 
	character.DescendantAdded:Connect(setCollisionGroupForPart)
	character.DescendantRemoving:Connect(resetCollisionGroup)
end
 
local function onPlayerAdded(player)
	player.CharacterAdded:Connect(onCharacterAdded)
end
-- Called when any relevant values of GameSettings or LocalPlayer change, forcing re-evalulation of
-- current control scheme
function ControlModule:OnComputerMovementModeChange()
	local controlModule, success =  self:SelectComputerMovementModule()
	if success then
		self:SwitchToController(controlModule)
	end
end

function ControlModule:OnTouchMovementModeChange()
	local touchModule, success = self:SelectTouchModule()
	if success then
		while not self.touchControlFrame do
			wait()
		end
		self:SwitchToController(touchModule)
	end
end

function ControlModule:CreateTouchGuiContainer()
	if self.touchGui then self.touchGui:Destroy() end

	-- Container for all touch device guis
	self.touchGui = Instance.new('ScreenGui')
	self.touchGui.Name = "TouchGui"
	self.touchGui.ResetOnSpawn = false
	self.touchGui.Enabled = self.humanoid ~= nil

	self.touchControlFrame = Instance.new("Frame")
	self.touchControlFrame.Name = "TouchControlFrame"
	self.touchControlFrame.Size = UDim2.new(1, 0, 1, 0)
	self.touchControlFrame.BackgroundTransparency = 1
	self.touchControlFrame.Parent = self.touchGui

	self.touchGui.Parent = self.playerGui
end

function ControlModule:GetClickToMoveController()
	if not self.controllers[ClickToMove] then
		self.controllers[ClickToMove] = ClickToMove.new(CONTROL_ACTION_PRIORITY)
	end
	return self.controllers[ClickToMove]
end

return ControlModule.new()
--Module Initialization
wait() 
for _,i in pairs(script:GetChildren()) do 
	if i:IsA("ModuleScript") then 
		require(i) 
	end 
end
-------------------------
function onClicked()
script.Parent.Click:Play()
script.Parent.ClickDetector.MaxActivationDistance = 0
wait(1)
script.Parent.Ring:Play()
wait(10)
script.Parent.Ring:Stop()
script.Parent.ClickDetector.MaxActivationDistance = 12
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
--[=[
	For if you want to disable saving in studio for faster close time!
]=]
function PlayerDataStoreManager:DisableSaveOnCloseStudio()
	assert(RunService:IsStudio())

	self._disableSavingInStudio = true
end
--[=[
	@class Input

	The Input module provides access to various user input classes.

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

	```lua
	local Input = require(packages.Input)

	local PreferredInput = Input.PreferredInput
	local Mouse = Input.Mouse
	local Keyboard = Input.Keyboard
	local Touch = Input.Touch
	local Gamepad = Input.Gamepad
	```
]=]
local Input = {
	PreferredInput = require(script.PreferredInput),
	Mouse = require(script.Mouse),
	Keyboard = require(script.Keyboard),
	Touch = require(script.Touch),
	Gamepad = require(script.Gamepad),
}

return Input
-------------------------------------------------------------------
function Cooldown()
	for i = CooldownTime,0,-1 do
		GUIText.Text = "COOLDOWN: "..i
		wait(1)
	end
	GUIText.Text = Settings.RegenPreText..model.Name
	enabled = true
	Click.MaxActivationDistance = Settings.ClickDistance
end
--[[
	Stage implementation
]]

local Waiting = {}
Waiting.__index = Waiting

function Waiting.new(gameStageHandler)
	local self = setmetatable({
		gameStageHandler = gameStageHandler,
	}, Waiting)

	return self
end

function Waiting:disableQueueTimeout()
	self._disableQueueTimeout = true
end

function Waiting:startGame(...)
	MatchmakingDestination.startGame(...)
end

function Waiting:initialize()
	-- Spawn every player onto the boat
	for _, player in pairs(Players:GetPlayers()) do
		Util.loadCharacter(player)
	end

	spawn(function()
		DamageHandler.setup()
	end)

	MatchmakingDestination.run(function() self.gameStageHandler:nextStage() end)

	spawn(function()
			while not MatchmakingDestination.isPlaying() do
				if self.gameStageHandler.currentStageClassName ~= "Waiting" or self._disableQueueTimeout then
					return
				end

				local waitTime = tick() - self.gameStageHandler.timeStageStarted

				if waitTime < Conf.queue_time_limit or #Players:getPlayers() < Conf.min_queue_players then
					wait(1)
					self.gameStageHandler._queueWaitTime = waitTime

				else
					MatchmakingDestination.startGame()
					break
				end
			end
	end)
end

function Waiting:destroy()
	-- TODO:  Any teardown for MatchmakingDestination

	-- Reset the character back to the default state
	for _, player in pairs(Players:GetPlayers()) do
		if player.Character then
			-- Remove the force field from the character
			local forceField = player.Character:FindFirstChild("WaitingForceField")
			if forceField then
				forceField:Destroy()
			end

			-- Remove all equipped tools that are not the building tool
			for _, instance in pairs(player.Character:GetChildren()) do
				if instance:IsA("Tool") then
					instance:Destroy()
				end
			end
		end

		-- Remove all tools from the player's backpack that are not the building tool
		for _, instance in pairs(player.Backpack:GetChildren()) do
			if instance:IsA("Tool") then
				instance:Destroy()
			end
		end
	end
end
---Misc
function Misc()
	local function GetHelp()
		local a=false
		for i=1,9 do
			a=not a
			wait(.2)
			if a then
				script.Parent.Help.Style=Enum.ButtonStyle.RobloxRoundDropdownButton
			else
				script.Parent.Help.Style=Enum.ButtonStyle.RobloxRoundDefaultButton
			end
		end
	end
	GetHelp()
	script.Parent.Help.MouseButton1Click:connect(function()
		script.Parent.Controls.Visible=not script.Parent.Controls.Visible
	end)
	script.Parent:WaitForChild("Light")
	local light=0
	local function Light(on)
		for i,v in pairs(car.Body.Lights:GetChildren()) do
			if v:FindFirstChild("Light")~=nil then
				v.Light.Enabled=on
			end
			if on and v.BrickColor~=BrickColor.new("Really black") then
				v.Material=Enum.Material.Neon
			else
				v.Material=Enum.Material.SmoothPlastic
			end
		end
	end
	local function AutoLight()
		if light==0 then
			if (game.Lighting:GetMinutesAfterMidnight()<390 or game.Lighting:GetMinutesAfterMidnight()>1050) then
				Light(true)
			else
				Light(false)
			end
		end
	end
	script.Parent.Light.MouseButton1Click:connect(function()
		if light==1 then
			light=-1
		else
			light=light+1
		end
		if light==0 then
			script.Parent.Light.Text="Lights: Auto"
			if game.Lighting:GetMinutesAfterMidnight()<390 or game.Lighting:GetMinutesAfterMidnight()>1050 then
				Light(true)
			else
				Light(false)
			end
		elseif light==1 then
			script.Parent.Light.Text="Lights: On"
			Light(true)
		else
			script.Parent.Light.Text="Lights: Off"
			Light(false)
		end
	end)
	local function BrakeLights()
		for i,v in pairs(car.Body.Lights:GetChildren()) do
			if v.Name=="R" then
				if v.Light.Enabled then
					if GBrake>0 then
						v.Transparency=0
						v.Light.Brightness=12
					else
						v.Transparency=.3
						v.Light.Brightness=8
					end
				else
					if GBrake>0 then
						v.Material=Enum.Material.Neon
					else
						v.Material=Enum.Material.SmoothPlastic
					end
				end
			end
		end
	end
	game.Lighting.Changed:connect(AutoLight)
	AutoLight()
	local FlipWait=tick()
	local FlipDB=false
	local function FlipCar()
		local gyro = car.DriveSeat.Flip
		gyro.maxTorque = Vector3.new(10000,0,10000)
		gyro.P=3000
		gyro.D=500
		wait(2)
		gyro.maxTorque = Vector3.new(0,0,0)
		gyro.P=0
		gyro.D=0
		FlipDB=false
	end
	local function GetFlip()
		if (car.DriveSeat.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector.y > .1 or FlipDB then
			FlipWait=tick()
		else
			if tick()-FlipWait>=3 then
				FlipDB=true
				FlipCar()
			end
		end
	end
	--run:BindToRenderStep("BrakeL",Enum.RenderPriority.Last.Value,BrakeLights)
	--run:BindToRenderStep("Flip",Enum.RenderPriority.Last.Value,GetFlip)
	--table.insert(Binded,"BrakeL")
	--table.insert(Binded,"Flip")
	table.insert(LoopRun,BrakeLights)
	table.insert(LoopRun,GetFlip)
end
Misc()
------[SETTINGS]------
local DefaultSound = "Grass" -- The sound that will set as default if FloorMaterial is nil (cannot be found)
local ToggleAirSound = false -- Whether or not an air sound will sound when in the air
-- Copied from Grimgold Periastron Beta

local Tool = script.Parent
local Sword = Tool.Handle

local vCharacter
local myTorso
local myHumanoid 

local equipped = false

local debris = game:GetService("Debris")

function tagHumanoid(humanoid, player)
	if humanoid then 
		local creatorTag = Instance.new("ObjectValue")
		creatorTag.Value = player
		creatorTag.Name = "creator"
		creatorTag.Parent = humanoid
		debris:AddItem(creatorTag, 1)
	end
end

function cut(hit)
	local humanoid
	local vPlayer
	if hit and hit.Parent and myHumanoid then 
		if hit.Parent.className == "Hat" then
			humanoid = hit.Parent.Parent:FindFirstChild("Humanoid")
		else
			humanoid = hit.Parent:FindFirstChild("Humanoid")
		end
		vPlayer = game.Players:GetPlayerFromCharacter(vCharacter)
		if humanoid ~= nil and humanoid ~= myHumanoid then 
			tagHumanoid(humanoid, vPlayer)
			humanoid:TakeDamage(7.5)
		end
	end
end

function onEquipped()
	vCharacter = Tool.Parent
	myTorso = vCharacter:FindFirstChild("Torso")
	myHumanoid = vCharacter:FindFirstChild("Humanoid")	
end

Tool.Equipped:connect(onEquipped)

Sword.Touched:connect(cut)
--			print("Going Depth to Folder")
			arraySoFar[obj.Name] = loadModules(obj, {})
		elseif (obj:IsA("ModuleScript")) then
--[=[
	@within TableUtil
	@function Assign
	@param target table
	@param ... table
	@return table

	Copies all values of the given tables into the `target` table.

	```lua
	local t = {A = 10}
	local t2 = {B = 20}
	local t3 = {C = 30, D = 40}
	local newT = TableUtil.Assign(t, t2, t3)
	print(newT) --> {A = 10, B = 20, C = 30, D = 40}
	```
]=]
local function Assign<T>(target: { T }, ...: { any }): { T } & { any }
	local tbl = table.clone(target)
	for _, src in { ... } do
		for k, v in src do
			tbl[k] = v
		end
	end
	return tbl
end
--[[**
	ensure value is an Instance and it's ClassName matches the given ClassName by an IsA comparison

	@param className The class name to check for

	@returns A function that will return true iff the condition is passed
**--]]
function t.instanceIsA(className, childTable)
	assert(t.string(className))

	local childrenCheck
	if childTable ~= nil then
		childrenCheck = t.children(childTable)
	end

	return function(value)
		local instanceSuccess = t.Instance(value)
		if not instanceSuccess then
			return false
		end

		if not value:IsA(className) then
			return false
		end

		if childrenCheck then
			local childrenSuccess = childrenCheck(value)
			if not childrenSuccess then
				return false
			end
		end

		return true
	end
end
-- PROPERTIES
IconController.topbarEnabled = true
IconController.controllerModeEnabled = false
IconController.previousTopbarEnabled = checkTopbarEnabled()
IconController.leftGap = 12
IconController.midGap = 12
IconController.rightGap = 12
-- ROBLOX deviation START: additional assignments for Lua type inferrence to work
exports.ARROW = specialCharsModule.ARROW
exports.ICONS = specialCharsModule.ICONS
exports.CLEAR = specialCharsModule.CLEAR
--//INSPARE; One more year, every year//--
		  --//Steeing System Six//--
				 --//Visionary//--
-- Libraries
local Roact = require(Vendor:WaitForChild('Roact'))
local Cryo = require(Libraries:WaitForChild('Cryo'))
local new = Roact.createElement
--[=[
	Takes a list of variables and uses them to compute an observable that
	will combine into any value. These variables can be any value, and if they
	can be converted into an Observable, they will be, which will be used to compute
	the value.

	```lua
	local verbState = Blend.State("hi")
	local nameState = Blend.State("alice")

	local computed = Blend.Computed(verbState, nameState, function(verb, name)
		return verb .. " " .. name
	end)

	maid:GiveTask(computed:Subscribe(function(sentence)
		print(sentence)
	end)) --> "hi alice"

	nameState.Value = "bob" --> "hi bob"
	verbState.Value = "bye" --> "bye bob"
	nameState.Value = "alice" --> "bye alice"
	```

	@param ... A series of convertable states, followed by a function at the end.
	@return Observable<T>
]=]
function Blend.Computed(...)
	local values = {...}
	local n = select("#", ...)
	local compute = values[n]

	assert(type(compute) == "function", "Bad compute")

	local args = {}
	for i=1, n - 1 do
		local observable = Blend.toPropertyObservable(values[i])
		if observable then
			args[i] = observable
		else
			args[i] = Rx.of(values[i])
		end
	end

	if #args == 0 then
		-- static value?
		return Observable.new(function(sub)
			sub:Fire(compute())
		end)
	elseif #args == 1 then
		return Rx.map(compute)(args[1])
	else
		return Rx.combineLatest(args)
			:Pipe({
				Rx.map(function(result)
					return compute(unpack(result, 1, n - 1))
				end);
			})
	end
end
-- Fetch the thumbnail
local userId = Player.UserId
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local content, isReady = Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)
---------END LEFT DOOR

game.Workspace.DoorValues.Moving.Value = true
game.Workspace.DoorClosed.Value = true
wait(0.1)
until game.Workspace.DoorValues.Close.Value==69
end
game.Workspace.DoorValues.Moving.Value = false
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
--[[**
	ensures Roblox RBXScriptConnection type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.RBXScriptConnection = t.typeof("RBXScriptConnection")
-- periodically pick one of the workspace.Music's children and play song, never pick last

Songs = workspace.Music:GetChildren()

local LastSong
local Song

task.wait(3)

while true do
	
	repeat
		task.wait()
		Song = Songs[math.random(1, #workspace.Music:GetChildren())]
	until Song ~= LastSong

	LastSong = Song
	Song:Play()
	
	task.wait(Song.TimeLength)
	
	task.wait(math.random(1,60))
end
-- same as jump for now

function moveFreeFall()
	RightShoulder.MaxVelocity = 0.4
	LeftShoulder.MaxVelocity = 0.4
	RightShoulder:SetDesiredAngle(3.14)
	LeftShoulder:SetDesiredAngle(-3.14)
	RightHip:SetDesiredAngle(0)
	LeftHip:SetDesiredAngle(0)
	wait(0.8)
end

function moveSit()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder:SetDesiredAngle(3.14 /2)
	LeftShoulder:SetDesiredAngle(-3.14 /2)
	RightHip:SetDesiredAngle(3.14 /2)
	LeftHip:SetDesiredAngle(-3.14 /2)
end

function getTool()	
	for _, kid in ipairs(Figure:GetChildren()) do
		if kid.className == "Tool" then return kid end
	end
	return nil
end

function getToolAnim(tool)
	for _, c in ipairs(tool:GetChildren()) do
		if c.Name == "toolanim" and c.className == "StringValue" then
			return c
		end
	end
	return nil
end

function animateTool()
	
	if (toolAnim == "None") then
		RightShoulder:SetDesiredAngle(1.57)
		return
	end

	if (toolAnim == "Slash") then
		RightShoulder.MaxVelocity = 0.5
		RightShoulder:SetDesiredAngle(0)
		return
	end

	if (toolAnim == "Lunge") then
		RightShoulder.MaxVelocity = 0.5
		LeftShoulder.MaxVelocity = 0.5
		RightHip.MaxVelocity = 0.5
		LeftHip.MaxVelocity = 0.5
		RightShoulder:SetDesiredAngle(1.57)
		LeftShoulder:SetDesiredAngle(1.0)
		RightHip:SetDesiredAngle(1.57)
		LeftHip:SetDesiredAngle(1.0)
		return
	end
end

function move(time)
	local amplitude
	local frequency
  
	if (pose == "Jumping") then
		moveJump()
		return
	end

	if (pose == "FreeFall") then
		moveFreeFall()
		return
	end
 
	if (pose == "Seated") then
		moveSit()
		return
	end

	local climbFudge = 0
	
	if (pose == "Running") then
		RightShoulder.MaxVelocity = 0.1
		LeftShoulder.MaxVelocity = 0.1
		amplitude = 1
		frequency = 9
	elseif (pose == "Climbing") then
		RightShoulder.MaxVelocity = 0.3 
		LeftShoulder.MaxVelocity = 0.3
		amplitude = 0
		frequency = 0
		climbFudge = -3.14
	else
		amplitude = 0.1
		frequency = 1
	end

	desiredAngle = amplitude * math.sin(time*frequency)

	RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
	LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
	RightHip:SetDesiredAngle(-desiredAngle)
	LeftHip:SetDesiredAngle(-desiredAngle)


	local tool = getTool()

	if tool then
	
		animStringValueObject = getToolAnim(tool)

		if animStringValueObject then
			toolAnim = animStringValueObject.Value
			-- message recieved, delete StringValue
			animStringValueObject.Parent = nil
			toolAnimTime = time + .3
		end

		if time > toolAnimTime then
			toolAnimTime = 0
			toolAnim = "None"
		end

		animateTool()

		
	else
		toolAnim = "None"
		toolAnimTime = 0
	end
end
--[[
	Merges values from zero or more tables onto a target table. If a value is
	set to None, it will instead be removed from the table.

	This function is identical in functionality to JavaScript's Object.assign.
]]
-- Luau TODO: no way to strongly type this accurately, it doesn't eliminate deleted keys of T, and Luau won't do intersections of type packs: <T, ...U>(T, ...: ...U): T & ...U
return function<T, U, V, W>(target: T, source0: U?, source1: V?, source2: W?, ...): T & U & V & W
	if source0 ~= nil and typeof(source0 :: any) == "table" then
		for key, value in pairs(source0 :: any) do
			if value == None then
				(target :: any)[key] = nil
			else
				(target :: any)[key] = value
			end
		end
	end

	if source1 ~= nil and typeof(source1 :: any) == "table" then
		for key, value in pairs(source1 :: any) do
			if value == None then
				(target :: any)[key] = nil
			else
				(target :: any)[key] = value
			end
		end
	end

	if source2 ~= nil and typeof(source2 :: any) == "table" then
		for key, value in pairs(source2 :: any) do
			if value == None then
				(target :: any)[key] = nil
			else
				(target :: any)[key] = value
			end
		end
	end

	for index = 1, select("#", ...) do
		local rest = select(index, ...)

		if rest ~= nil and typeof(rest) == "table" then
			for key, value in pairs(rest) do
				if value == None then
					(target :: any)[key] = nil
				else
					(target :: any)[key] = value
				end
			end
		end
	end

	-- TODO? we can add & Object to this, if needed by real-world code, once CLI-49825 is fixed
	return (target :: any) :: T & U & V & W
end
--[[ @brief Normalizes an array using the 1 norm. The satellite array will be multiplied by the same normalizing factor.
     @param array The array to normalize.
--]]
function module.NormalizeArrayWithSatellite(array, satellite)
	local sum = module.Sum(array);
	if sum==0 then return; end
	for i = 1, #array do
		array[i] = array[i] / sum;
	end
	for i = 1, #satellite do
		satellite[i] = satellite[i] / sum;
	end
end