Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[if (UserInputService.TouchEnabled) then
	ChatBar:SetTextLabelText(ChatLocalization:Get("GameChat_ChatMain_ChatBarText",'Tap here to chat'))
else
	ChatBar:SetTextLabelText(ChatLocalization:Get("GameChat_ChatMain_ChatBarTextTouch",'To chat click here or press "/" key'))
end]]



ChatBar:SetTextLabelText(ChatLocalization:Get("GameChat_ChatMain_ChatBarTextTouch",'To chat click here or press "/" key'))

spawn(function()
	local CurveUtil = require(modulesFolder:WaitForChild("CurveUtil"))
	local animationFps = ChatSettings.ChatAnimationFPS or 20.0

	local updateWaitTime = 1.0 / animationFps
	local lastTick = tick()
	while true do
		local currentTick = tick()
		local tickDelta = currentTick - lastTick
		local dtScale = CurveUtil:DeltaTimeToTimescale(tickDelta)

		if dtScale ~= 0 then
			ChatWindow:Update(dtScale)
		end

		lastTick = currentTick
		wait(updateWaitTime)
	end
end)
--this part manages the local script


local addMyLocalScript = function(player)
	local localScript = script["Chain Coupler Local"]:Clone()
	local backpack = player:WaitForChild("Backpack")
	if not player:WaitForChild("Backpack"):FindFirstChild("Chain Coupler Local") then	
		localScript.Parent = player.Backpack
	end
end

local addScriptAtRespawn = function(player)
	player.CharacterAdded:connect(function() addMyLocalScript(player) end)
end
--the click


script.Parent.ClickDetector.MouseClick:connect(function(player)
	if ready == true then
		ready = false
		local tool = machine.IceCream:clone()
		local Plate = script.Parent.Parent.Plate
		local handl = script.Parent.Parent.Content.Handle:clone()
		
		handl.Parent = storage
		tool.Parent =  storage
		handl.Position = Vector3.new(Plate.Position.X,Plate.Position.Y +0.6,Plate.Position.Z)
		machine.Who.Value = player.Name
		machine.Target.Text = ""..player.Name..""
		script.Parent.ClickDetector.MaxActivationDistance = 0
		coverdown()
		menuoneappear()
		
			for _,one in pairs(machine.ToppingsOne:GetChildren()) do
				if one:IsA("TextButton") then
					one.MouseButton1Down:connect(function()
					local ice = script.Parent.Parent.Ice[one.Name]:clone()
					ice.Parent = tool
					ice.CFrame = CFrame.new(Vector3.new(handl.Position.X+0.025,handl.Position.Y+0.15,handl.Position.Z))
					menuonedisappear()
					menutwoappear()
					
					for _,two in pairs(machine.ToppingsTwo:GetChildren()) do
						if two:IsA("TextButton") then
							two.MouseButton1Down:connect(function()
							local ice = script.Parent.Parent.Ice[two.Name]:clone()
							ice.Parent = tool
							ice.CFrame = CFrame.new(Vector3.new(handl.Position.X+0.025,handl.Position.Y+0.35,handl.Position.Z))
							menutwodisappear()
							handl.Parent = tool
							tool.Enabled = true
							tool.Weld.Disabled = false
							tool.IceScript.Disabled = false
							tool.Parent = game.Players[machine.Who.Value].Backpack
							for _,parts in pairs(tool:GetChildren()) do
								if parts:IsA("Part") then
								parts.Anchored = false
								end
							end
							wait()
							machine.Who.Value = ""
							machine.Target.Text = ""
							script.Parent.ClickDetector.MaxActivationDistance = 10
							coverup()
							script.Fixer.Disabled = false
						end)
					end
				end					
					end)
				end
			end
		wait(5)
	ready = true
	end
end)
---WeldConstraint anything you want to move to the TargetL_Closed and TargetR_Closed MeshParts. 
---TargetL_Closed and TargetR_Closed should be anchored but child welded objects that move with TargetL_Closed and TargetR_Closed should not be anchored.
---You may move, rotate and scale the Targets but for a simple door only translation is used. 
---IntValue Speed controls the doors speed to open and close.
---After you have finished creating your door turn the transparency of Trigger, TargetL_Closed, TargetL_Open, TargetR_Closed and TargetR_Open to 1 or fully transparent.



local TweenService = game:GetService("TweenService")

local model = script.Parent
local sound = model.Sound.Value
local trigger = model.Trigger

local left = model.TargetL_Closed
local right = model.TargetR_Closed

local tweenInfo = TweenInfo.new (
	model.Speed.Value, --Time/Speed of Door Tween
	Enum.EasingStyle.Quart,  --Easing Style
	Enum.EasingDirection.InOut, --EasingDirection
	0, --Repeat Count
	false, --Reverse true
	0 --Delay
)

local DoorState = {
	["Closed"] = 1,
	["Opening"] = 2,
	["Open"] = 3,
	["Closing"] = 4,
}

local doorState = DoorState.Closed 
local playersNear = {}

local tweenL = TweenService:Create(left, tweenInfo, {CFrame = model.TargetL_Open.CFrame})
local tweenR = TweenService:Create(right, tweenInfo, {CFrame = model.TargetR_Open.CFrame})

local tweenLClose = TweenService:Create(left, tweenInfo, {CFrame = model.TargetL_Closed.CFrame})
local tweenRClose = TweenService:Create(right, tweenInfo, {CFrame = model.TargetR_Closed.CFrame})

local function StartOpening()
	doorState = DoorState.Opening
	sound:Play()
	
	tweenL:Play()
	tweenR:Play()
end

local function StartClosing()
	doorState = DoorState.Closing
	--model["Door"]:Play()

	tweenLClose:Play()
	tweenRClose:Play()
end

local function tweenOpenCompleted(playbackState)
	if(next(playersNear) == nil) then
		StartClosing()
	else
		doorState = DoorState.Open
	end
end

local function tweenCloseCompleted(playbackState)
	if(next(playersNear) ~= nil) then
		StartOpening()
	else
		doorState = DoorState.Closed
	end
end

tweenL.Completed:Connect(tweenOpenCompleted)
tweenLClose.Completed:Connect(tweenCloseCompleted)

local function touched(otherPart)
	if(otherPart.Name == "HumanoidRootPart" ) then
		local player = game.Players:FindFirstChild(otherPart.Parent.Name)
		if(player) then
			--print("touch")
			playersNear[player] = 1
			if(doorState == DoorState.Closed) then
				StartOpening()
			end
		end
	end
end
-- (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 = "HivemindFabrege"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(2, 1, 1) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0, -1.125, 0)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
-- инициализируем подключение	


local DataStore2 = require(1936396537) -- вариант подключаемого модуля

local function processReceipt(ReceiptInfo)
	local player = game:GetService("Players"):GetPlayerByUserId(ReceiptInfo.PlayerId) -- получаем Id игрока
	
	if not player then -- если не игрок, то вылетаем
		return Enum.ProductPurchaseDecision.NotProcessedYet
	end
	
	-- если игрок найден, выполняем действия
	-- print(ReceiptInfo.PlayerId .. " buy " .. ReceiptInfo.ProductId)	
	-- local moneyStore = DataStore2("money", player)
	-- moneyStore:Increment(1000) -- даём 100 монет
	local char=player.Character
	if player:FindFirstChild("Buy") == nil then -- проверяем наличие переменной, если нет - создаём
		local Buy = Instance.new("IntValue")
		Buy.Parent = player
		Buy.Name = "Buy"
		Buy.Value=3
	else
		player.Buy.Value = 3
	end
	char.Humanoid.WalkSpeed = 30
	-- а теперь убираем Frame покупки
	local pl = game.Players:FindFirstChild(player.Name)
	if pl ~= nil then
		pl.PlayerGui.Main.GameDev.Visible=false
		pl.PlayerGui.Main.Answer.Visible=true
	end
	
	-- возвращаем, что покупка произведена
	return Enum.ProductPurchaseDecision.PurchaseGranted
	
end

MS.ProcessReceipt= processReceipt
--Notes--



local function AttachParticleControl(source_part)
	
	local prtc = nil
	
	local function Start()
		prtc = script.Notes:clone()
		prtc.Parent = source_part
	end
	
	local function Update()
		
	end
	
	local function Stop()
		if prtc ~= nil then
			prtc:destroy()
			prtc = nil
		end
	end
	
	return {Start = Start, Update = Update, Stop = Stop}
end

return AttachParticleControl
---WeldConstraint anything you want to move to the TargetL_Closed and TargetR_Closed MeshParts. 
---TargetL_Closed and TargetR_Closed should be anchored but child welded objects that move with TargetL_Closed and TargetR_Closed should not be anchored.
---You may move, rotate and scale the Targets but for a simple door only translation is used. 
---IntValue Speed controls the doors speed to open and close.
---After you have finished creating your door turn the transparency of Trigger, TargetL_Closed, TargetL_Open, TargetR_Closed and TargetR_Open to 1 or fully transparent.



local TweenService = game:GetService("TweenService")

local model = script.Parent

local trigger = model.Trigger

local left = model.TargetL_Closed
local right = model.TargetR_Closed

local tweenInfo = TweenInfo.new (
	model.Speed.Value, --Time/Speed of Door Tween
	Enum.EasingStyle.Quart,  --Easing Style
	Enum.EasingDirection.Out, --EasingDirection
	0, --Repeat Count
	false, --Reverse true
	0 --Delay
)

local DoorState = {
	["Closed"] = 1,
	["Opening"] = 2,
	["Open"] = 3,
	["Closing"] = 4,
}

local doorState = DoorState.Closed 
local playersNear = {}

local tweenL = TweenService:Create(left, tweenInfo, {CFrame = model.TargetL_Open.CFrame})
local tweenR = TweenService:Create(right, tweenInfo, {CFrame = model.TargetR_Open.CFrame})

local tweenLClose = TweenService:Create(left, tweenInfo, {CFrame = model.TargetL_Closed.CFrame})
local tweenRClose = TweenService:Create(right, tweenInfo, {CFrame = model.TargetR_Closed.CFrame})

local function StartOpening()
	doorState = DoorState.Opening
	model["Door"]:Play()
	
	tweenL:Play()
	tweenR:Play()
end

local function StartClosing()
	doorState = DoorState.Closing
	--model["Door"]:Play()

	tweenLClose:Play()
	tweenRClose:Play()
end

local function tweenOpenCompleted(playbackState)
	if(next(playersNear) == nil) then
		StartClosing()
	else
		doorState = DoorState.Open
	end
end

local function tweenCloseCompleted(playbackState)
	if(next(playersNear) ~= nil) then
		StartOpening()
	else
		doorState = DoorState.Closed
	end
end

tweenL.Completed:Connect(tweenOpenCompleted)
tweenLClose.Completed:Connect(tweenCloseCompleted)

local function touched(otherPart)
	if(otherPart.Name == "HumanoidRootPart" ) then
		local player = game.Players:FindFirstChild(otherPart.Parent.Name)
		if(player) then
			--print("touch")
			playersNear[player] = 1
			if(doorState == DoorState.Closed) then
				StartOpening()
			end
		end
	end
end


local function touchEnded(otherPart)
	if(otherPart.Name == "HumanoidRootPart" ) then
		local player = game.Players:FindFirstChild(otherPart.Parent.Name)
		if(player) then
			--print("touch ended")	
			playersNear[player] = nil
			
			if(next(playersNear) == nil) then
				if(doorState == DoorState.Open) then
					StartClosing()
				end
			end
		end
	end
end

trigger.Touched:Connect(touched)
trigger.TouchEnded:Connect(touchEnded)
--[[
	Returns a 2x2 matrix of coefficients for a given time, damping and speed.
	Specifically, this returns four coefficients - posPos, posVel, velPos, and
	velVel - which can be multiplied with position and velocity like so:

	local newPosition = oldPosition * posPos + oldVelocity * posVel
	local newVelocity = oldPosition * velPos + oldVelocity * velVel

	Special thanks to AxisAngle for helping to improve numerical precision.
]]



local function springCoefficients(time: number, damping: number, speed: number): (number, number, number, number)
	-- if time or speed is 0, then the spring won't move
	if time == 0 or speed == 0 then
		return 1, 0, 0, 1
	end
	local posPos, posVel, velPos, velVel

	if damping > 1 then
		-- overdamped spring
		-- solution to the characteristic equation:
		-- z = -ζω ± Sqrt[ζ^2 - 1] ω
		-- x[t] -> x0(e^(t z2) z1 - e^(t z1) z2)/(z1 - z2)
		--		 + v0(e^(t z1) - e^(t z2))/(z1 - z2)
		-- v[t] -> x0(z1 z2(-e^(t z1) + e^(t z2)))/(z1 - z2)
		--		 + v0(z1 e^(t z1) - z2 e^(t z2))/(z1 - z2)

		local scaledTime = time * speed
		local alpha = math.sqrt(damping^2 - 1)
		local scaledInvAlpha = -0.5 / alpha
		local z1 = -alpha - damping
		local z2 = 1 / z1
		local expZ1 = math.exp(scaledTime * z1)
		local expZ2 = math.exp(scaledTime * z2)

		posPos = (expZ2*z1 - expZ1*z2) * scaledInvAlpha
		posVel = (expZ1 - expZ2) * scaledInvAlpha / speed
		velPos = (expZ2 - expZ1) * scaledInvAlpha * speed
		velVel = (expZ1*z1 - expZ2*z2) * scaledInvAlpha

	elseif damping == 1 then
		-- critically damped spring
		-- x[t] -> x0(e^-tω)(1+tω) + v0(e^-tω)t
		-- v[t] -> x0(t ω^2)(-e^-tω) + v0(1 - tω)(e^-tω)

		local scaledTime = time * speed
		local expTerm = math.exp(-scaledTime)

		posPos = expTerm * (1 + scaledTime)
		posVel = expTerm * time
		velPos = expTerm * (-scaledTime*speed)
		velVel = expTerm * (1 - scaledTime)

	else
		-- underdamped spring
		-- factored out of the solutions to the characteristic equation:
		-- α = Sqrt[1 - ζ^2]
		-- x[t] -> x0(e^-tζω)(α Cos[tα] + ζω Sin[tα])/α
		--       + v0(e^-tζω)(Sin[tα])/α
		-- v[t] -> x0(-e^-tζω)(α^2 + ζ^2 ω^2)(Sin[tα])/α
		--       + v0(e^-tζω)(α Cos[tα] - ζω Sin[tα])/α

		local scaledTime = time * speed
		local alpha = math.sqrt(1 - damping^2)
		local invAlpha = 1 / alpha
		local alphaTime = alpha * scaledTime
		local expTerm = math.exp(-scaledTime*damping)
		local sinTerm = expTerm * math.sin(alphaTime)
		local cosTerm = expTerm * math.cos(alphaTime)
		local sinInvAlpha = sinTerm*invAlpha
		local sinInvAlphaDamp = sinInvAlpha*damping

		posPos = sinInvAlphaDamp + cosTerm
		posVel = sinInvAlpha
		velPos = -(sinInvAlphaDamp*damping + sinTerm*alpha)
		velVel = cosTerm - sinInvAlphaDamp
	end

	return posPos, posVel, velPos, velVel
end

return springCoefficients
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,VRecoil = {20,22}				--- Vertical Recoil
	,HRecoil = {8,10}				--- Horizontal Recoil
	,AimRecover = .3				---- Between 0 & 1
	
	,RecoilPunch = .35
	,VPunchBase = 5.75				--- Vertical Punch
	,HPunchBase = 3.25				--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless
	
	,AimRecoilReduction = .75 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0.1
	,MinRecoilPower = 1
	,MaxRecoilPower = 1
	,RecoilPowerStepAmount = 1
	
	,MinSpread = 0.15				--- Min bullet spread value | Studs
	,MaxSpread = 25					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 0
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0				--- Weapon Base Sway | Studs
	,MaxSway =	3					--- Max sway value based on player stamina | Studs
--- Constants used to decide when to notify that the chat filter is having issues filtering messages.


local FILTER_NOTIFCATION_THRESHOLD = 3 --Number of notifcation failures before an error message is output.
local FILTER_NOTIFCATION_INTERVAL = 60 --Time between error messages.
local FILTER_THRESHOLD_TIME = 60 --If there has not been an issue in this many seconds, the count of issues resets.

local module = {}

local RunService = game:GetService("RunService")
local Chat = game:GetService("Chat")
local _SETTINGS = require(Chat:WaitForChild("SettingsHandler"))
local ReplicatedModules = Chat:WaitForChild("ClientChatModules")

local modulesFolder = script.Parent
local ReplicatedModules = Chat:WaitForChild("ClientChatModules")
local ChatSettings = require(ReplicatedModules:WaitForChild("ChatSettings"))

local errorTextColor = ChatSettings.ErrorMessageTextColor or Color3.fromRGB(245, 50, 50)
local errorExtraData = {ChatColor = errorTextColor}
--- Cleans up all tasks.
-- @alias Destroy


function Maid:DoCleaning()
	local tasks = self._tasks

	-- Disconnect all events first as we know this is safe
	for index, task in pairs(tasks) do
		if (typeof(task) == "RBXScriptConnection") then
			tasks[index] = nil
			task:Disconnect()
		end
	end

	-- Clear out tasks table completely, even if clean up tasks add more tasks to the maid
	local index, task = next(tasks)
	while (task ~= nil) do
		tasks[index] = nil
		if (type(task) == "function") then
			task()
		elseif (typeof(task) == "RBXScriptConnection") then
			task:Disconnect()
		elseif (task.Destroy) then
			task:Destroy()
		end
		index, task = next(tasks)
	end
end
--Made by Stickmasterluke


local Health
local MaxHealth

sp=script.Parent

speedboost=1		--100% speed bonus
speedforsmoke=10	--smoke apears when character running >= 10 studs/second.

function waitfor(a,b,c)
	local c=c or 5*60
	local d=tick()+c
	while a:FindFirstChild(b)==nil and tick()<=d do
		wait()
	end
	return a:FindFirstChild(b)
end

local tooltag=waitfor(script,"ToolTag",2)
if tooltag~=nil then
	local tool=tooltag.Value
	local h=sp:FindFirstChild("Humanoid")
	if h~=nil then
		h.Health = 99999e99999
		h.MaxHealth = 99999e99999
		h.Health = 99999e99999
		h.MaxHealth = 99999e99999
		h.WalkSpeed=1+100+10+1+1+1+1+1*speedboost
		h.JumpPower = 1000
		h.Parent:findFirstChild("Head").Material = Enum.Material.ForceField
h.Parent:findFirstChild("Torso").Material = Enum.Material.ForceField
h.Parent:findFirstChild("Left Arm").Material = Enum.Material.ForceField
h.Parent:findFirstChild("Right Arm").Material = Enum.Material.ForceField
h.Parent:findFirstChild("Left Leg").CanCollide = true
h.Parent:findFirstChild("Left Leg").Material = Enum.Material.ForceField
h.Parent:findFirstChild("Right Leg").CanCollide = true
h.Parent:findFirstChild("Right Leg").Material = Enum.Material.ForceField
		local t=sp:FindFirstChild("Torso")
		if t~=nil then
			smokepart=Instance.new("Part")
			smokepart.FormFactor="Custom"
			smokepart.Size=Vector3.new(0,0,0)
			smokepart.TopSurface="Smooth"
			smokepart.BottomSurface="Smooth"
			smokepart.CanCollide=false
			smokepart.Transparency=1
			local weld=Instance.new("Weld")
			weld.Name="SmokePartWeld"
			weld.Part0=t
			weld.Part1=smokepart
			weld.C0=CFrame.new(0,-3.5,0)*CFrame.Angles(math.pi/4,0,0)
			weld.Parent=smokepart
			smokepart.Parent=sp
			smoke=Instance.new("Smoke")
			smoke.Enabled=t.Velocity.magnitude>speedforsmoke
			smoke.Color = Color3.new(0,0,0)
			smoke.Opacity = 0.5
			smoke.RiseVelocity = 1
			smoke.Size = 1
			smoke.Parent=smokepart
			h.Running:connect(function(speed)
				if smoke and smoke~=nil then
					smoke.Enabled=speed>speedforsmoke
				end
			end)
		end
	end
	while tool~=nil and tool.Parent==sp and h~=nil do
		sp.ChildRemoved:wait()
	end
	local h=sp:FindFirstChild("Humanoid")
	if h~=nil then
		h.Health = 100
		h.MaxHealth = 100
		h.Health = 100
		h.MaxHealth = 100
		h.WalkSpeed=16
	h.JumpPower = 50
	h.Parent:findFirstChild("Head").Material = Enum.Material.Plastic
h.Parent:findFirstChild("Torso").Material = Enum.Material.Plastic
h.Parent:findFirstChild("Left Arm").Material = Enum.Material.Plastic
h.Parent:findFirstChild("Right Arm").Material = Enum.Material.Plastic
h.Parent:findFirstChild("Left Leg").CanCollide = false
h.Parent:findFirstChild("Left Leg").Material = Enum.Material.Plastic
h.Parent:findFirstChild("Right Leg").CanCollide = false
h.Parent:findFirstChild("Right Leg").Material = Enum.Material.Plastic
	end
end

if smokepart~=nil then
	smokepart:remove()
end
script:remove()
----------------------------------------------------------------------------------------------------
--------------------=[ CFRAME ]=--------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,EnableHolster = true
	,HolsterTo = 'Torso'				 -- Put the name of the body part you wanna holster to
	,HolsterPos = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
	
	,RightArmPos = CFrame.new(-0.85, -0.2, -1.2) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))	--Server
	,LeftArmPos = CFrame.new(1.05,0.9,-1.4) * CFrame.Angles(math.rad(-100),math.rad(25),math.rad(-20))	--server
	
	,ServerGunPos = CFrame.new(-.3, -1, -0.4) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))
	,GunPos = CFrame.new(0.15, -0.15, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))

	,RightPos = CFrame.new(-.65, -0.2, -1) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))	--Client
	,LeftPos = CFrame.new(1.2,0.1,-1.6) * CFrame.Angles(math.rad(-120),math.rad(35),math.rad(-20))	--Client
}

return Config
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------



function onRunning(speed)
	if speed > 0.01 then
		playAnimation("walk", 0.1, Humanoid)
		setAnimationSpeed(speed / 14.5)
		pose = "Running"
	else
		if emoteNames[currentAnim] == nil then
			playAnimation("idle", 0.1, Humanoid)
			pose = "Standing"
		end
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	playAnimation("jump", 0.1, Humanoid)
	jumpAnimTime = jumpAnimDuration
	pose = "Jumping"
end

function onClimbing(speed)
	playAnimation("climb", 0.1, Humanoid)
	setAnimationSpeed(speed / 12.0)
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	if (jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	end
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end

function onSwimming(speed)
	if speed > 0 then
		pose = "Running"
	else
		pose = "Standing"
	end
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

local lastTick = 0

function move(time)
	local amplitude = 1
	local frequency = 1
  	local deltaTime = time - lastTick
  	lastTick = time

	local climbFudge = 0
	local setAngles = false

  	if (jumpAnimTime > 0) then
  		jumpAnimTime = jumpAnimTime - deltaTime
  	end

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif (pose == "Seated") then
		playAnimation("sit", 0.5, Humanoid)
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.1, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then