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



function stopAllAnimations()
	local oldAnim = currentAnim

	-- return to idle if finishing an emote
	if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
		oldAnim = "idle"
	end

	currentAnim = ""
	if (currentAnimKeyframeHandler ~= nil) then
		currentAnimKeyframeHandler:disconnect()
	end

	if (oldAnimTrack ~= nil) then
		oldAnimTrack:Stop()
		oldAnimTrack:Destroy()
		oldAnimTrack = nil
	end
	if (currentAnimTrack ~= nil) then
		currentAnimTrack:Stop()
		currentAnimTrack:Destroy()
		currentAnimTrack = nil
	end
	return oldAnim
end

local function keyFrameReachedFunc(frameName)
	if (frameName == "End") then
--Valve Properties


local BOVsound = car.DriveSeat.BOV
BOVsound.Volume = .2 --Bov Volume
BOVsound.Pitch = 1 -- Pitch [Don't change this]
BOVsound.SoundId = "rbxassetid://151152187" --Sound

local CPSI = 0
local Values = script.Parent.Parent:FindFirstChild("A-Chassis Interface")
local Throttle = Values.Values.Throttle.Value
local CurrentGear = Values.Values.Gear.Value
local CurrentRPM = Values.Values.RPM.Value
local _Tune = require(car["A-Chassis Tune"])
local MaxRPM = _Tune.Redline
Values.Values.TPSI.Value = PSI
local DEADBOOST = PSI - 0.5
local active = false
local boom = true
----------------------------------------------------------------------------------


while true do
	WaitTime = ((math.random()*1.9)+0.1)
			--print(WaitTime)
		wait(WaitTime/GeneralSpeed)
		--print(math.random())
	RandomBrightness = ((math.random()*1.5)+2)
			--print(RandomBrightness)
		light.Brightness = RandomBrightness -- brightness
end
-- a: amplitud
-- p: period


local function outInElastic(t, b, c, d, a, p)
	if t < d / 2 then
		return outElastic(t * 2, b, c / 2, d, a, p)
	else
		return inElastic((t * 2) - d, b + c / 2, c / 2, d, a, p)
	end
end

local function inBack(t, b, c, d, s)
	if not s then s = 1.70158 end
	t = t / d
	return c * t * t * ((s + 1) * t - s) + b
end

local function outBack(t, b, c, d, s)
	if not s then s = 1.70158 end
	t = t / d - 1
	return c * (t * t * ((s + 1) * t + s) + 1) + b
end

local function inOutBack(t, b, c, d, s)
	if not s then s = 1.70158 end
	s = s * 1.525
	t = t / d * 2
	if t < 1 then
		return c / 2 * (t * t * ((s + 1) * t - s)) + b
	else
		t = t - 2
		return c / 2 * (t * t * ((s + 1) * t + s) + 2) + b
	end
end

local function outInBack(t, b, c, d, s)
	if t < d / 2 then
		return outBack(t * 2, b, c / 2, d, s)
	else
		return inBack((t * 2) - d, b + c / 2, c / 2, d, s)
	end
end

local function outBounce(t, b, c, d)
	t = t / d
	if t < 1 / 2.75 then
		return c * (7.5625 * t * t) + b
	elseif t < 2 / 2.75 then
		t = t - (1.5 / 2.75)
		return c * (7.5625 * t * t + 0.75) + b
	elseif t < 2.5 / 2.75 then
		t = t - (2.25 / 2.75)
		return c * (7.5625 * t * t + 0.9375) + b
	else
		t = t - (2.625 / 2.75)
		return c * (7.5625 * t * t + 0.984375) + b
	end
end

local function inBounce(t, b, c, d)
	return c - outBounce(d - t, 0, c, d) + b
end

local function inOutBounce(t, b, c, d)
	if t < d / 2 then
		return inBounce(t * 2, 0, c, d) * 0.5 + b
	else
		return outBounce(t * 2 - d, 0, c, d) * 0.5 + c * .5 + b
	end
end

local function outInBounce(t, b, c, d)
	if t < d / 2 then
		return outBounce(t * 2, b, c / 2, d)
	else
		return inBounce((t * 2) - d, b + c / 2, c / 2, d)
	end
end

return {
	linear = linear,
	inQuad = inQuad,
	outQuad = outQuad,
	inOutQuad = inOutQuad,
	outInQuad = outInQuad,
	inCubic  = inCubic ,
	outCubic = outCubic,
	inOutCubic = inOutCubic,
	outInCubic = outInCubic,
	inQuart = inQuart,
	outQuart = outQuart,
	inOutQuart = inOutQuart,
	outInQuart = outInQuart,
	inQuint = inQuint,
	outQuint = outQuint,
	inOutQuint = inOutQuint,
	outInQuint = outInQuint,
	inSine = inSine,
	outSine = outSine,
	inOutSine = inOutSine,
	outInSine = outInSine,
	inExpo = inExpo,
	outExpo = outExpo,
	inOutExpo = inOutExpo,
	outInExpo = outInExpo,
	inCirc = inCirc,
	outCirc = outCirc,
	inOutCirc = inOutCirc,
	outInCirc = outInCirc,
	inElastic = inElastic,
	outElastic = outElastic,
	inOutElastic = inOutElastic,
	outInElastic = outInElastic,
	inBack = inBack,
	outBack = outBack,
	inOutBack = inOutBack,
	outInBack = outInBack,
	inBounce = inBounce,
	outBounce = outBounce,
	inOutBounce = inOutBounce,
	outInBounce = outInBounce,
}
--//Other//--


local UserInputService = game:GetService("UserInputService")
local Equipped = false
local event = script.Parent.Blocking
local event2 = script.Parent.BlockingStop
local blocking = false
local debounce = false

tool.Equipped:Connect(function()
	Equipped = true
	UserInputService.InputBegan:Connect(function(Input,Typing)
		if Typing == false and Input.KeyCode == Enum.KeyCode.E and Equipped == true and blocking == false and debounce == false then
			blockstarttrack:Play()
			hum.WalkSpeed = 6
			debounce = true
			blockholdtrack:Play()
			event:FireServer(hum)
			blocking = true
			wait(4)
			event2:FireServer(hum)
			blockholdtrack:Stop()
			hum.WalkSpeed = 16
			wait(1)
			debounce = false
			blocking = false
		end
		if Typing == false and Input.UserInputType == Enum.UserInputType.MouseButton1 and Equipped == true then
			event2:FireServer(hum)
			blockholdtrack:Stop()
			hum.WalkSpeed = 16
			debounce = false
			blocking = false
		end
	end)
end)

tool.Unequipped:Connect(function()
	Equipped = false
	if blocking == true then
		hum.WalkSpeed = 16
		event2:FireServer(hum)
		blockholdtrack:Stop()
		blocking = false
		debounce = false
	end
end)
-- Ring2 descending


for l = 1,#lifts2 do
	if (lifts2[l].className == "Part") then
	lifts2[l].BodyPosition.position = Vector3.new((lifts2[l].BodyPosition.position.x),(lifts2[l].BodyPosition.position.y-2),(lifts2[l].BodyPosition.position.z))
	end
end
wait(0.1)
for p = 1,#parts2 do
	parts2[p].CanCollide = false
end
wait(0.1)
-- (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 = "GreenTopHat"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(0,-0.25,0) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0,0.85,0)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
-- ================================================================================
-- LOCAL FUNCTIONS
-- ================================================================================


local function UpdateDirection(arrow, targets)
	if targets == 0 then return end
	
	local checkpoint = targets[1]:FindFirstChild("Checkpoint")
	local closestDistance = (arrow.Position - checkpoint.Position).magnitude
	local closestTarget = checkpoint
	
	-- Find nearest target
	for _, target in ipairs(targets) do
		checkpoint = target:FindFirstChild("Checkpoint")
		local distance = (arrow.Position - checkpoint.Position).magnitude
		if distance < closestDistance then
			closestTarget = checkpoint
		end
	end
	
	-- Point arrow at nearest target
	arrow.CFrame = CFrame.new(arrow.Position, closestTarget.Position)
end -- UpdateDirection()
--[[
	Set up the internals of this script the same way you would a regular game. DO NOT change the name(s) of any of the folders already inside of this script.
	Once you're done setting everything up, publish this model, copy the ID, Make the model PUBLIC (due to roblox removing private modules), 
	and paste the ID into the ArenaID Section under Edit Federation in 2X19.
	
	If you want to import terrain into the game, put a terrainregion into workspace. (Recommended: https://create.roblox.com/marketplace/asset/148042198/Terrain-Save-and-Load)

	to make said terrain spawnable/despawnable, put it in serverstorage, it will automatically be loaded and unloaded when using the spawn/despawn commands.
	
]]


return script
--throttle.Value = TCount



if script.Parent.Storage.Control.Value ~= "Controller" then
script.Parent.Storage.Throttle.Throttle.Value = 1	
end

if script.Parent.Storage.Control.Value ~= "Controller" then
if carSeat.Throttle == 1 then
if autoF - 1 > autoR or clutch.Clutch.Value ~= 1 then
	TCount = 1 
	else
	if TCount >= 1 then
		TCount = 1
	else
		if speed > 50 then
		TCount = TCount + 0.167
		
		elseif speed < 20 then
		TCount = TCount + 0.3334
		
			else
		TCount = TCount + 0.02
		end
	end
	
	end
else
	if TCount <= 0 then
		TCount = 0
	else
		TCount = 0
	end
end
else TCount = throttle.Throttle.Value
end

if currentgear.Value ~= 1 then tlR = 0
	if clutch.Clutch.Value ~= 1 then
		if throttle.Value ~= 0 then
			if engine.Value > redline.Value * (1-clutch.Clutch.Value) then --------------?? WE DONT NEED A 'FOR' IN THE CLUTCH CODE
				engine.Value = engine.Value - 300
				else
				engine.Value = engine.Value + (((600+decay.Value) * script.Parent.Storage.Throttle.Throttle.Value) - decay.Value) 
			end else engine.Value = engine.Value - decay.Value
		end
		rpm.Value = engine.Value
	else
		engine.Value = rpm.Value
	end
else
	tlR = tlR + 0.05
	if tlR > 20 then
		script.Parent.Functions.Engine.Value = false
		first = 0.333
	end
	engine.Value = engine.Value + (((600+decay.Value) * first) - decay.Value)
	if engine.Value > idle.Value*2 then
		first = 0 
	end
		--engine.Value = (idle.Value-decay.Value)
		
end
-- To make this work, simply group it with the model you want!




local modelbackup = script.Parent.Parent:FindFirstChild(modelname):clone()
local trigger = script.Parent

enabled = true

function onTouched(hit)
	

	if enabled == true then

		enabled = false
		trigger.BrickColor = BrickColor.new("Really black")

	if script.Parent.Parent:FindFirstChild(modelname) ~= nil then

		script.Parent.Parent:FindFirstChild(modelname):Destroy()


	end
wait(120)
		local modelclone = modelbackup:clone()
		modelclone.Parent = script.Parent.Parent
		modelclone:MakeJoints()

		wait(WaitTime)
		
		enabled = true
		trigger.BrickColor = BrickColor.new("Bright violet")

	end

end
script.Parent.Touched:connect(onTouched)
--edit the below function to execute code when this response is chosen OR this prompt is shown
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data


return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	plrData.Money.Gold.Value = plrData.Money.Gold.Value - 6
	plrData.Character.Injuries.Trauma.Value = false
end
--!strict
-- upstream: https://github.com/facebook/react/blob/607148673b3156d051d1fed17cd49e83698dce54/packages/react/src/ReactSharedInternals.js
--[[*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
]]
-- humanoidAnimatePlayEmote.lua



local Figure = script.Parent
local Torso = Figure:WaitForChild("Torso")
local RightShoulder = Torso:WaitForChild("Right Shoulder")
local LeftShoulder = Torso:WaitForChild("Left Shoulder")
local RightHip = Torso:WaitForChild("Right Hip")
local LeftHip = Torso:WaitForChild("Left Hip")
local Neck = Torso:WaitForChild("Neck")
local Humanoid = Figure:WaitForChild("Humanoid")
local pose = "Standing"

local EMOTE_TRANSITION_TIME = 0.1

local userAnimateScaleRunSuccess, userAnimateScaleRunValue = pcall(function() return UserSettings():IsUserFeatureEnabled("UserAnimateScaleRun") end)
local userAnimateScaleRun = userAnimateScaleRunSuccess and userAnimateScaleRunValue

local function getRigScale()
	if userAnimateScaleRun then
		return Figure:GetScale()
	else
		return 1
	end
end

local currentAnim = ""
local currentAnimInstance = nil
local currentAnimTrack = nil
local currentAnimKeyframeHandler = nil
local currentAnimSpeed = 1.0
local animTable = {}
local animNames = { 
	idle = 	{	
		        { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
		        { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
			},
	walk = 	{ 	
		        { id = "http://www.roblox.com/asset/?id=14004765857", weight = 10 } 
			}, 
	run = 	{
				{ id = "run.xml", weight = 10 } 
			}, 
	jump = 	{
				{ id = "http://www.roblox.com/asset/?id=125750702", weight = 10 } 
			}, 
	fall = 	{
				{ id = "http://www.roblox.com/asset/?id=180436148", weight = 10 } 
			}, 
	climb = {
				{ id = "http://www.roblox.com/asset/?id=180436334", weight = 10 } 
			}, 
	sit = 	{
				{ id = "http://www.roblox.com/asset/?id=178130996", weight = 10 } 
			},	
	toolnone = {
				{ id = "http://www.roblox.com/asset/?id=182393478", weight = 10 } 
			},
	toolslash = {
				{ id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
--[=[
	Utility functions for the TemplateProvider
	@class TemplateContainerUtils
]=]



local Workspace = game:GetService("Workspace")
local RunService = game:GetService("RunService")

local TemplateContainerUtils = {}

function TemplateContainerUtils.reparentFromWorkspaceIfNeeded(parent, name)
	assert(typeof(parent) == "Instance", "Bad parent")
	assert(type(name) == "string", "Bad name")

	local workspaceContainer = Workspace:FindFirstChild(name)
	local parentedContainer = parent:FindFirstChild(name)
	if workspaceContainer then
		if parentedContainer then
			error(("Duplicate container in %q and %q"):format(
				workspaceContainer:GetFullName(),
				parentedContainer:GetFullName()))
		end

		-- Reparent
		if RunService:IsRunning() then
			workspaceContainer.Parent = parent
		end

		return workspaceContainer
	end

	if not parentedContainer then
		error(("No template container with name %q in %q")
			:format(parent:GetFullName(), name))
	end

	return parentedContainer
end

return TemplateContainerUtils
--[[Weight and CG]]


Tune.Weight			= 3934		-- Total weight (in pounds)
Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	--[[Width]]		6		,
	--[[Height]]		3.5		,
	--[[Length]]		14		}
Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
Tune.WBVisible		= false		-- Makes the weight brick visible
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]




local autoscaling	= false					--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default	
	{
		units			= "MPH"				,
		scaling			= (10/12) * (60/88)	, -- 1 stud : 10 inches | ft/s to MPH
		maxSpeed		= 140				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "KM/H"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 240				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "SPS"				,
		scaling			= 1					, -- Roblox standard
		maxSpeed		= 200				,
		spInc			= 40				, -- Increment between labelled notches
	}
}
--local MouseInput = Tool:WaitForChild("MousePos",10)



local Services = {
	Players = (game:FindService("Players") or game:GetService("Players")),
	TweenService = (game:FindService("TweenService") or game:GetService("TweenService")),
	RunService = (game:FindService("RunService") or game:GetService("RunService")),
	Input = (game:FindService("ContextActionService") or game:GetService("ContextActionService"))
}

local Player,Character,Humanoid


function Primary(actionName, inputState, inputObj)
	if inputState == Enum.UserInputState.Begin then 
		Remote:FireServer(Enum.KeyCode.Q)
	end
end

function Equipped()
	Player = Services.Players.LocalPlayer
	Character = Player.Character
	Humanoid = Character:FindFirstChildOfClass("Humanoid")
	if not Humanoid or not Humanoid.Parent or Humanoid.Health <= 0 then return end
	
	Services.Input:BindAction("Primary",Primary,true,Enum.KeyCode.Q,Enum.KeyCode.ButtonX)
	Services.Input:SetTitle("Primary","Black hole")
	Services.Input:SetPosition("Primary",UDim2.new(.5,0,-.5,0))
end

function Unequipped()
	Services.Input:UnbindAction("Primary")	
end

Tool.Equipped:Connect(Equipped)
Tool.Unequipped:Connect(Unequipped)
-- Used to lock the chat bar when the user has chat turned off.


function methods:DoLockChatBar()
	if self.TextLabel then
		if LocalPlayer.UserId > 0 then
			self.TextLabel.Text = "To chat in game, turn on chat in your Privacy Settings."
		else
			self.TextLabel.Text = "Sign up to chat in game."
		end
		self:CalculateSize()
	end
	if self.TextBox then
		self.TextBox.Active = false
		self.TextBox.Focused:connect(function()
			self.TextBox:ReleaseFocus()
		end)
	end
end

function methods:SetUpTextBoxEvents(TextBox, TextLabel, MessageModeTextButton)
	--// Code for getting back into general channel from other target channel when pressing backspace.
	UserInputService.InputBegan:connect(function(inputObj, gpe)
		if (inputObj.KeyCode == Enum.KeyCode.Backspace) then
			if (self:IsFocused() and TextBox.Text == "") then
				self:SetChannelTarget(ChatSettings.GeneralChannelName)
			end
		end
	end)

	TextBox.Changed:connect(function(prop)
		if prop == "AbsoluteSize" then
			self:CalculateSize()
			return
		end

		if prop ~= "Text" then
			return
		end

		self:CalculateSize()

		if (string.len(TextBox.Text) > ChatSettings.MaximumMessageLength) then
			TextBox.Text = string.sub(TextBox.Text, 1, ChatSettings.MaximumMessageLength)
			return
		end

		if not self.InCustomState then
			local customState = self.CommandProcessor:ProcessInProgressChatMessage(TextBox.Text, self.ChatWindow, self)
			if customState then
				self.InCustomState = true
				self.CustomState = customState
			end
		else
			self.CustomState:TextUpdated()
		end
	end)

	local function UpdateOnFocusStatusChanged(isFocused)
		if isFocused or TextBox.Text ~= "" then
			TextLabel.Visible = false
		else
			TextLabel.Visible = true
		end
	end

	MessageModeTextButton.MouseButton1Click:connect(function()
		if MessageModeTextButton.Text ~= "" then
			self:SetChannelTarget(ChatSettings.GeneralChannelName)
		end
	end)

	TextBox.Focused:connect(function()
		if not self.UserHasChatOff then
			self:CalculateSize()
			UpdateOnFocusStatusChanged(true)
		end
	end)

	TextBox.FocusLost:connect(function(enterPressed, inputObject)
		self:CalculateSize()
		if (inputObject and inputObject.KeyCode == Enum.KeyCode.Escape) then
			TextBox.Text = ""
		end
		UpdateOnFocusStatusChanged(false)
	end)
end

function methods:GetTextBox()
	return self.TextBox
end

function methods:GetMessageModeTextButton()
	return self.GuiObjects.MessageModeTextButton
end
--[=[
	Adds commas to a number. Not culture aware.
	@param number string | number
	@return string
]=]


function String.addCommas(number: string | number): string
	if type(number) == "number" then
		number = tostring(number)
	end

	local index = -1

	while index ~= 0 do
		number, index = string.gsub(number, "^(-?%d+)(%d%d%d)", '%1,%2')
	end

	return number
end

return String
-- << API >>


function hd:SetTopbarTransparency(number)
	number = tonumber(number) or 0.5
	topBarFrame.BackgroundTransparency = number
end

function hd:SetTopbarEnabled(boolean)
	if type(boolean) ~= "boolean" then
		boolean = true
	end
	main.topbarEnabled = boolean
	topBarFrame.Visible = boolean
	main:GetModule("TopBar"):CoreGUIsChanged()
end



return hd
-- Removes Ownership after Disconnect


game.Players.PlayerRemoving:Connect(function(player)
	local claim = script.Parent.OwnerName.Value
	if claim == player.Name then
		script.Parent.OwnerName.Value = ""
		script.Parent.Parent.GUIPart.bruh.Words.Text = "No Owner"
		prompt.Enabled = false
		rentprompt.Enabled = true
	end
end)
--local PlayerDataClient = require(ReplicatedStorage:WaitForChild("PlayerData").Client)



local LoadingScreen = require(script.Parent.LoadingScreen)

local REQUIRED_ASSETS = {
	-- Instances or content strings that are important to display first
}

LoadingScreen.enableAsync()
LoadingScreen.updateDetailText("Preloading important assets...")
ContentProvider:PreloadAsync(REQUIRED_ASSETS)
LoadingScreen.updateDetailText("Initializing...")
task.wait(1.5)
LoadingScreen.updateDetailText("Loading user data...")
LoadingScreen.updateDetailText("Spawning character...")
task.wait(3)
LoadingScreen.updateDetailText("Finishing up...")
task.wait(0.5)
LoadingScreen.disableAsync()
--[[Vehicle Weight]]

	
	--Determine Current Mass
	local mass=0
	
	function getMass(p)
		for i,v in pairs(p:GetChildren())do
			if v:IsA("BasePart") then
				mass=mass+v:GetMass()
			end
			getMass(v)
		end	
	end
	getMass(car)
	
	--Apply Vehicle Weight
	if mass<_Tune.Weight*weightScaling then
		--Calculate Weight Distribution
		local centerF = Vector3.new()
		local centerR = Vector3.new()
		local countF = 0
		local countR = 0
		
		for i,v in pairs(Drive) do
			if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
				centerF = centerF+v.CFrame.p
				countF = countF+1
			else
				centerR = centerR+v.CFrame.p
				countR = countR+1
			end
		end
		centerF = centerF/countF
		centerR = centerR/countR
		local center = centerR:Lerp(centerF, _Tune.WeightDist/100)  
		
		--Create Weight Brick
		local weightB = Instance.new("Part")
		weightB.Name = "#Weight"
		weightB.Anchored = true
		weightB.CanCollide = false
		weightB.BrickColor = BrickColor.new("Really black")
		weightB.TopSurface = Enum.SurfaceType.Smooth
		weightB.BottomSurface = Enum.SurfaceType.Smooth
		if _Tune.WBVisible then
			weightB.Transparency = .75			
		else
			weightB.Transparency = 1			
		end
		weightB.Size = Vector3.new(_Tune.WeightBSize[1],_Tune.WeightBSize[2],_Tune.WeightBSize[3])
		weightB.CustomPhysicalProperties = PhysicalProperties.new(((_Tune.Weight*weightScaling)-mass)/(weightB.Size.x*weightB.Size.y*weightB.Size.z),0,0,0,0)
		weightB.CFrame=(car.DriveSeat.CFrame-car.DriveSeat.Position+center)*CFrame.new(0,_Tune.CGHeight,0)
		weightB.Parent = car.Body
	else
		--Existing Weight Is Too Massive
		warn( "\n\t [AC".._BuildVersion.."]: Mass too high for specified weight."
			.."\n\t    Target Mass:\t"..(math.ceil(_Tune.Weight*weightScaling*100)/100)
			.."\n\t    Current Mass:\t"..(math.ceil(mass*100)/100)
			.."\n\t Reduce part size or axle density to achieve desired weight.")
	end
	
	local flipG = Instance.new("BodyGyro")
	flipG.Name = "Flip"
	flipG.D = 0
	flipG.MaxTorque = Vector3.new(0,0,0)
	flipG.P = 0
	flipG.Parent = car.DriveSeat
--[[
	Compares two dictionaries, including dictionaries containing nested tables.
--]]



local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Sift = require(ReplicatedStorage.Dependencies.Sift)

local function compare(value1: any, value2: any)
	if value1 == nil or value2 == nil then
		return false
	end

	local value1Type = typeof(value1)
	local value2Type = typeof(value2)

	if value1Type ~= value2Type then
		return false
	end

	if value1Type == "table" then
		return Sift.Dictionary.equalsDeep(value1, value2)
	end

	return value1 == value2
end

return function(object1: { [any]: any }, object2: { [any]: any })
	local keysChanged: { string } = {}

	-- Finding keys in object1 that are absent or changed in object2
	for key, value in pairs(object1) do
		local otherValue = object2[value]

		if not compare(value, otherValue) then
			table.insert(keysChanged, key)
		end
	end

	-- Find keys that are present in object2 but not present in object1
	for key, value in pairs(object2) do
		local otherValue = object1[value]

		if not otherValue then
			table.insert(keysChanged, key)
		end
	end

	return keysChanged
end
--Humanoid.Changed:connect(function(pr)
--	if pr == "Health" then
--		Frame.HP.Text = "HP: " .. Humanoid.Health .. " / " .. Humanoid.MaxHealth
--	elseif pr == "WalkSpeed" then
--		Frame.Speed.Text = "Speed: " .. Humanoid.WalkSpeed
--	end
--end)
--
--Humanoid.Died:connect(function()
--	Frame.HP.Text = "HP: 0 / " .. Humanoid.MaxHealth
--end)



if Humanoid.Health <= 0 then Frame.HP.Text = "HP: 0 / " .. Humanoid.MaxHealth end

Frame.OK.MouseButton1Up:connect(function() Gui:Destroy() end)

while true do
	Frame.HP.Text = "HP: " .. Humanoid.Health .. " / " .. Humanoid.MaxHealth
	
	wait()
end