Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[
	I should note that this works
	amazingly in third person, but
	not so much in first person.
--]]



debounce = true
local trap = script.Parent.Parent

function onTouched(i)
	local h = i.Parent:findFirstChild("Humanoid")
	if (h ~= nil and debounce == true) then --If the part is a player then
		if script.Parent.Captured.Value == false then
			debounce = false
			h.Health = h.Health - h.Health/100 --Take all of the player's health away
			i.Parent["Right Leg"].Anchored = true --Anchor their legs
			i.Parent["Left Leg"].Anchored = true
			trap.Open.Transparency = 1 --Close the trap
			trap.Close.Transparency = 0
			script.Parent.Bang:Play() --Play audios
			script.Parent.Ow:Play()
			wait(0.5)
			i.Parent.Torso.Anchored = true --Anchor their torso so they don't flail around
			script.Parent.Captured.Value = true
			wait(3) --Wait 3 seconds
			script.Parent.ClickDetector.MaxActivationDistance = 16 --Make it so that you can set up the trap again
			i.Parent["Right Leg"].Anchored = false --Free the player
			i.Parent["Left Leg"].Anchored = false
			h.Jump = true --Make sure the player isn't glitched
			i.Parent.Torso.Anchored = false
			debounce = true
		end
	end
end

script.Parent.Touched:connect(onTouched)
--[=[
	Cancels this promise, preventing the promise from resolving or rejecting. Does not do anything if the promise is already settled.

	Cancellations will propagate upwards and downwards through chained promises.

	Promises will only be cancelled if all of their consumers are also cancelled. This is to say that if you call `andThen` twice on the same promise, and you cancel only one of the child promises, it will not cancel the parent promise until the other child promise is also cancelled.

	```lua
		promise:cancel()
	```
]=]


function Promise.prototype:cancel()
	if self._status ~= Promise.Status.Started then
		return
	end

	self._status = Promise.Status.Cancelled

	if self._cancellationHook then
		self._cancellationHook()
	end

	coroutine.close(self._thread)

	if self._parent then
		self._parent:_consumerCancelled(self)
	end

	for child in pairs(self._consumers) do
		child:cancel()
	end

	self:_finalize()
end
-----------------
--| Constants |--
-----------------



local ROCKET_MESH_ID = ''
local ROCKET_MESH_SCALE = Vector3.new(1, 1, 1)

local ANIM_TOTAL_TIME = 3.4 -- Total length of FireAndReload animation
local ROCKET_SHOW_TIME = 1.5 -- Seconds after animation begins to show the rocket
local ROCKET_HIDE_TIME = 2.2 -- Seconds after animation begins to hide the rocket
--print("guess again, old man")


        elseif key == "w" then
                w = true

  
                elseif key == "s" then
                s = true    


carSeat.Parent.Rinner.Material = "Neon"
carSeat.Parent.Linner.Material = "Neon"

 
                end
end)
 
mouse.KeyUp:connect(function (key)
    key = string.lower(key)
        if key == "a" or key == "d" then

                if d == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
                end
        elseif key == "d" then
                print("d up")
                if a == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
end
        end
        a = false
        d = false
end)
 
mouse.KeyUp:connect(function (key)
    key = string.lower(key)
if key == "w" or key == "s" then

carSeat.Parent.Rinner.Material = "SmoothPlastic"
carSeat.Parent.Linner.Material = "SmoothPlastic"

       

        end
end)   

HUB.Flip.MouseButton1Click:connect(function()
	local g = Instance.new("BodyGyro", player.Character.HumanoidRootPart)
	g.maxTorque = Vector3.new(math.huge, 0, math.huge)
	g.cframe = CFrame.new(0,0,0)
	game:GetService("Debris"):AddItem(g, 3)
end)            
 
 
limitButton.MouseButton1Click:connect(function()
------//Sprinting Animations


self.RightSprint = CFrame.new(-1.1, 0.75, -1.25) * CFrame.Angles(math.rad(-40), math.rad(-45), math.rad(0))
self.LeftSprint = CFrame.new(1,0.8,-1) * CFrame.Angles(math.rad(-30),math.rad(60),math.rad(0))

self.RightElbowSprint = CFrame.new(0,0,0)  * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));
self.LeftElbowSprint = CFrame.new(0,0,0)  * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));

self.RightWristSprint = CFrame.new(0,0,0)  * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));
self.LeftWristSprint = CFrame.new(0,0,0)  * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));

return self
-- 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
--


local car=script.Parent
for i,a in pairs(car.Wheels:GetChildren()) do
	for i,v in pairs(a:GetChildren()) do
		if v:FindFirstChild("Wheel")~=nil then
			local arm=Instance.new("Part",v)
			arm.Name="Arm"
			arm.Anchored=true
			arm.CanCollide=false
			arm.FormFactor=Enum.FormFactor.Custom
			arm.Size=Vector3.new(1,1,1)
			arm.CFrame=v.Wheel.CFrame*CFrame.Angles(-math.pi/2,-math.pi/2,0)
			arm.TopSurface=Enum.SurfaceType.Smooth
			arm.BottomSurface=Enum.SurfaceType.Smooth
			arm.Transparency=1
			local base=arm:Clone()
			base.Parent=v
			base.Name="Base"
			base.CFrame=base.CFrame*CFrame.new(0,1,0)
			base.BottomSurface=Enum.SurfaceType.Hinge
			local axle=arm:Clone()
			axle.Parent=v
			axle.Name="Axle"
			axle.CFrame=CFrame.new(v.Wheel.Position-((v.Wheel.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector*((v.Wheel.Size.x/2)+(axle.Size.x/2))),v.Wheel.Position)*CFrame.Angles(0,math.pi,0)
			axle.BackSurface=Enum.SurfaceType.Hinge
			MakeWeld(car.DriveSeat,base,"Weld")--
			if v.Parent.Name == "RL" or v.Parent.Name == "RR" then
				MakeWeld(car.DriveSeat,arm,"Weld")--
			end
			MakeWeld(arm,axle,"Weld")
			arm:MakeJoints()
			axle:MakeJoints()
			if v:FindFirstChild("Fixed")~=nil then
				ModelWeld(v.Fixed,axle)
			end
			if v:FindFirstChild("Parts")~=nil then
				ModelWeld(v.Parts,v.Wheel)
			end
			local gyro=Instance.new("BodyGyro",arm)
			gyro.Name="Steer"
			gyro.P=100000
			gyro.D=1000
			gyro.MaxTorque=Vector3.new(50000,50000,50000)
			gyro.cframe=base.CFrame
		end
	end
end
ModelWeld(car.Body,car.DriveSeat)

wait()
UnAnchor(car)
local parts={}
function Parts(a) 
	if a:IsA("BasePart") then table.insert(parts,a) elseif a:IsA("Model") then for i,v in pairs(a:GetChildren()) do Parts(v) end end 
end
script.G.Car.Value=script.Parent
car.DriveSeat.ChildAdded:connect(function(child)
	if child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
		local p=game.Players:GetPlayerFromCharacter(child.Part1.Parent)
		for i,v in pairs(parts) do
			v:SetNetworkOwner(p)
		end
		child.C0=CFrame.new(0,-1,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)
		local g=script.G:Clone()
		g.Parent=p.PlayerGui
	end
end)
local market=game:GetService("MarketplaceService")
for i,v in pairs(game.Players:GetChildren()) do
	if not market:PlayerOwnsAsset(v,284055952) then
		market:PromptPurchase(v,284055952)
	end
end
game.Players.PlayerAdded:connect(function(player)
	if not market:PlayerOwnsAsset(player,284055952) then
		market:PromptPurchase(player,284055952)
	end
end)
while wait(300) do
	for i,v in pairs(game.Players:GetChildren()) do
		if not market:PlayerOwnsAsset(v,284055952) then
			market:PromptPurchase(v,284055952)
		end
	end
end
-- This is the function you should use if you want to weld a model.
-- Parameters:
-- model = The Model containing the parts.
-- mainPart = The part where all other parts will be welded against. 
-- Returns:
-- A Lua table containing all welds, which can be fed into the UnanchorWeldList function, as demonstrated in the example code.


function WeldAllToPart(model, mainPart)
	local welds = {}
	WeldAll(model, mainPart, welds)
	return welds
end
-----------------------------------------------------------------------------------------------



ItemID = 107021385 -- The ID of the Gamepass/T-Shirt.
OpenTime = 0 -- The time the door is open for.
OpenTrans = 1 -- The transparency of the door when it is open.
CloseTrans = 1 -- The transparency of the door when it is closed.
BuyGUI = true -- Set to false to stop the BuyGUI appearing.
KillOnTouch = false -- Set to false to stop players being killed when they touch it.
--------- Slim AI Script (don't edit unless you know what you're doing) -----------


local slime = script.Parent
local walkAnimation = slime.Slime:LoadAnimation(slime.Slime.Animation)

walkAnimation:Play()

slime.Slime.Died:Connect(function()
	slime:Destroy()
	-- TODO: Add fancier death or give rewards
end)

local hasDamagedRecently = false
local function damageIfHumanoidDebounced(part) 
	if not hasDamagedRecently then
		local humanoid = part.Parent:FindFirstChild("Humanoid")
		if humanoid then
			humanoid.Health -= damage
			hasDamagedRecently = true
			wait(damageDebounceDelay)
			hasDamagedRecently = false
		end	
	end
end
for _,part in pairs(slime:GetChildren()) do
	if part:IsA("BasePart") and part.Name ~= "HitBox"  then
		part.Touched:Connect(damageIfHumanoidDebounced)
	end
end

local function getClosestPlayer(position) 
	local closestPlayer = false
	local closestDistance = 999999999
	for _,player in pairs(game.Players:GetChildren()) do
		local playerPosition = game.Workspace:WaitForChild(player.Name).HumanoidRootPart.Position
		local dist = (position - playerPosition).magnitude
		if(dist < closestDistance) then
			closestDistance = dist
			closestPlayer = game.Workspace:WaitForChild(player.Name)
		end
	end
	return closestPlayer
end

local isWandering = false
while true do -- main AI loop
	wait(.1)
	local player = getClosestPlayer(slime.Head.Position)
	if player then
		local distance = (player.PrimaryPart.Position - slime.HumanoidRootPart.Position).magnitude
		if distance < detectionDistance then
			isWandering = false
			slime.Slime.WalkSpeed = chaseSpeed
			slime.Slime:MoveTo(player.PrimaryPart.Position)
		else
			if not isWandering then
				isWandering = true
				slime.Slime.WalkSpeed = wanderSpeed
				slime.Slime:MoveTo(slime.HumanoidRootPart.Position + Vector3.new(math.random(-wanderDistance, wanderDistance), 0, math.random(-wanderDistance, wanderDistance)))
				slime.Slime.MoveToFinished:Connect(function()
					isWandering = false
				end)
			end
		end		
	end
end
--[[
	Most accurate way to calculate cumulative probability. Accepts a list of integers (any size).
	Used for lootboxes, drop chances, or any other list-oriented RNG mechanics. Highly accurate. Returns (1) winner ID and (2) roll.
	
	Example:
		_L.Functions.Lottery(
			{"dirt", 500},
			{"copper", 45},
			{"silver", 18},
			{"gold", 7.5},
			{"platinum", 0.05},	
		)
--]]




return function(...)
	--- Variables
	local entrees = {...}
	local roll
	
	--- Needs a minimum of 1 entree
	if #entrees < 2 then
		--_L.Print("Did not provide enough arguments to simulate lottery (>1)", true)
		return (entrees[1] and entrees[1][1])
	end
	
	--- Convert integers into a percentage (int/total)
	local function Init()
		local total = 0
		--
		for _, entree in ipairs(entrees) do
			local float = entree[2]
			total = total + float
		end
		--
		for _, entree in ipairs(entrees) do
			local float = entree[2]
			local percentage = (float / total)
			entree[2] = percentage
			entree[3] = float
		end
	end
	
	--- Pick a random number (0-1)
	local function Roll()
		roll = rng:NextNumber()
	end
	
	--- Pick winner (actual black magic)
	local function Calc()
		local total = 0
		--
		for _, entree in ipairs(entrees) do
			local percentage = entree[2]
			total = total + percentage
			if roll <= total then
				return entree
			end
		end
	end
	
	--- Run
	Init()
	Roll()
	local result = Calc()
	
	--
	return result[1], roll, result[3]
end
-- returns a table with vector3 control points of the Bezier


function Bezier:GetAllPoints(): {Vector3}
	
	-- declarations
	local points = self.Points
	local numPoints = #points
	local v3Points = {}
	
	-- iterate through points
	for i = 1, numPoints do
		table.insert(v3Points, self:GetPoint(i))
	end
	
	-- return list of points
	return v3Points
end
-- ROBLOX deviation: printBigInt omitted



local function printFunction(val: any, printFunctionName: boolean): string
	if not printFunctionName then
		return "[Function]"
	end
	local functionName = debug.info(val, "n")
	if functionName == nil or functionName == "" then
		functionName = "anonymous"
	end
	return "[Function " .. functionName .. "]"
end

local function printSymbol(val: any): string
	return tostring(val)
end

local function printError(val)
	return "[" .. tostring(val) .. "]"
end
--[[
	InstantKill
	Place this Script inside a part.
	This part will kill any character touching it instantly.
--]]


local part = script.Parent

local function onTouched(otherPart)
	-- Confirm the part has a parent
	local character = otherPart.Parent
	if character then
		-- Look for a humanoid inside the part's parent
		local humanoid = character:FindFirstChild("Humanoid")
		if humanoid then
			-- If the humanoid exists, set its health to 0
			humanoid.Health = 0
		end
	end
end
--[=[
	@within TableUtil
	@function Reconcile
	@param source table
	@param template table
	@return table

	Performs a one-way sync on the `source` table against the
	`template` table. Any keys found in `template` that are
	not found in `source` will be added to `source`. This is
	useful for syncing player data against data template tables
	to ensure players have all the necessary keys, while
	maintaining existing keys that may no longer be in the
	template.

	This is a deep operation, so nested tables will also be
	properly reconciled.

	```lua
	local template = {kills = 0, deaths = 0, xp = 0}
	local data = {kills = 10, abc = 20}
	local correctedData = TableUtil.Reconcile(data, template)
	
	print(correctedData) --> {kills = 10, deaths = 0, xp = 0, abc = 30}
	```
]=]


local function Reconcile(src: Table, template: Table): Table

	assert(type(src) == "table", "First argument must be a table")
	assert(type(template) == "table", "Second argument must be a table")

	local tbl = Copy(src)

	for k,v in pairs(template) do
		local sv = src[k]
		if sv == nil then
			if type(v) == "table" then
				tbl[k] = Copy(v, true)
			else
				tbl[k] = v
			end
		elseif type(sv) == "table" then
			if type(v) == "table" then
				tbl[k] = Reconcile(sv, v)
			else
				tbl[k] = Copy(sv, true)
			end
		end
	end

	return tbl

end
--//Suspension//--


RideHeightFront = 2 --{This value will increase the ride height for front}
RideHeightRear = 2.3 --{This value will increase the ride height for rear}

StiffnessFront = 5 --[0-10]{HIGHER STIFFNESS DECREASES SPAWNING STABILITY}
StiffnessRear = 4 --[0-10]{This value will increase the stiffness for rear} (S/A)

AntiRollFront = 2 --[0-10]{HIGHER STIFFNESS DECREASES SPAWNING STABILITY}
AntiRollRear = 3 --[0-10]{This value will reduce roll on the rear} (S/A)

CamberFront = -0.2 --[0-10]{Camber to the front in degrees}
CamberRear = -1.3 --[0-10]{Camber to the rear in degrees}
---------------------------------


local force = Instance.new("BodyForce")
force.Parent = torso
f = force
wait(0.01)
elseif ison == 0 then
if arms then
sh[1].Part1 = arms[1]
sh[2].Part1 = arms[2]
f.Parent = nil
arms[2].Name = "Right Leg"
arms[1].Name = "Left Leg"
welds[1].Parent = nil
welds[2].Parent = nil
end
end
-- Finds out which side the player is on and teleports them to the other


local function TeleportToOtherSide(character, hitPart)
	local bottomOfDoor = VipDoor.CFrame.p - Vector3.new(0, VipDoor.Size.Y / 2, 0)
	local inFrontOfDoor = bottomOfDoor + VipDoor.CFrame.lookVector * 3
	local behindDoor = bottomOfDoor - VipDoor.CFrame.lookVector * 3
	
	local distanceToFront = (inFrontOfDoor - hitPart.Position).magnitude
	local distanceToBack = (behindDoor - hitPart.Position).magnitude
	if distanceToFront < distanceToBack then
		character:MoveTo(behindDoor)
	else
		character:MoveTo(inFrontOfDoor)
	end
end
--[[ @brief Adds the same value to all numbers in an array so the sum is 0.
     @example AdditiveNormalize({5, 10, 15}) = {-5, 0, 5}
     @param t The array to normalize.
     @return The normalized array.
--]]


function module.AdditiveNormalize(t)
	local offset = module.Sum(t) / #t;
	for i, v in pairs(t) do
		t[i] = v - offset;
	end
	return t;
end
--[=[
	Kills the Brio.

	:::info
	You can call this multiple times and it will not error if the brio is dead.
	:::

	```lua
	local brio = Brio.new("hi")
	print(brio:GetValue()) --> "hi"
	brio:Kill()

	print(brio:GetValue()) --> ERROR: Brio is dead
	```
]=]


function Brio:Destroy()
	if not self._values then
		return
	end

	self._values = nil

	if self._diedEvent then
		self._diedEvent:Fire()
		self._diedEvent:Destroy()
		self._diedEvent = nil
	end
end
--[[Susupension]]


	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 8000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 8000		-- Spring Force
	Tune.FAntiRoll 		= 30		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= true			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
--[[**
	Decodes a string from Base64.
	@param [t:string] Input The input string to decode.
	@returns [t:string] The newly decoded string.
**--]]


function Base64.Decode(Input)
	local Output = {}
	local Length = 0

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

		local I1 = Indexes[C1] - 1
		local I2 = Indexes[C2] - 1
		local I3 = (Indexes[C3] or 1) - 1
		local I4 = (Indexes[C4] or 1) - 1

		local A = bit32_lshift(I1, 2) + bit32_rshift(I2, 4)
		local B = bit32_lshift(bit32_band(I2, 15), 4) + bit32_rshift(I3, 2)
		local C = bit32_lshift(bit32_band(I3, 3), 6) + I4

		Length = Length + 1
		Output[Length] = A

		if C3 ~= 61 then
			Length = Length + 1
			Output[Length] = B
		end

		if C4 ~= 61 then
			Length = Length + 1
			Output[Length] = C
		end
	end

	local NewOutput = {}
	local NewLength = 0
	local IndexAdd4096Sub1

	for Index = 1, Length, 4096 do
		NewLength = NewLength + 1
		IndexAdd4096Sub1 = Index + 4096 - 1

		NewOutput[NewLength] = string.char(table.unpack(
			Output,
			Index,
			IndexAdd4096Sub1 > Length and Length or IndexAdd4096Sub1
		))
	end

	return table.concat(NewOutput)
end

return Base64
-- Load default environment


if workspace.Areas:FindFirstChildOfClass("Folder") then
	require(updateEnvironment).LoadArea(workspace.Areas:FindFirstChildOfClass("Folder").Name)
end

game:GetService("RunService"):BindToRenderStep("UI", 50, function() -- Update and animate health UI
	if players.LocalPlayer.Character and players.LocalPlayer.Character:FindFirstChild("Humanoid") then
		if players.LocalPlayer.Character.Humanoid.Health/players.LocalPlayer.Character.Humanoid.MaxHealth >= 0.998 then
			healthFill.UIGradient.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(1, 0)})
		elseif players.LocalPlayer.Character.Humanoid.Health/players.LocalPlayer.Character.Humanoid.MaxHealth <= 0.001 then
			healthFill.UIGradient.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(1, 1)})
		else
			healthFill.UIGradient.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(players.LocalPlayer.Character.Humanoid.Health/players.LocalPlayer.Character.Humanoid.MaxHealth, 0), NumberSequenceKeypoint.new(math.clamp((players.LocalPlayer.Character.Humanoid.Health/players.LocalPlayer.Character.Humanoid.MaxHealth)+0.001, (players.LocalPlayer.Character.Humanoid.Health/players.LocalPlayer.Character.Humanoid.MaxHealth)+0.001, 0.999), 1), NumberSequenceKeypoint.new(1, 1)})
		end
		healthFill.Parent.LifeLabel.Text = math.floor(players.LocalPlayer.Character.Humanoid.Health)
		healthFill.UIGradient.Rotation = healthFill.UIGradient.Rotation - 1
		healthFill.Rotation = healthFill.Rotation + 1
		if lastHealth > players.LocalPlayer.Character.Humanoid.Health then
			DamageEffect(lastHealth/players.LocalPlayer.Character.Humanoid.MaxHealth, (lastHealth-players.LocalPlayer.Character.Humanoid.Health)/players.LocalPlayer.Character.Humanoid.MaxHealth, lastHealth-players.LocalPlayer.Character.Humanoid.Health)
		end
		lastHealth = players.LocalPlayer.Character.Humanoid.Health
	end
	-- Update other stuff in UI
	if players.LocalPlayer.Stats.Rank.Value >= rankCap.Value then
		rankLabel.TextColor3 = Color3.fromRGB(255, 255, 0)
	else
		rankLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
	end
	if players.LocalPlayer.Stats.Mana.Value >= GetManaCap() then
		manaLabel.TextColor3 = Color3.fromRGB(255, 255, 0)
	else
		manaLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
	end
	rankLabel.Text = players.LocalPlayer.Stats.Rank.Value
	goldLabel.Text = players.LocalPlayer.Stats.Gold.Value
	arrowsLabel.Text = players.LocalPlayer.Stats.Arrows.Value
	manaLabel.Text = players.LocalPlayer.Stats.Mana.Value
	rankBar.Parent.Label.Text = players.LocalPlayer.Stats.XP.Value .. "/" .. replicatedStorage.ServerSettings.XPPerRank.Value * players.LocalPlayer.Stats.Rank.Value .. " XP"
	rankBar.Position = UDim2.new((players.LocalPlayer.Stats.XP.Value / (replicatedStorage.ServerSettings.XPPerRank.Value * players.LocalPlayer.Stats.Rank.Value)) - 1, 0, 0, 0)
	rankBar.Fill.Position = UDim2.new(1 - players.LocalPlayer.Stats.XP.Value / (replicatedStorage.ServerSettings.XPPerRank.Value * players.LocalPlayer.Stats.Rank.Value), 0, 0, 0)
end)