Roblox/luau_corpus huggingface dataset:
--Made by Luckymaxer

Character = script.Parent

BaseColor = BrickColor.new("Bright yellow")
Color = BaseColor.Color

Duration = 150

Classes = {
	BasePart = {
		BrickColor = BaseColor,
		Material = Enum.Material.Plastic,
		Reflectance = 0.5,
		Anchored = true,
	},
	FileMesh = {
		TextureId = "",
	},
	DataModelMesh = {
		VertexColor = Vector3.new(Color.r, Color.g, Color.b),
	},
	CharacterMesh = {
		BaseTextureId = 0,
		OverlayTextureId = 0,
	},
	Shirt = {
		ShirtTemplate = "",
	},
	Pants = {
		PantsTemplate = "",
	},
	Decal = {
		Texture = "",
	}
}

Objects = {}

function Redesign(Parent)
	for i, v in pairs(Parent:GetChildren()) do
		local Object = {
			Object = nil,
			Properties = {},
		}
		for ii, vv in pairs(Classes) do
			if v:IsA(ii) then
				Object.Object = v
				for iii, vvv in pairs(vv) do
					local PropertyValue = nil
					pcall(function()
						PropertyValue = v[iii]
						v[iii] = vvv
					end)
					if PropertyValue then
						Object.Properties[iii] = PropertyValue
					end
				end
			end
		end
		table.insert(Objects, Object)
		Redesign(v)
	end
end

Redesign(script.Parent) --Goldify the player

wait(Duration)

for i, v in pairs(Objects) do --Unfreeze the player
	for ii, vv in pairs(v.Properties) do
		v.Object[ii] = vv
	end
end

script:Destroy()
-----
for _,v in pairs(script.Parent.n1:GetChildren())do
v.Visible=tonumber(v.Name)==sc1
end
for _,v in pairs(script.Parent.n2:GetChildren())do
v.Visible=tonumber(v.Name)==sc2
end

end end
--Preforms a "soft shutdown". It will teleport players to a reserved server
--and teleport them back, with a new server. ORiginal version by Merely.
--Be aware this will hard shutdown reserved servers.

local PlaceId = game.PlaceId

local Players = game:GetService("Players")
local TeleportService = game:GetService("TeleportService")

local TeleportScreenCreator = script:WaitForChild("TeleportScreenCreator")
local CreateTeleportScreen = require(TeleportScreenCreator)

local SoftShutdownLocalScript = script:WaitForChild("SoftShutdownLocalScript")
TeleportScreenCreator.Parent = SoftShutdownLocalScript
SoftShutdownLocalScript.Parent = game:GetService("ReplicatedFirst")

local StartShutdown = Instance.new("RemoteEvent")
StartShutdown.Name = "StartShutdown"
StartShutdown.Parent = game.ReplicatedStorage



if not (game.VIPServerId ~= "" and game.VIPServerOwnerId == 0) then
	--If it is not a reserved server, bind the teleporting on close.
	game:BindToClose(function()
		--Return if there is no players.
		if #game.Players:GetPlayers() == 0 then
			return
		end
		
		--Return if the server instance is offline.
		if game.JobId == "" then
			return
		end
		
		--Send the shutdown message.
		StartShutdown:FireAllClients(true)
		task.wait(2)
		local ReservedServerCode = TeleportService:ReserveServer(PlaceId)
		
		--Create the teleport GUI.
		local ScreenGui = CreateTeleportScreen()
		local function TeleportPlayer(Player)
			TeleportService:TeleportToPrivateServer(PlaceId,ReservedServerCode,{Player},nil,{IsTemporaryServer=true,PlaceId = PlaceId},ScreenGui)
		end
		
		--Teleport players and try to keep the server alive until all players leave.
		for _,Player in pairs(Players:GetPlayers()) do
			TeleportPlayer(Player)
		end
		game.Players.PlayerAdded:connect(TeleportPlayer)
		while #Players:GetPlayers() > 0 do wait() end
	end)
end
--Precalculated paths
local t,f,n=true,false,{}
local r={
[58]={{58},t},
[49]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{58,20,19},t},
[59]={{58,56,30,41,59},t},
[63]={{58,20,63},t},
[34]={{58,56,30,41,39,35,34},t},
[21]={{58,20,21},t},
[48]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48},t},
[27]={{58,56,30,41,39,35,34,32,31,29,28,27},t},
[14]={n,f},
[31]={{58,56,30,41,39,35,34,32,31},t},
[56]={{58,56},t},
[29]={{58,56,30,41,39,35,34,32,31,29},t},
[13]={n,f},
[47]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{58,56,30,41,39,35,34,32,31,29,28,44,45},t},
[57]={{58,57},t},
[36]={{58,56,30,41,39,35,37,36},t},
[25]={{58,56,30,41,39,35,34,32,31,29,28,27,26,25},t},
[71]={{58,56,30,41,59,61,71},t},
[20]={{58,20},t},
[60]={{58,56,30,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{58,56,30,41,59,61,71,72,76,73,75},t},
[22]={{58,20,21,22},t},
[74]={{58,56,30,41,59,61,71,72,76,73,74},t},
[62]={{58,20,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{58,56,30,41,39,35,37},t},
[2]={n,f},
[35]={{58,56,30,41,39,35},t},
[53]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{58,56,30,41,59,61,71,72,76,73},t},
[72]={{58,56,30,41,59,61,71,72},t},
[33]={{58,56,30,41,39,35,37,36,33},t},
[69]={{58,56,30,41,60,69},t},
[65]={{58,20,19,66,64,65},t},
[26]={{58,56,30,41,39,35,34,32,31,29,28,27,26},t},
[68]={{58,20,19,66,64,67,68},t},
[76]={{58,56,30,41,59,61,71,72,76},t},
[50]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{58,20,19,66},t},
[10]={n,f},
[24]={{58,56,30,41,39,35,34,32,31,29,28,27,26,25,24},t},
[23]={{58,23},t},
[44]={{58,56,30,41,39,35,34,32,31,29,28,44},t},
[39]={{58,56,30,41,39},t},
[32]={{58,56,30,41,39,35,34,32},t},
[3]={n,f},
[30]={{58,56,30},t},
[51]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{58,20,19,66,64,67},t},
[61]={{58,56,30,41,59,61},t},
[55]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{58,56,30,41,39,40,38,42},t},
[40]={{58,56,30,41,39,40},t},
[52]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{58,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]={{58,56,30,41},t},
[17]={n,f},
[38]={{58,56,30,41,39,40,38},t},
[28]={{58,56,30,41,39,35,34,32,31,29,28},t},
[5]={n,f},
[64]={{58,20,19,66,64},t},
}
return r
--[[

	LOWGames Studios
	Date: 27 October 2022
	by Elder
	
]]--

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
end)();
return function(p1, p2)
	local v1 = nil;
	local v2 = nil;
	local v3 = nil;
	local v4 = nil;
	v1 = math.round(p1 / 60 / 60 / 24 - 0.5);
	v2 = math.round(p1 / 60 / 60 % 24 - 0.5);
	v3 = math.round(p1 / 60 % 60 - 0.5);
	v4 = math.round(p1 % 60);
	if p2 then
		if v1 >= 1 then
			return v1 .. "d";
		elseif v2 >= 1 then
			return v2 .. "hr";
		elseif v3 >= 1 then
			return v3 .. "m";
		else
			return v4 .. "s";
		end;
	end;
	local v5
	if v1 >= 1 then
		if v1 > 1 then
			v5 = " Days";
		else
			v5 = " Day";
		end;
		return v1 .. v5;
	end;
	local v6
	if v2 >= 1 then
		if v2 > 1 then
		 v6 = " Hours";
		else
			v6 = " Hour";
		end;
		return v2 .. v6;
	end;
	local v7
	if v3 >= 1 then
		if v3 > 1 then
			v7 = " Minutes";
		else
			v7 = " Minute";
		end;
		return v3 .. v7;
	end;
	local v8
	if v4 > 1 then
	v8 = " Seconds";
	else
		v8 = " Second";
	end;
	return v4 .. v8;
end;
----------- UTILITIES --------------
local Util = {}
do
	function Util.Create(instanceType)
		return function(data)
			local obj = Instance.new(instanceType)
			local parent = nil
			for k, v in pairs(data) do
				if type(k) == 'number' then
					v.Parent = obj
				elseif k == 'Parent' then
					parent = v
				else
					obj[k] = v
				end
			end
			if parent then
				obj.Parent = parent
			end
			return obj
		end
	end
end

local onResizedCallbacks = {}
setmetatable(onResizedCallbacks, { __mode = 'k' })
-- Compiled with roblox-ts v2.1.0
local default = {
	["0"] = 0,
	px = 1,
	["1"] = 1,
	["2"] = 2,
	["4"] = 4,
	["8"] = 8,
}
return {
	default = default,
}
--!strict
local Types = require(script.Parent.Types)

type ServerBridge = {
	Fire: (self: ServerBridge, target: Player | Types.PlayerContainer, content: Types.Content) -> (),
	Connect: (self: ServerBridge, callback: (player: Player, content: Types.Content?) -> ()) -> Connection,
	Once: (self: ServerBridge, callback: (player: Player, content: Types.Content?) -> ()) -> (),
	Wait: (self: ServerBridge, callback: (player: Player, content: Types.Content?) -> ()) -> (Player, Types.Content?),

	OnServerInvoke: ((player: Player, content: Types.Content) -> ...any)?,
	RateLimitActive: boolean,
	Logging: boolean,
}
type ClientBridge = {
	Fire: (self: ClientBridge, content: any?) -> (),
	Connect: (self: ClientBridge, callback: (content: Types.Content?) -> ()) -> Connection,
	Once: (self: ClientBridge, callback: (content: Types.Content?) -> ()) -> (),
	Wait: (self: ClientBridge, callback: (content: Types.Content?) -> ()) -> Types.Content,

	InvokeServerAsync: (self: ClientBridge, content: any?) -> ...Types.Content?,

	Logging: boolean,
}

type Connection = {
	Disconnect: () -> (),
}

export type Bridge = ServerBridge & ClientBridge

export type BridgeNet2 = {
	ReferenceBridge: (name: string) -> Bridge,

	ClientBridge: (name: string) -> ClientBridge,
	ServerBridge: (name: string) -> ServerBridge,

	ReferenceIdentifier: (name: string, maxWaitTime: number) -> Types.Identifier,

	Serialize: (identifierName: string) -> Types.Identifier,
	Deserialize: (compressedIdentifier: string) -> Types.Identifier,

	ToHex: (regularString: string) -> string,
	ToReadableHex: (regularString: string) -> string,
	FromHex: (hexadecimal: string) -> string,

	Players: (players: Types.Array<Player>) -> Types.SetPlayerContainer,
	AllPlayers: () -> Types.AllPlayerContainer,
	PlayersExcept: (excludedPlayers: Types.Array<Player>) -> Types.ExceptPlayerContainer,

	CreateUUID: () -> string,

	HandleInvalidPlayer: (handler: (player: Player) -> ()) -> (),
}

return nil
-- TUNING VALUES
----------------------------------------
-- Factor of torque applied to get the wheels spinning
-- Larger number generally means faster acceleration
local TORQUE = 9000
--[[Weight and CG]]
	Tune.Weight			= 1760		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		.2		,
	 --[[Height]]		.2		,
	 --[[Length]]		.2		}
	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

	--Unsprung Weight
	Tune.FWheelDensity	= 0.3		-- Front Wheel Density
	Tune.RWheelDensity	= 0.3		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1.5			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1.5			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
--Assigns BindAction to the Sprint function
ContextActionService:BindAction("Sprint",Sprint,true,Enum.KeyCode.LeftShift,Enum.KeyCode.RightShift)
--[[
	
	Mobile.TouchStarted(position)
	Mobile.TouchEnded(position)
	Mobile.TouchMoved(position, delta)
	Mobile.TouchTapInWorld(position)
	Mobile.TouchPinch(scale, state)
	
--]]



local Mobile = {}

local RAY = Ray.new
local workspace = workspace

local userInput = game:GetService("UserInputService")
local cam = workspace.CurrentCamera


function Mobile:GetRay(position)
	local viewportMouseRay = cam:ViewportPointToRay(position.X, position.Y)
	return RAY(viewportMouseRay.Origin, viewportMouseRay.Direction * 999)
end


function Mobile:Cast(position, ignoreDescendantsInstance, terrainCellsAreCubes, ignoreWater)
	return workspace:FindPartOnRay(self:GetRay(position), ignoreDescendantsInstance, terrainCellsAreCubes, ignoreWater)
end


function Mobile:CastWithIgnoreList(position, ignoreDescendantsTable, terrainCellsAreCubes, ignoreWater)
	return workspace:FindPartOnRayWithIgnoreList(self:GetRay(position), ignoreDescendantsTable, terrainCellsAreCubes, ignoreWater)
end


function Mobile:CastWithWhitelist(position, whitelistDescendantsTable, ignoreWater)
	return workspace:FindPartOnRayWithWhitelist(self:GetRay(position), whitelistDescendantsTable, ignoreWater)
end


function Mobile:Start()
	
end


function Mobile:Init()
	
	self.TouchStarted    = self.Shared.Event.new()
	self.TouchEnded      = self.Shared.Event.new()
	self.TouchMoved      = self.Shared.Event.new()
	self.TouchTapInWorld = self.Shared.Event.new()
	self.TouchPinch      = self.Shared.Event.new()
	
	userInput.TouchStarted:Connect(function(input, processed)
		if (processed) then return end
		self.TouchStarted:Fire(input.Position)
	end)
	
	userInput.TouchEnded:Connect(function(input, processed)
		self.TouchEnded:Fire(input.Position)
	end)
	
	userInput.TouchMoved:Connect(function(input, processed)
		if (processed) then return end
		self.TouchMoved:Fire(input.Position, input.Delta)
	end)
	
	userInput.TouchTapInWorld:Connect(function(position, processed)
		if (processed) then return end
		self.TouchTapInWorld:Fire(position)
	end)
	
	userInput.TouchPinch:Connect(function(touchPositions, scale, velocity, state, processed)
		if (processed) then return end
		self.TouchPinch:Fire(scale, state)
	end)
	
end


return Mobile
--add the power laser flickering here    
--skipped
wait(0.7)
Utils:CreateTween(game.Lighting.ColorCorrection,{0.25},{Contrast=1,Brightness=2},true)
wait(12)
game.Lighting.ColorCorrection.Contrast=-1
Utils:CreateTween(game.Lighting.ColorCorrection,{10},{TintColor=Color3.new(0,0,0)},true)
wait(12)
--[=[
	Converts the string to UpperCamelCase
	@param str string
	@return string
]=]
function String.toCamelCase(str: string): string
	str = str:lower()
	str = str:gsub("[ _](%a)", string.upper)
	str = str:gsub("^%a", string.upper)
	str = str:gsub("%p", "")

	return str
end
--- VARIABLES/CONSTANTS ---

THROW_MULTIPLIER = 0.25




local Tool = {}

Tool.MouseButton1 = function(Character, ExtraData) -- Throw
	local MousePosition = ExtraData[1]
	local Net = Character:FindFirstChildOfClass("Tool")
	
	if not Net:FindFirstChild("Display") then return end
	
	
	Character.Humanoid:LoadAnimation(script.Toss):Play()
	
	task.wait(0.3)
	
	local Model = Instance.new("Model", workspace.Debris)
	Model.Name = Character.Name.."_"..script.Name
	local CloneNet = Net:Clone()
	CloneNet.Display.Parent = Model
	CloneNet.Handle.Parent = Model
	CloneNet:Destroy()
	
	local Display = Net.Display
	Display.Parent = ServerStorage.PlayerStorage
	
	-- Throw Model.Handle
	local throwForce = 100*THROW_MULTIPLIER -- Adjust this value to change the throwing force

	local Handle = Model.Handle -- Assuming the net's handle is named "Handle"
	local BodyVelocity = Instance.new("BodyVelocity")
	BodyVelocity.Velocity = (MousePosition - Handle.Position).unit * throwForce + Vector3.new(0,50,0)
	BodyVelocity.P = math.huge -- Sets linear damping to zero so the net doesn't slow down over time
	BodyVelocity.Parent = Handle
	
	local Connection
	-- Connect touch function, trip enemy
	Connection = Handle.Touched:Connect(function(hit)
		if hit:IsDescendantOf(workspace.Enemies) and hit.Parent:FindFirstChild("Humanoid") then
			local VictimCharacter = hit.Parent
			local Humanoid = Character:FindFirstChildOfClass("Humanoid")
			
			Connection:Disconnect()
			
			Ragdoll.Toggle(VictimCharacter)
			
			Model:Destroy()
			
			-- Clone ServerStorage.Models.NetDisplay above the enemy to simulate the net falling on top of it, use its handle to cframe it
				-- This will be the visual representation of the net trapping the enemy
			local NetDisplay = ServerStorage.Models.NetDisplay:Clone()
			NetDisplay.Parent = workspace.Debris
			NetDisplay:MoveTo((VictimCharacter.HumanoidRootPart.CFrame * CFrame.new(0,5,0)).Position)
			
			--game.Debris:AddItem(NetDisplay, 10)
			
		end
	end)

	-- Optionally, you can remove the BodyVelocity after a certain amount of time
	local removeDelay = .5 -- Adjust this value to change the delay before removing the BodyVelocity
	wait(removeDelay)
	BodyVelocity:Destroy()
	
	task.wait(5)

	Display.Parent = Net
	
end
Tool.Z = function(Character)
	print("hai Z")
end
Tool.X = function(Character)
	print("hai X")
end	



return Tool
--[[Leaning]]--
	Tune.LeanSpeed				= .07 	-- How quickly the the bike will lean, .01 being slow, 1 being almost instantly
	Tune.LeanProgressiveness	= 30 	-- How much steering is kept at higher speeds, a lower number is less steering, a higher number is more steering
	Tune.MaxLean				= 45 	-- Maximum lean angle in degrees
	
	Tune.LeanD			= 90 		-- Dampening of the lean
	Tune.LeanMaxTorque	= 500 		-- Force of the lean
	Tune.LeanP			= 300 		-- Aggressiveness of the lean
--[[
	Calls a given callback on some specified interval until the
	clear function is called.

	The callback is given deltaTime since it was last called, along
	with any extra parameters passed to setInterval.

	The first callback call is made after intervalSeconds passes,
	i.e. it is not immediate.
--]]

local function setInterval(callback: (number, ...any) -> nil, intervalSeconds: number, ...: any)
	local cleared = false

	local function call(scheduledTime: number, ...: any)
		if cleared then
			return
		end

		local deltaTime = os.clock() - scheduledTime

		task.spawn(callback, deltaTime, ...)

		task.delay(intervalSeconds, call, os.clock(), ...)
	end

	local function clear()
		cleared = true
	end

	task.delay(intervalSeconds, call, os.clock(), ...)

	return clear
end

return setInterval
-- This is an overloaded function for TransparencyController:SetupTransparency(character)
-- Do not call directly, or it will throw an assertion!

function FpsCamera:SetupTransparency(character, ...)
	assert(self ~= FpsCamera)
	self:BaseSetupTransparency(character, ...)
	
	if self.AttachmentListener then
		self.AttachmentListener:Disconnect()
	end
	
	self.AttachmentListener = character.DescendantAdded:Connect(function (obj)
		if obj:IsA("Attachment") and self.HeadAttachments[obj.Name] then
			if typeof(self.cachedParts) == "table" then
				self.cachedParts[obj.Parent] = true
			end

			if self.transparencyDirty ~= nil then
				self.transparencyDirty = true
			end
		end
	end)
end
--[[Misc]]
Tune.LoadDelay		= .1		-- Delay before initializing chassis (in seconds)
Tune.AutoStart		= false		-- Set to false if using manual ignition plugin
Tune.AutoFlip		= false		-- Set to false if using manual flip plugin
--local tk = cr.Misc.TK
local vl = script.Parent.Values
local GBrake = vl.Brake
local gr = vl.Gear
local bk = vl.Brake.Value
-----------------
--| Variables |--
-----------------

local DebrisService = Game:GetService('Debris')
local PlayersService = Game:GetService('Players')

local Tool = script.Parent
local ToolHandle = Tool.Handle

local RocketScript = WaitForChild(script, 'Rocket')

local SwooshSound = WaitForChild(script, 'Swoosh')
local BoomSound = WaitForChild(script, 'Boom')
local ReloadSound = WaitForChild(ToolHandle, 'ReloadSound')

local MyModel = nil
local MyPlayer = nil

local BaseRocket = nil
local RocketClone = nil
--[[
	A symbol for representing nil values in contexts where nil is not usable.
]]

local Package = script.Parent.Parent
local Types = require(Package.Types)

return {
	type = "Symbol",
	name = "None"
} :: Types.None
--lights
local Red1 = script.Parent.Red1
local Red2 = script.Parent.Red2
local RL = script.Parent.RL
local RR = script.Parent.RR
local FL = script.Parent.FL
local FR = script.Parent.FR
local f1 = script.Parent.WhiteFront
local f2 = script.Parent.WhiteFront2
local r1 = script.Parent.WhiteBack
local r2 = script.Parent.WhiteBack2
local B1 = script.Parent.Brake
local B2 = script.Parent.Brake2

local lgt = script.Parent.Lighting.Light
local lgtsalon = script.Parent.salon.Light


function lightson()
	f1.Material = "Neon"
	f2.Material = "Neon"
	Red1.Material = "Neon"
	Red2.Material = "Neon"
	
	lgt.Enabled = true
	lgtsalon.Enabled = true
end
function lightsoff()
	f1.Material = "SmoothPlastic"
	f2.Material = "SmoothPlastic"
	Red1.Material = "SmoothPlastic"
	Red2.Material = "SmoothPlastic"
	
	lgt.Enabled = false
	lgtsalon.Enabled = false
end
function reverse()
	r1.Material = "Neon"
	r2.Material = "Neon"
end
function unreverse()
	r1.Material = "SmoothPlastic"
	r2.Material = "SmoothPlastic"
end
function brake()
	B1.Material = "Neon"
	B2.Material = "Neon"
end
function unbrake()
	B1.Material = "SmoothPlastic"
	B2.Material = "SmoothPlastic"
end
--Weld stuff here

MakeWeld(car.Misc.LMIRR.Handle,car.DriveSeat,"Motor",.1).Name="M"
ModelWeld(car.Misc.LMIRR,car.Misc.LMIRR.Handle)

MakeWeld(car.Misc.RMIRR.Handle,car.DriveSeat,"Motor",.1).Name="M"
ModelWeld(car.Misc.RMIRR,car.Misc.RMIRR.Handle)
-- Core selection system
Selection = {};
Selection.Items = {};
Selection.ItemIndex = {};
Selection.Outlines = {};
Selection.Color = BrickColor.new 'Cyan';
Selection.Multiselecting = false;
--//Name Updater

local Module = script.Parent.Parent.Parent.Parent.Parent.Settings
local Modulee = require(Module)
local Name = Modulee.CurrencyName

script.Parent.Name = Name.." : "..script.Parent.Parent.Parent.CurrencyToCollect.Value

script.Parent.Parent.Parent.CurrencyToCollect.Changed:connect(function()
	script.Parent.Name = Name.." : "..script.Parent.Parent.Parent.CurrencyToCollect.Value
end)
-- Variables:
local boat = script.Parent.Parent
local Animations = boat.Parent.Animations
local MainModel = boat.Main_Model
local MainPart = MainModel.MAIN
local PartsModel = boat.Parts
local GearShiftSound = MainPart.GearShift
local Values = MainModel.Values
local EngineOnVal = Values.EngineOn
local ThrustVal = Values.Thrust
local InWaterVal = Values.InWater
local BoatControlActivated = true

local EngineOn = false
local ReducingSpeed = false
local Thrust = 0
local TurnAngle = 0
local neutral = false
local SideThrusterSpeed = 0
--!strict
local Array = script.Parent.Parent
local LuauPolyfill = Array.Parent
local types = require(LuauPolyfill.types)
type Object = types.Object

type Array<T> = types.Array<T>
type mapFn<T, U> = (element: T, index: number) -> U
type mapFnWithThisArg<T, U> = (thisArg: any, element: T, index: number) -> U

return function<T, U>(
	value: Array<T>,
	mapFn: (mapFn<T, U> | mapFnWithThisArg<T, U>)?,
	thisArg: Object?
	-- FIXME Luau: need overloading so the return type on this is more sane and doesn't require manual casts
): Array<U> | Array<T> | Array<string>
	local array = {}

	if mapFn then
		local arrayLength = #(value :: Array<T>)
		array = table.create(arrayLength)
		for i = 1, arrayLength do
			if thisArg ~= nil then
				(array :: Array<U>)[i] = (mapFn :: mapFnWithThisArg<T, U>)(thisArg, (value :: Array<T>)[i], i)
			else
				(array :: Array<U>)[i] = (mapFn :: mapFn<T, U>)((value :: Array<T>)[i], i)
			end
		end
	else
		array = table.clone(value :: Array<T>)
	end

	return array
end
---------------------------------------------------------------
function onChildAdded(child)
	if child.Name == "SeatWeld" then
		local human = child.part1.Parent:findFirstChild("Humanoid") 
		if (human ~= nil) then
			print("Human IN")
			seat.SirenPanel.Control.CarName.Value = human.Parent.Name.."'s Car"
			seat.Parent.Name = human.Parent.Name.."'s Car"
			s.Parent.SirenPanel:clone().Parent = game.Players:findFirstChild(human.Parent.Name).PlayerGui
		end
	end
end

function onChildRemoved(child)
	if (child.Name == "SeatWeld") then	
		local human = child.part1.Parent:findFirstChild("Humanoid") 
		if (human ~= nil) then
			print("Human OUT")
			seat.Parent.Name = "Empty Car"
			seat.SirenPanel.Control.CarName.Value = "Empty Car"
			game.Players:findFirstChild(human.Parent.Name).PlayerGui.SirenPanel:remove()
		end
	end
end


script.Parent.ChildAdded:connect(onChildAdded)
script.Parent.ChildRemoved:connect(onChildRemoved)
-- ================================================================================
-- Settings - Speedster
-- ================================================================================

local Settings = {}

Settings.DefaultSpeed = 125		-- Speed when not boosted [Studs/second, Range 50-300]
Settings.BoostSpeed = 200		-- Speed when boosted [Studs/second, Maximum: 400]
Settings.BoostAmount = 6		-- Duration of boost in seconds
Settings.Steering = 5			-- How quickly the speeder turns [Range: 1-10]
--[[Wheel Alignment]]
	--[Don't physically apply alignment to wheels]
	--[Values are in degrees]
	Tune.FCamber		= 2
	Tune.RCamber		= -1
	Tune.FToe			= 0
	Tune.RToe			= 0