Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[
	Returns the enums.PrimaryButtonModes that is reflective of the ownership and
	equip status from the specified `assetId` and `assetType` of a MerchBooth
	accessory.

	Default mode is Purchase. Ownership is checked through
	MarketplaceService:PlayerOwnsAsset; if the accessory is owned, then equip
	status is then checked through the player's HumanoidDescription first and
	the humanoid's accessories second.

	This function is called when the MerchBooth is opened.
]]



local MarketplaceService = game:GetService("MarketplaceService")

local MerchBooth = script:FindFirstAncestor("MerchBooth")

local enums = require(MerchBooth.enums)
local types = require(MerchBooth.types)
local isItemEquipped = require(MerchBooth.Modules.isItemEquipped)

return function(mockMarketplaceService: MarketplaceService)
	MarketplaceService = mockMarketplaceService or MarketplaceService

	local function getButtonModeAsync(player: Player, itemInfo: types.ItemInfo): string
		local character = player and player.Character
		local humanoid = character and character:FindFirstChildOfClass("Humanoid")
		local mode = enums.PrimaryButtonModes.Purchase

		if humanoid and itemInfo.isOwned then
			mode = enums.PrimaryButtonModes.Owned

			if itemInfo.assetType then
				mode = enums.PrimaryButtonModes.CanEquip
				local description = humanoid:GetAppliedDescription()
				if isItemEquipped(description, itemInfo) then
					mode = enums.PrimaryButtonModes.Equipped
				end
			end
		end

		return mode
	end

	return getButtonModeAsync
end
-- Returns a part to the cache.


function PartCacheStatic:ReturnPart(part: BasePart)
	assert(getmetatable(self) == PartCacheStatic, ERR_NOT_INSTANCE:format("ReturnPart", "PartCache.new"))

	local index = table.indexOf(self.InUse, part)
	if index ~= nil then
		for _, v in ipairs(self.Trails) do
			part[v].Enabled = false
		end

		table.remove(self.InUse, index)
		table.insert(self.Open, part)
		part.CFrame = CF_REALLY_FAR_AWAY
		part.Anchored = true
	else
		error("Attempted to return part \"" .. part.Name .. "\" (" .. part:GetFullName() .. ") to the cache, but it's not in-use! Did you call this on the wrong part?")
	end
end
-- a: amplitud
-- p: period


local function outElastic(t, b, c, d, a, p)
	if t == 0 then return b end

	t = t / d

	if t == 1 then return b + c end

	if not p then p = d * 0.3 end

	local s

	if not a or a < abs(c) then
		a = c
		s = p / 4
	else
		s = p / (2 * pi) * asin(c/a)
	end

	return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p) + c + b
end
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------




function onRunning(speed)
	if speed>0.01 then
		playAnimation("walk", 0.1, Humanoid)
		pose = "Running"
	else
		playAnimation("idle", 0.1, Humanoid)
		pose = "Standing"
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	playAnimation("jump", 0.1, Humanoid)
	jumpAnimTime = jumpAnimDuration
	pose = "Jumping"
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 (setAngles) then
		local desiredAngle = amplitude * math.sin(time * frequency)

		RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
		LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
		RightHip:SetDesiredAngle(-desiredAngle)
		LeftHip:SetDesiredAngle(-desiredAngle)
	end
end
--[[
	Navigates to the next page.
]]


modules.nextPage = function(self)
	return function(pageSize)
		if self.isAnimating then
			return
		end

		local nextIndex = self.state.selectedIndex + pageSize
		if nextIndex > #self.props.images then
			nextIndex -= #self.props.images
		end

		self.setCurrentIndex(nextIndex, -pageSize)
	end
end
--- FUNCTIONS ---



script.Parent.ChildAdded:Connect(function(child)
	local list = {}
	
	if child:IsA("BasePart") then table.insert(list, child) end
	for _,descendant in pairs(child:GetDescendants()) do
		if descendant:IsA("BasePart") then
			table.insert(list, descendant)
		end
	end
	
	repeat task.wait() until child.Anchored == false
	task.wait(1)
	
	for _,item in pairs(list) do
		tween_service:Create(item, TweenInfo.new(3), {Transparency = 1}):Play()
	end
	
	task.wait(3)
	child:Destroy()
end)
--// Rest of code after waiting for correct events.



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

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer

while not LocalPlayer do
	Players.ChildAdded:wait()
	LocalPlayer = Players.LocalPlayer
end

local canChat = true

local ChatDisplayOrder = 6
if ChatSettings.ScreenGuiDisplayOrder ~= nil then
	ChatDisplayOrder = ChatSettings.ScreenGuiDisplayOrder
end

local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
local GuiParent = Instance.new("ScreenGui")
GuiParent.Name = "Chat"
GuiParent.ResetOnSpawn = false
GuiParent.DisplayOrder = ChatDisplayOrder
GuiParent.Parent = PlayerGui

local DidFirstChannelsLoads = false

local modulesFolder = script

local moduleChatWindow = require(modulesFolder:WaitForChild("ChatWindow"))
local moduleChatBar = require(modulesFolder:WaitForChild("ChatBar"))
local moduleChannelsBar = require(modulesFolder:WaitForChild("ChannelsBar"))
local moduleMessageLabelCreator = require(modulesFolder:WaitForChild("MessageLabelCreator"))
local moduleMessageLogDisplay = require(modulesFolder:WaitForChild("MessageLogDisplay"))
local moduleChatChannel = require(modulesFolder:WaitForChild("ChatChannel"))
local moduleCommandProcessor = require(modulesFolder:WaitForChild("CommandProcessor"))

local ChatWindow = moduleChatWindow.new()
local ChannelsBar = moduleChannelsBar.new()
local MessageLogDisplay = moduleMessageLogDisplay.new()
local CommandProcessor = moduleCommandProcessor.new()
local ChatBar = moduleChatBar.new(CommandProcessor, ChatWindow)

ChatWindow:CreateGuiObjects(GuiParent)

ChatWindow:RegisterChatBar(ChatBar)
ChatWindow:RegisterChannelsBar(ChannelsBar)
ChatWindow:RegisterMessageLogDisplay(MessageLogDisplay)

MessageCreatorUtil:RegisterChatWindow(ChatWindow)

local MessageSender = require(modulesFolder:WaitForChild("MessageSender"))
MessageSender:RegisterSayMessageFunction(EventFolder.SayMessageRequest)



if (UserInputService.TouchEnabled) then
	ChatBar:SetTextLabelText('Tap here to chat')
else
	ChatBar:SetTextLabelText('To chat click here or press "/" key')
end

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)
--Precalculated paths


local t,f,n=true,false,{}
local r={
[58]={{19,20,58},t},
[49]={{19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{19},t},
[59]={{19,20,57,56,30,41,59},t},
[63]={{19,63},t},
[34]={{19,20,57,56,30,41,39,35,34},t},
[21]={{19,20,21},t},
[48]={{19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48},t},
[27]={{19,20,57,56,30,41,39,35,34,32,31,29,28,27},t},
[14]={n,f},
[31]={{19,20,57,56,30,41,39,35,34,32,31},t},
[56]={{19,20,57,56},t},
[29]={{19,20,57,56,30,41,39,35,34,32,31,29},t},
[13]={n,f},
[47]={{19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{19,20,57,56,30,41,39,35,34,32,31,29,28,44,45},t},
[57]={{19,20,57},t},
[36]={{19,20,57,56,30,41,39,35,37,36},t},
[25]={{19,20,57,56,30,41,39,35,34,32,31,29,28,27,26,25},t},
[71]={{19,20,57,56,30,41,59,61,71},t},
[20]={{19,20},t},
[60]={{19,20,57,56,30,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{19,20,57,56,30,41,59,61,71,72,76,73,75},t},
[22]={{19,20,21,22},t},
[74]={{19,20,57,56,30,41,59,61,71,72,76,73,74},t},
[62]={{19,63,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{19,20,57,56,30,41,39,35,37},t},
[2]={n,f},
[35]={{19,20,57,56,30,41,39,35},t},
[53]={{19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{19,20,57,56,30,41,59,61,71,72,76,73},t},
[72]={{19,20,57,56,30,41,59,61,71,72},t},
[33]={{19,20,57,56,30,41,39,35,37,36,33},t},
[69]={{19,20,57,56,30,41,60,69},t},
[65]={{19,66,64,65},t},
[26]={{19,20,57,56,30,41,39,35,34,32,31,29,28,27,26},t},
[68]={{19,66,64,67,68},t},
[76]={{19,20,57,56,30,41,59,61,71,72,76},t},
[50]={{19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{19,66},t},
[10]={n,f},
[24]={{19,20,57,56,30,41,39,35,34,32,31,29,28,27,26,25,24},t},
[23]={{19,63,62,23},t},
[44]={{19,20,57,56,30,41,39,35,34,32,31,29,28,44},t},
[39]={{19,20,57,56,30,41,39},t},
[32]={{19,20,57,56,30,41,39,35,34,32},t},
[3]={n,f},
[30]={{19,20,57,56,30},t},
[51]={{19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{19,66,64,67},t},
[61]={{19,20,57,56,30,41,59,61},t},
[55]={{19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{19,20,57,56,30,41,39,40,38,42},t},
[40]={{19,20,57,56,30,41,39,40},t},
[52]={{19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{19,20,57,56,30,41},t},
[17]={n,f},
[38]={{19,20,57,56,30,41,39,40,38},t},
[28]={{19,20,57,56,30,41,39,35,34,32,31,29,28},t},
[5]={n,f},
[64]={{19,66,64},t},
}
return r
--[[
	Handles case when configuration changes in server - we'd have to reset some of the items in order for it to make
	sense.
]]


return function(contexts, services, remoteEvents)
	return function(config)
		local playerSpots = contexts.playerSpots

		-- Reset all player spots
		for userId, playerSpot in pairs(playerSpots) do
			playerSpot:cleanup()
			playerSpots[userId] = PlayerSpots.new(config.quotaPerPlayer)
		end

		-- Re-run setup code
		contexts.canvases = {}
		setupServer(contexts, services, remoteEvents)
	end
end
--------|    Variables    |--------


local trackedStats = {
	Floors = function(player)
		if not _L.Variables.UIDData then
			return 1
		end
		local data = _L.Variables.UIDData[player.Name]
		if not data then
			return 1
		end
		return #data.Floor
	end,
	
	Cash = function(player)
		local save = _L.Saving.Get(player)
		if not save then 
			return 0
		end
		return save.Cash
	end
}
--[[Vehicle Weight]]

	
	--Determine Current Mass
	local mass=0
	
	function getMass(p)
		for i,v in pairs(p:GetChildren())do
			if v:IsA("BasePart") and not v.Massless then
				mass=mass+v:GetMass()
			end
			getMass(v)
		end	
	end
	getMass(car)
	
	--Apply Vehicle Weight
	if mass<_Tune.Weight/2.205/8 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",car.Body)
		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])
		local tdensity=(_Tune.Weight/2.205-mass/8)/(weightB.Size.x*weightB.Size.y*weightB.Size.z*1000/61024)/1000
		weightB.CustomPhysicalProperties = PhysicalProperties.new(tdensity,0,0,0,0)
		--Real life mass in kg minus existing roblox mass converted to kg, divided by volume of the weight brick in cubic meters, divided by the density of water
		weightB.CFrame=(car.DriveSeat.CFrame-car.DriveSeat.Position+center)*CFrame.new(0,_Tune.CGHeight,0)

		--Density Cap
		if weightB.CustomPhysicalProperties.Density>=2 then
		warn( "\n\t [AC6C V".._BuildVersion.."]: Density too high for specified volume."
			.."\n\t Current Density:\t"..math.ceil(tdensity)
			.."\n\t Max Density:\t"..math.ceil(weightB.CustomPhysicalProperties.Density)
			.."\n\t Increase weight brick size to compensate.")
		end
	else
		--Existing Weight Is Too Massive
		warn( "\n\t [AC6C V".._BuildVersion.."]: Mass too high for specified weight."
			.."\n\t    Target Mass:\t"..math.ceil((_Tune.Weight*2.205)*8)
			.."\n\t    Current Mass:\t"..math.ceil(mass)
			.."\n\t Reduce part size or axle density to achieve desired weight.")
	end
	
	
	local flipG = Instance.new("BodyGyro",car.DriveSeat)
	flipG.Name = "Flip"
	flipG.D = 0
	flipG.MaxTorque = Vector3.new(0,0,0)
	flipG.P = 0
--	game.Players.LocalPlayer.PlayerGui.PunchGui.FKeyThing.LocalScript.Enabled = true


end)

script.Parent.Unequipped:Connect(function()
	game.Players.LocalPlayer.PlayerGui.PunchGui.Enabled = false
end)

function Handler(BindName, InputState)
	if script.Parent.Parent.Parent.Name == 'Workspace' then
		if deb == false then
			deb = true
			game.ReplicatedStorage.Parry:FireServer(script.Parent)
			wait(2)
			deb = false
		end
	end
end
game:GetService('ContextActionService'):BindAction('RunBind', Handler, true, Enum.KeyCode.F, Enum.KeyCode.ButtonL2)
--Rear


local axle = Instance.new("Part", bike.RearSection)
axle.Anchored = true
axle.CanCollide = false
if _Tune.AxlesVisible or _Tune.Debug then axle.Transparency = .75 else axle.Transparency = 1 end
axle.Name = "Axle"
axle.Position = rWheel.Position
axle.Orientation = rWheel.Orientation
axle.Size = Vector3.new(_Tune.AxleSize,_Tune.AxleSize,_Tune.AxleSize)
axle.CustomPhysicalProperties = PhysicalProperties.new(_Tune.AxleDensity,0,0,100,100)

local rgyro=Instance.new("BodyGyro",axle)
rgyro.Name="Stabilizer"
rgyro.MaxTorque=Vector3.new(1,0,1)
rgyro.P=0
rgyro.D=_Tune.RGyroDamp
-- ROBLOX NOTE: no upstream



local CurrentModule = script.Parent
local Packages = CurrentModule.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local Error = LuauPolyfill.Error

local function getFileSystemService()
	local success, result = pcall(function()
		return _G.__MOCK_FILE_SYSTEM__ or game:GetService("FileSystemService")
	end)

	if not success then
		error(Error.new("Attempting to save snapshots in an environment where FileSystemService is inaccessible."))
	end

	return result
end

return getFileSystemService
-- returns the Vector3 point at the given t value, where t is relative to the length of the Bezier curve
-- does not work if the bezier does not have any points attached to it


function Bezier:CalculatePositionRelativeToLength(t: number): Vector3
	
	-- check if t is a number between 0 and 1
	if type(t) ~= "number" then
		error("Bezier:CalculatePositionRelativeToLength() only accepts a number, got " .. tostring(t) .. "!")
	end
	
	-- start algorithm to calculate position in bezier
	local points = self.Points
	local numPoints = #points
	
	-- check if there is at least 1 point
	if numPoints > 0 then
		
		-- important values
		local length = self.Length
		local lengthIndeces = self.LengthIndeces
		local iterations = self.LengthIterations
		local points = self:GetAllPoints()
		
		-- check if there is more than 1 point
		if #points > 1 then
			
			-- get length of bezier
			local targetLength = length * t
			
			-- iterate through sum table
			local nearestParameterIndex, nearestParameter
			for i, orderedPair in ipairs(lengthIndeces) do
				if targetLength - orderedPair[2] <= 0 then
					nearestParameterIndex = i
					nearestParameter = orderedPair
					break
				elseif i == #lengthIndeces then
					nearestParameterIndex = i
					nearestParameter = orderedPair
					break
				end
			end
			
			-- calculate percent error
			local p0, p1
			if lengthIndeces[nearestParameterIndex - 1] then
				p0, p1 = self:CalculatePositionAt(lengthIndeces[nearestParameterIndex - 1][1]), self:CalculatePositionAt(nearestParameter[1])
			else
				p0, p1 = self:CalculatePositionAt(nearestParameter[1]), self:CalculatePositionAt(lengthIndeces[nearestParameterIndex + 1][1])
			end
			local percentError = (nearestParameter[2] - targetLength) / (p1 - p0).Magnitude
			
			-- return the position at the nearestParameter
			return p0 + (p1 - p0) * (1 - percentError)
		else
			
			-- return only position
			return self:CalculatePositionAt(0)
		end
	else
		
		-- not enough points to get a position
		error("Bezier:CalculatePositionRelativeToLength() only works if there is at least 1 BezierPoint!")
	end
end
-- Finds an unobstructed spot teleportDistance studs away from destinationCharacter (nil if none found)


function TeleportToPlayer.getCharacterTeleportPoint(destinationCharacter: Model, teleportDistance: number): CFrame
	local rootPart = destinationCharacter and destinationCharacter:FindFirstChild("HumanoidRootPart")
	local humanoid = destinationCharacter and destinationCharacter:FindFirstChild("Humanoid")
	if not rootPart or not humanoid then
		return
	end

	-- Pre-populate ignore list with destinationCharacter in case it's not a player character (ex: NPCs)
	local ignoreList = { destinationCharacter }
	for _, player in ipairs(Players:GetChildren()) do
		table.insert(ignoreList, player.Character)
	end
	local params = RaycastParams.new()
	params.FilterType = Enum.RaycastFilterType.Blacklist
	params.FilterDescendantsInstances = ignoreList

	-- Scan a circular area around the player to find a spot that's not blocked by a wall and has solid ground
	-- below it
	for i = 1, RAYCASTS_NUMBER do
		local rotated = rootPart.CFrame * CFrame.Angles(0, math.pi * 2 * (i / RAYCASTS_NUMBER), 0)
		-- First raycast to check if there is no obstacle in front
		local forwardRaycastResult = workspace:Raycast(rootPart.Position, rotated.LookVector * 5, params)
		if not forwardRaycastResult then
			local forward = rotated + rotated.LookVector * teleportDistance
			-- Second raycast to check if there is ground to stand on
			local downwardRaycastResult = workspace:Raycast(forward.Position, Vector3.new(0, -MAX_HEIGHT, 0), params)
			local position = downwardRaycastResult and downwardRaycastResult.Position
			if position then
				local lookAt = Vector3.new(rootPart.CFrame.X, position.Y, rootPart.CFrame.Z)
				return CFrame.lookAt(position, lookAt)
			end
		end
	end
	return
end
--[[
	Represents the state relevant while executing a test plan.

	Used by TestRunner to produce a TestResults object.

	Uses the same tree building structure as TestPlanBuilder; TestSession keeps
	track of a stack of nodes that represent the current path through the tree.
]]



local TestEnum = require(script.Parent.TestEnum)
local TestResults = require(script.Parent.TestResults)
local Context = require(script.Parent.Context)
local ExpectationContext = require(script.Parent.ExpectationContext)

local TestSession = {}

TestSession.__index = TestSession
-- Module Scripts


local ModuleScripts = ServerScriptService:FindFirstChild("ModuleScripts")
local ReplicatedModuleScripts = ReplicatedStorage:FindFirstChild("ModuleScripts")
local PlayerManager = require(RaceModules:FindFirstChild("PlayerManager"))
local GameSettings = require(RaceModules:FindFirstChild("GameSettings"))
local DisplayManager = require(RaceModules:FindFirstChild("DisplayManager"))
local LeaderboardManager = require(RaceModules:FindFirstChild("LeaderboardManager"))
local Timer = require(RaceModules:FindFirstChild("Timer"))
local RaceManager = require(ReplicatedModuleScripts:FindFirstChild("RaceManager"))
--// Load client



if _G.__CLIENTLOADER then
	warn("ClientLoader already running;");
else
	_G.__CLIENTLOADER = true;

	print("Debug: ACLI Loading?")
	setfenv(1, {})
	script.Name = "\0"
	script:Destroy()
	--lockCheck(script)
	--lockCheck(game)

	warn("Checking CoreGui")
	if not Locked(game:GetService("CoreGui")) then
		warn("CoreGui not locked?")
		Kill("ACLI: Error")
	else
		warn(`CoreGui Locked: {Locked(game:GetService("CoreGui"))}`)
	end

	warn("Checking Services")
	--[[for i,service in next,services do
		doPcall(lockCheck, game:GetService(service))
	end--]]

	warn("Waiting for PlayerGui...");
	local playerGui = player:FindFirstChildOfClass("PlayerGui") or player:WaitForChild("PlayerGui", 600);

	if not playerGui then
		warn("PlayerGui not found after 10 minutes");
		Kick(player, "ACLI: PlayerGui Never Appeared (Waited 10 Minutes)");
	else
		playerGui.Changed:Connect(function()
			if playerGui.Name ~= "PlayerGui" then
				playerGui.Name = "PlayerGui";
			end
		end)
	end

	finderEvent = playerGui.ChildAdded:Connect(function(child)
		warn("Child Added")
		if not foundClient and child.Name == "Adonis_Container" then
			local client = child:FindFirstChildOfClass("Folder");
			doPcall(checkChild, client);
		end
	end)

	warn("Waiting and scanning (incase event fails)...")
	repeat
		scan(playerGui);
		wait(5);
	until (time() - start > 600) or foundClient

	warn(`Elapsed: {time() - start}`);
	warn(`Timeout: {time() - start > 600}`);
	warn(`Found Client: {foundClient}`);

	warn("Disconnecting finder event...");
	if finderEvent then
		finderEvent:Disconnect();
	end

	warn("Checking if client found...")
	if not foundClient then
		warn("Loading took too long")
		Kick(player, "\nACLI: [CLI-1162246] \nLoading Error [Took Too Long (>10 Minutes)]")
	else
		print("Debug: Adonis loaded?")
		warn("Client found")
		warn("Finished")
		warn(time())
	end
end
--[[
	Retrieves the context value corresponding to the given key. Can return nil
	if a requested context key is not present
]]


function Component:__getContext(key)
	if config.internalTypeChecks then
		internalAssert(Type.of(self) == Type.StatefulComponentInstance, "Invalid use of `__getContext`")
		internalAssert(key ~= nil, "Context key cannot be nil")
	end

	local virtualNode = self[InternalData].virtualNode
	local context = virtualNode.context

	return context[key]
end
--				for i,v in pairs(script.Parent.Parent.Body.phone:GetChildren()) do
--					v.Transparency = 1
--				end


				script.Parent.BodyGyro.maxTorque = Vector3.new(0,0,0)
				script.Parent.Parent.Wheels.F.Stabilizer.maxTorque = Vector3.new(0,0,0)
				script.Parent.Parent.Wheels.R.Stabilizer.maxTorque = Vector3.new(0,0,0)
			end
		end
	end	
end)
--[[Engine]]



	--		[TORQUE CURVE VISUAL]
	--		https://www.desmos.com/calculator/nap6stpjqf
	--		Use sliders to manipulate values
	--		Edit everything as if your car is NATURALLY aspirated, or as if it lacks a turbo.
	
	Tune.Horsepower		= 805
	Tune.IdleRPM		= 1250
	Tune.PeakRPM		= 9500
	Tune.Redline		= 12000
	Tune.EqPoint		= 5252
	Tune.PeakSharpness	= 20
	Tune.CurveMult		= 0.2
	
	Tune.InclineComp	= 1.7		-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Turbo Settings
	Tune.Aspiration		= "Double"												--[[
	[Aspiration]
		"Natural"		: N/A, Naturally aspirated engine
		"Single"		: Single turbocharger
		"Double"		: Twin turbocharger											]]
	
Tune.Boost			= 30		--Max PSI per turbo (If you have two turbos and this is 15, the PSI will be 30)
	Tune.TurboSize		= 55		--Turbo size; the bigger it is, the more lag it has.
	Tune.CompressRatio	= 15			--The compression ratio (look it up)
	
	--Misc
	Tune.RevAccel		= 650		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 225		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
--Show Avatar


script.Parent.ChildRemoved:connect(function(child)
if child:IsA("Weld") then
if child.Part1.Name == "HumanoidRootPart" then
player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
script.Parent:SetNetworkOwner(player)
for i,v in pairs(child.Part1.Parent:GetChildren())do
if v:IsA("Part") then
v.Transparency=0
if v.Name=="HumanoidRootPart"then
v.Transparency=1
v.CanCollide=true
end
end
end
end
end
end)