Roblox/luau_corpus huggingface dataset:
--[[
INSTRUCTIONS: 
Set both of the rings into the Workspace with the same Parent (ie. if you group one with anything, 
be sure to put the other in the same group).

-- Ganondude
--]]

modelname = (script.Parent.Parent.Destination.Value)

function onTouched(part)
	if part.Parent ~= nil then
	local h = part.Parent:findFirstChild("Humanoid")
		if h~=nil then
			local teleportfrom=script.Parent.Enabled.Value
			if teleportfrom~=0 then
				if h==humanoid and script.Parent.Enabled==1 then
				return
				end
				local teleportto=script.Parent.Parent.Parent:findFirstChild(modelname).Button
				if teleportto~=nil then
					local torso = h.Parent.Torso
					local location = {teleportto.Position}
					local i = 1
					
					local x = location[i].x
					local y = location[i].y + 2
					local z = location[i].z
					
					x = x + math.random(-2, 2)
					z = z + math.random(-2, 2)
					y = y + math.random(2, 3)
					
					local cf = torso.CFrame
					local lx = 0
					local ly = y
					local lz = 0
					
					script.Parent.Enabled.Value=0
					teleportto.Enabled.Value=0
					teleportto.RingScript.Disabled = true
					teleportto.TeleportScript.Disabled = true
					wait(3)
					torso.CFrame = CFrame.new(Vector3.new(x,y,z), Vector3.new(lx,ly,lz))
					wait(3)
					script.Parent.Enabled.Value=1
					teleportto.Enabled.Value=1
					teleportto.RingScript.Disabled = false
					teleportto.TeleportScript.Disabled = false
				else
					print("Could not find teleporter!")
				end
			end
		end
	end
end

script.Parent.Touched:connect(onTouched)
--[=[
	Converts a GuiObject into a Rect.

	For convenience, a Rect can also be passed in and will be returned. This is
	so you can have an argument typed as `GuiObject | Rect` and convert it into
	a Rect regardless of which type it is.

	@private
	@within CollisionMatchers2D
]=]
local function toRect(instanceOrRect: GuiObject | Rect)
	local typeOf = typeof(instanceOrRect)
	if typeOf == "Rect" then
		return instanceOrRect
	elseif typeOf == "Instance" then
		return Rect.new(instanceOrRect.AbsolutePosition, instanceOrRect.AbsolutePosition + instanceOrRect.AbsoluteSize)
	end
end

return toRect
-- Local Variables
local Tool = script.Parent
local Buffer = {}
local Configurations = Tool:WaitForChild('Configuration')
local Storage = Configurations:WaitForChild('StorageFolder').Value
local Player = game.Players.LocalPlayer
local RocketManager = require(script:WaitForChild('RocketManager'))
local Handle = Tool.Handle
local Neck, Shoulder, OldNeckC0, OldShoulderC0
local OldMouseIcon
local Mouse = Player:GetMouse()
local AutoRotate = false
local CanFire = true
-- Mesma coisa soque pra retirar a speed caso tirar dedo do botão
Mouse.KeyUp:connect(function(key)
	key = string.lower(key)
	if string.byte(key) == 48 then
		if Debounce == true then
			Debounce = false
			C.Humanoid.WalkSpeed = 16
			for i=1,10 do
				game.Workspace.CurrentCamera.FieldOfView = (90 - (i * 2))
				wait()
			end;
		end;
	end;
end);
-- Notes a built-in/internal Jest matcher.
-- Jest may override the stack trace of Errors thrown by internal matchers.
local INTERNAL_MATCHER_FLAG = Symbol.for_("$$jest-internal-matcher")

if not _G[JEST_MATCHERS_OBJECT] then
	local defaultState = {
		assertionCalls = 0,
		expectedAssertionsNumber = nil, -- doesn't have significance in Lua but kept for translation
		isExpectingAssertions = false,
		suppressedErrors = {},
	}

	_G[JEST_MATCHERS_OBJECT] = {
		matchers = {},
		state = defaultState,
	}
end
--//Setup//--
local Trigger = script.Parent

local SpawnEvent = game.ReplicatedStorage:WaitForChild("SpawnEvent")
local SpawnPoint = Trigger.Parent.CrateSpawnAttachment
--local freeSpaceX,freeSpaceY,freeSpaceZ = 3,3,2.8
local freeSpace = Vector3.new(3,2.8,3)
local box = script.Parent
local contents = box.Contents

local lidOffset = 3 

function r(num)
return math.random(-math.abs(num*100),math.abs(num*100))/100
end

box.Base.Touched:connect(function(oldHit)

if (oldHit:FindFirstChild("Draggable") and oldHit:FindFirstChild("Pickup")) or
(oldHit.Parent and (oldHit.Parent:FindFirstChild("Draggable") and oldHit.Parent:FindFirstChild("Pickup")))
then
local hit
if oldHit.Parent:IsA("Model") and oldHit.Parent ~= workspace then
hit = oldHit.Parent:Clone()
oldHit.Parent:Destroy()
elseif oldHit.Parent == workspace then
hit = oldHit:Clone()
oldHit:Destroy()
end


hit.Draggable:Destroy()

if hit:IsA("BasePart") then
hit.Anchored = true
hit.CanCollide = false
local vary = freeSpace-hit.Size
--[[Transmission]]
	Tune.TransModes		= {"Auto", "Semi", "Manual"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
	
	--Gear Ratios
	Tune.FinalDrive		= 0.20			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.70		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		2.89		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		1.99		,
		--[[ 3 ]]		1.51		,
		--[[ 4 ]]		1.20		,
		--[[ 5 ]]		1.00		,
		--[[ 6 ]]		0.85        ,
		--[[ 7 ]]       0.74		,
		
	}
	Tune.FDMult			= 10.0			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- Puts players into an active players table and runs readyPlayer for each player in that table
function PlayerManager.preparePlayers()
	-- Get all spawn locations in the folder
	local map = mapManager.getMap()
	if not map then return end
	
	local spawnLocations = mapManager.getSpawnLocations()
	if not spawnLocations then return end
	
	local availableSpawnPoints = spawnLocations:GetChildren()
	
	-- Get active players
	local players = Players:GetChildren()
	
	-- For every active player, load them into a table, and ready them with everything needed for gameplay (tools, listeners, spawn)
	for playerKey, whichPlayer in pairs(players) do
		table.insert(activePlayers,whichPlayer)

		-- Gets a spawn location and then removes it from the table so the next player gets the next spawn
		local spawnLocation = availableSpawnPoints[1]
		table.remove(availableSpawnPoints, 1)
		readyPlayer(whichPlayer, spawnLocation)
		
		-- Set player walkspeed
		local character = whichPlayer.Character
		local humanoid = character:FindFirstChild("Humanoid")
		if humanoid then
			humanoid.WalkSpeed = gameSettings.roundWalkSpeed
		end
	end

	-- Bind destroy action
	actionManager:BindGameActions(players)
	
	-- Update the value so the starting players can be displayed on the GUI
	playersLeft.Value = #activePlayers

end
-- Decompiled with the Synapse X Luau decompiler.

local v1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
while not v1.Loaded do
	game:GetService("RunService").Heartbeat:Wait();
end;

local v84 = Instance.new("BlurEffect", game:GetService("Lighting"));
v84.Size = 0;
v84.Enabled = false;

local l__StarterGui__2 = v1.StarterGui;
task.wait();
l__StarterGui__2:SetCoreGuiEnabled("Health", false);
l__StarterGui__2:SetCoreGuiEnabled("Backpack", false);
l__StarterGui__2:SetCoreGuiEnabled("EmotesMenu", false);
l__StarterGui__2.ResetPlayerGuiOnSpawn = false;
l__StarterGui__2:SetCore("ResetButtonCallback", false);
game:GetService("Chat"):SetBubbleChatSettings({
	BackgroundColor3 = Color3.fromRGB(255, 255, 255), 
	TextColor3 = Color3.fromRGB(30, 30, 30), 
	TextSize = 18, 
	Font = Enum.Font.GothamBold, 
	BubbleDuration = 10
});
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 5 -- cooldown for use of the tool again

ZoneModelName = "HATE" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- Update the camera without tweening:
local function Update()
	local camRotation = GetCameraRotation()
	cam.CFrame = GetViewCFrame(currentView, camRotation)
end
--local Text = thirstGui:WaitForChild("Back"):WaitForchild("Text")
local plr = game.Players.LocalPlayer

repeat wait() until plr.Character -- waiting for player to load

local UIS = game:GetService("UserInputService")
local hum = plr.Character:WaitForChild("Humanoid")
local maxThirst = 100
local maxHunger = 100
local thirstValue
local hungerValue

if plr:FindFirstChild("HungerVal") then
	hungerValue = plr.HungerVal
	hungerValue.Value = maxHunger
else
	Instance.new("IntValue", plr).Name = "HungerVal"
	plr.HungerVal.Value = maxHunger
	hungerValue = plr.HungerVal
end

if plr:FindFirstChild("ThirstVal") then
	thirstValue = plr.ThirstVal
	thirstValue.Value = maxThirst
else
	Instance.new("IntValue", plr).Name = "ThirstVal"
	plr.ThirstVal.Value = maxThirst
	thirstValue = plr.ThirstVal
end

local hungerValue = plr:WaitForChild("HungerVal")
local Frame = thirstGui.Frame

local TS = game:GetService("TweenService")

thirstValue.Changed:connect(function()



	if thirstValue.Value > 60 then
		TS:Create(Frame.Sede,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3 = Color3.fromRGB(255,255,255),ImageTransparency = 1}):Play()
	elseif thirstValue.Value <= 0 then
		MedicSys.Fome:FireServer()
		print("pls drink")
	elseif thirstValue.Value <= 30 then
		TS:Create(Frame.Sede,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3 = Color3.fromRGB(255,((thirstValue.Value/30)*255),((thirstValue.Value/60)*255)),ImageTransparency = 0.5}):Play()
	elseif thirstValue.Value <= 60 then
		TS:Create(Frame.Sede,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3 = Color3.fromRGB(255,255,((thirstValue.Value/60)*255)),ImageTransparency = 0.5}):Play()
	end
end)


hungerValue.Changed:connect(function()

	if hungerValue.Value > 60 then
		TS:Create(Frame.Fome,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3 = Color3.fromRGB(255,255,255),ImageTransparency = 1}):Play()
	elseif hungerValue.Value <= 0 then
		MedicSys.Fome:FireServer()
		print("pls food")
	elseif hungerValue.Value <= 30 then
		TS:Create(Frame.Fome,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3 = Color3.fromRGB(255,((hungerValue.Value/30)*255),((hungerValue.Value/60)*255)),ImageTransparency = 0.5}):Play()
	elseif hungerValue.Value <= 60 then
		TS:Create(Frame.Fome,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3 = Color3.fromRGB(255,255,((hungerValue.Value/60)*255)),ImageTransparency = 0.5}):Play()
	end
end)


while wait(ServerConfig.HungerWaitTime) do

	if thirstValue.Value - 1 >= 0 then
		thirstValue.Value = thirstValue.Value - 1
	end

	if hungerValue.Value - 1 >= 0 then
		hungerValue.Value = hungerValue.Value - 1
	end
	
end
-- ONLY SUPPORTS ORDINAL TABLES (ARRAYS). Allocates a new table by getting the length of the current table and increasing its capacity by the specified amount.
-- This uses Roblox's table.create function.
Table.expand = function (tbl, byAmount)
	if byAmount < 0 then
		error("Cannot expand a table by a negative amount of objects.")
	end

	local newtbl = table.create(#tbl + byAmount)
	for i = 1, #tbl do
		newtbl[i] = tbl[i]
	end
	return newtbl
end

return Table
-- Decompiled with the Synapse X Luau decompiler.

local l__MarketplaceService__1 = game:GetService("MarketplaceService");
return function(p1, p2)
	p2 = p2 or Enum.InfoType.Product;
	local u2 = 999;
	pcall(function()
		u2 = l__MarketplaceService__1:GetProductInfo(p1, p2).PriceInRobux;
	end);
	return 999;
end;
-- Compiled with roblox-ts v1.3.3
--[[
	*
	* Take a single variable of type T and store as 'payload'
]]
local function payload(_example)
	return function(payload)
		return {
			payload = payload,
		}
	end
end
return {
	payload = payload,
}
--[[
	    ___      _______                _       _______
	   / _ |____/ ___/ /  ___ ____ ___ (_)__   /__  __/
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<     / /
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/	/_/   
						SecondLogic @ Inspare
						Avxnturador @ Novena
]]
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local BOVact = 0
local BOVact2 = 0

local BOV_Loudness = 5	--volume of the BOV (not exact volume so you kinda have to experiment with it)
local BOV_Pitch = 0.9	--max pitch of the BOV (not exact so might have to mess with it)
local TurboLoudness = 2 --volume of the Turbo (not exact volume so you kinda have to experiment with it also)

script:WaitForChild("Whistle")
script:WaitForChild("BOV")

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then
		for i,v in pairs(car.DriveSeat:GetChildren()) do
			for _,a in pairs(script:GetChildren()) do
				if v.Name==a.Name then v:Stop() wait() v:Destroy() end
			end
		end
	end
end)

handler:FireServer("newSound","Whistle",car.DriveSeat,script.Whistle.SoundId,0,script.Whistle.Volume,true)
handler:FireServer("newSound","BOV",car.DriveSeat,script.BOV.SoundId,0,script.BOV.Volume,true)
handler:FireServer("playSound","Whistle")
car.DriveSeat:WaitForChild("Whistle")
car.DriveSeat:WaitForChild("BOV")
local ticc = tick()
local _TCount = 0
if _Tune.Aspiration == "Single" then _TCount = 1 elseif _Tune.Aspiration == "Double" then _TCount = 2 end

while wait() do
	local psi = (((script.Parent.Values.Boost.Value)/(_Tune.Boost*_TCount))*2)
	
	BOVact = math.floor(psi*20)
	WP = (psi)
	WV = (psi/4)*TurboLoudness
	
	BP = (1-(-psi/20))*BOV_Pitch
	BV = (((-0.5+((psi/2)*BOV_Loudness)))*(1 - script.Parent.Values.Throttle.Value))

	if BOVact < BOVact2 then if car.DriveSeat.BOV.IsPaused then if FE then handler:FireServer("playSound","BOV") else car.DriveSeat.BOV:Play() end end end
	if BOVact >= BOVact2 then if FE then handler:FireServer("stopSound","BOV") else car.DriveSeat.BOV:Stop() end end
	
	if FE then
		handler:FireServer("updateSound","Whistle",script.Whistle.SoundId,WP,WV)
		handler:FireServer("updateSound","BOV",script.BOV.SoundId,BP,BV)
	else
		car.DriveSeat.Whistle.Pitch = WP
		car.DriveSeat.Whistle.Volume = WV
		car.DriveSeat.BOV.Pitch = BP
		car.DriveSeat.BOV.Volume = BV
	end
	if (tick()-ticc) >= 0.1 then
		BOVact2 = math.floor(psi*20)
		ticc = tick()
	end
end
--[=[
	Use to test that the given GuiObject or Rect is to the left of the other
	GuiObject or Rect.

	The last argument is optional. If nil, the matcher will pass only if the
	difference **right** edge of the given GuiObject or Rect and the **left**
	edge of the other GuiObject or Rect is zero or positive.

	Usage:

	```lua
	expect(a).toBeLeftOf(b) -- Jest
	expect(a).to.be.leftOf(b) -- TestEZ
	```

	![Example of leftOf(a, b)](/leftOf(a,%20b).png)

	```lua
	expect(a).toBeLeftOf(b, 5) -- Jest
	expect(a).to.be.leftOf(b, 5) -- TestEZ
	```

	![Example of leftOf(a, b, 5)](/leftOf(a,%20b,%205).png)

	```lua
	expect(a).toBeLeftOf(b, NumberRange.new(0, 5)) -- Jest
	expect(a).to.be.leftOf(b, NumberRange.new(0, 5)) -- TestEZ
	```

	![Example of leftOf(a, b, NumberRange.new(0, 5))](/leftOf(a,%20b,%20NumberRange.new(0,%205)).png)

	@tag outside
	@within CollisionMatchers2D
]=]
local function leftOf(a: GuiObject | Rect, b: GuiObject | Rect, distance: number | NumberRange)
	local aRect = toRect(a)
	local bRect = toRect(b)

	local distanceFromSide = -(aRect.Max - bRect.Min)
	if distance then
		if typeof(distance) == "number" then
			distance = NumberRange.new(distance)
		end

		return returnValue(
			distance.Min <= distanceFromSide.X and distance.Max >= distanceFromSide.X,
			"Was within range",
			"Was not within range ( " .. tostring(distance) .. ")"
		)
	else
		return returnValue(distanceFromSide.X >= 0, "Was not right of the element", "Was to the right of the element")
	end
end

return leftOf
---[[ Chat Behaviour Settings ]]
module.WindowDraggable = false
module.WindowResizable = true
module.ShowChannelsBar = false
module.GamepadNavigationEnabled = false
module.ShowUserOwnFilteredMessage = true	--Show a user the filtered version of their message rather than the original.
-- extract sanitized pitch from a CFrame rotation
local function getPitch(cf)
	local pitch = cf:toEulerAnglesYXZ()
	return sanitizeAngle(pitch)
end
--Only touch if you need to change the length of wait for a song.

print 'Loading RMP 1.0'
while (true) do
	print 'Playing Sound 1'
music.SoundId = song1 

music:play()
wait(130) 
	--2--
	print 'Playing Sound 2'
music.SoundId = song2
music:play() 
wait(130)
	--3--
	print 'Playing Sound 3'
music.SoundId = song3
music:play() 
wait(130)
	--4--
	print 'Playing Sound 4'
music.SoundId = song4
music:play() 
wait(130)
	--5--
		print 'Playing Sound 5'
music.SoundId = song5
music:play() 
wait(130)
	--6--
	print 'Playing Sound 6'
music.SoundId = song6
music:play() 
wait(130)
	--7--
	print 'Playing Sound 7'
music.SoundId = song7
music:play() 
wait(130)
	--8--
	print 'Playing Sound 8'
music.SoundId = song8
music:play() 
wait(130)
	--9--
	print 'Playing Sound 9'
music.SoundId = song9
music:play() 
wait(130)
	--10--
	print 'Playing Sound 10'
music.SoundId = song10
music:play() 
wait(130)
	--11--
	print 'Playing Sound 11'
music.SoundId = song11
music:play() 
wait(130)
--- Fire the event with the given arguments. All handlers will be invoked. Handlers follow
-- Roblox signal conventions.
-- @param ... Variable arguments to pass to handler
-- @treturn nil
function Signal:Fire(...)
	self._argData = {...}
	self._argCount = select("#", ...)
	self._bindableEvent:Fire()
	self._argData = nil
	self._argCount = nil
end
-- Takes an array of instances and returns (array<names>, array<instances>)
local function transformInstanceSet(instances)
	local names = {}

	for i = 1, #instances do
		names[i] = instances[i].Name
	end

	return names, instances
end
-- Services --
local RunService = game:GetService('RunService')
local Players = game:GetService('Players')
local UserInputService = game:GetService('UserInputService')
--[[**
	Encodes a string in Base64.
	@param [string] Input The input string to encode.
	@returns [string] The string encoded in Base64.
**--]]
function Base64:Encode(Input)
	local Output = {}
	local Length = 0

	for Index = 1, #Input, 3 do
		local C1, C2, C3 = string.byte(Input, Index, Index + 2)

		local A = bit32_rshift(C1, 2)
		local B = bit32_lshift(bit32_band(C1, 3), 4) + bit32_rshift(C2 or 0, 4)
		local C = bit32_lshift(bit32_band(C2 or 0, 15), 2) + bit32_rshift(C3 or 0, 6)
		local D = bit32_band(C3 or 0, 63)

		Output[Length + 1] = Alphabet[A + 1]
		Output[Length + 2] = Alphabet[B + 1]
		Output[Length + 3] = C2 and Alphabet[C + 1] or 61
		Output[Length + 4] = C3 and Alphabet[D + 1] or 61
		Length = Length + 4
	end

	local NewOutput = {}
	local NewLength = 0

	for Index = 1, Length, 4096 do
		NewLength = NewLength + 1
		NewOutput[NewLength] = string.char(table.unpack(Output, Index, math.min(Index + 4096 - 1, Length)))
	end

	return table.concat(NewOutput)
end
-- ROBLOX deviation: Lua doesn't allow fields on functions, and we haven't implemented callable tables as "function" components
export type React_StatelessFunctionalComponent<Props> = (
	props: Props,
	context: any
) -> React_Node
export type React_ComponentType<Config> = React_AbstractComponent<Config, any>

export type React_ElementType = string | React_AbstractComponent<any, any>
--//mobile
ui.InputBegan:Connect(function(iu)
	if iu.UserInputType == Enum.UserInputType.Touch then
		f:TweenPosition(UDim2.new(0.375, 0, 0.007, 0), "InOut", "Sine", 0.1)
	end
end)
ui.InputEnded:Connect(function(iu)
	f:TweenPosition(UDim2.new(0.375, 0, -1, 0), "InOut", "Sine", 0.1)
end)
-- Override in derived classes to set self.enabled and return boolean indicating
-- whether Enable/Disable was successful. Return true if controller is already in the requested state.
function BaseCharacterController:Enable(enable)
	error("BaseCharacterController:Enable must be overridden in derived classes and should not be called.")
	return false
end

return BaseCharacterController
-- Tips
local tipFrame = Instance.new("Frame")
tipFrame.Name = "TipFrame"
tipFrame.BorderSizePixel = 0
tipFrame.AnchorPoint = Vector2.new(0, 0)
tipFrame.Position = UDim2.new(0,50,0,50)
tipFrame.Size = UDim2.new(1,0,1,-8)
tipFrame.ZIndex = 40
tipFrame.Parent = iconContainer
tipFrame.Active = false

local tipCorner = Instance.new("UICorner")
tipCorner.Name = "TipCorner"
tipCorner.CornerRadius = UDim.new(0.25,0)
tipCorner.Parent = tipFrame

local tipLabel = Instance.new("TextLabel")
tipLabel.Name = "TipLabel"
tipLabel.BackgroundTransparency = 1
tipLabel.TextScaled = false
tipLabel.TextSize = 12
tipLabel.Position = UDim2.new(0,3,0,3)
tipLabel.Size = UDim2.new(1,-6,1,-6)
tipLabel.ZIndex = 41
tipLabel.RichText = true
tipLabel.Parent = tipFrame
tipLabel.Active = false
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

function onSwimming(speed)
	if userAnimateScaleRun then
		speed /= getHeightScale()
	end
	if speed > 1.00 then
		local scale = 10.0
		playAnimation("swim", 0.4, Humanoid)
		setAnimationSpeed(speed / scale)
		pose = "Swimming"
	else
		playAnimation("swimidle", 0.4, Humanoid)
		pose = "Standing"
	end
end

function animateTool()
	if (toolAnim == "None") then
		playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
		return
	end

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end
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

local lastTick = 0

function stepAnimate(currentTime)
	local amplitude = 1
	local frequency = 1
	local deltaTime = currentTime - lastTick
	lastTick = currentTime

	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.2, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

	-- Tool Animation handling
	local tool = Character:FindFirstChildOfClass("Tool")
	if tool and tool:FindFirstChild("Handle") then
		local animStringValueObject = getToolAnim(tool)

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

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

		animateTool()		
	else
		stopToolAnimations()
		toolAnim = "None"
		toolAnimInstance = nil
		toolAnimTime = 0
	end
end