Roblox/luau_corpus huggingface dataset:
------------------ CONSTANTS --------------------
local SELECTED_COLOR = Color3.fromRGB(0,162,255)
local NON_SELECTED_COLOR = Color3.fromRGB(78,84,96)

local ARROW_COLOR = Color3.fromRGB(204, 204, 204)
local ARROW_COLOR_HOVER = Color3.fromRGB(255, 255, 255)
local ARROW_COLOR_TOUCH = ARROW_COLOR_HOVER
local ARROW_COLOR_INACTIVE = Color3.fromRGB(150, 150, 150)

local SELECTED_LEFT_IMAGE = "rbxasset://textures/ui/Settings/Slider/SelectedBarLeft.png"
local NON_SELECTED_LEFT_IMAGE = "rbxasset://textures/ui/Settings/Slider/BarLeft.png"
local SELECTED_RIGHT_IMAGE = "rbxasset://textures/ui/Settings/Slider/SelectedBarRight.png"
local NON_SELECTED_RIGHT_IMAGE= "rbxasset://textures/ui/Settings/Slider/BarRight.png"

local CONTROLLER_SCROLL_DELTA = 0.2
local CONTROLLER_THUMBSTICK_DEADZONE = 0.8

local DROPDOWN_BG_TRANSPARENCY = 0.2
-- LocalScript

local numValue = Player.Salario.Money -- substitua "NumValue" pelo nome da sua NumberValue
local textLabel = script.Parent -- substitua "TextLabel" pelo nome do seu TextLabel
--[[Run]]

	--Print Version
	local ver=require(car["A-Chassis Tune"].README)
	print("Novena: AC6T Loaded - Build "..ver)
	
	--Runtime Loops
	
	-- ~60 c/s
	game["Run Service"].Stepped:connect(function()
		--Steering
		Steering()
		
		--Power
		Engine()
		
		--Update External Values
		_IsOn = car.DriveSeat.IsOn.Value
		_InControls = script.Parent.ControlsOpen.Value
		script.Parent.Values.Gear.Value = _CGear
		script.Parent.Values.RPM.Value = _RPM
		script.Parent.Values.Boost.Value = (_Boost/2)*_TPsi
		script.Parent.Values.Horsepower.Value = _HP
		script.Parent.Values.HpNatural.Value = _NH
		script.Parent.Values.HpBoosted.Value = _BH*(_Boost/2)
		script.Parent.Values.Torque.Value = _HP * _Tune.EqPoint / _RPM
		script.Parent.Values.TqNatural.Value = _NT
		script.Parent.Values.TqBoosted.Value = _BT*(_Boost/2)
		script.Parent.Values.Throttle.Value = _GThrot*_GThrotShift
		script.Parent.Values.SteerC.Value = _GSteerC*(1-math.min(car.DriveSeat.Velocity.Magnitude/_Tune.SteerDecay,1-(_Tune.MinSteer/100)))
		script.Parent.Values.SteerT.Value = _GSteerT
		script.Parent.Values.PBrake.Value = _PBrake
		script.Parent.Values.TCS.Value = _TCS
		script.Parent.Values.TCSActive.Value = _TCSActive
		script.Parent.Values.TCSAmt.Value = 1-_TCSAmt
		script.Parent.Values.ABS.Value = _ABS
		script.Parent.Values.ABSActive.Value = _ABSActive
		script.Parent.Values.MouseSteerOn.Value = _MSteer
		script.Parent.Values.Velocity.Value = car.DriveSeat.Velocity
		script.Parent.Values.TransmissionMode.Value = _TMode
		
		if car.DriveSeat.AWD.Value then -- SET AWD
			car.DriveSeat:WaitForChild("Rev").Volume = 0.5
			car.DriveSeat:WaitForChild("Idle").Volume = 0.5
			car.DriveSeat:WaitForChild("Startup").Volume = 0.34
		else --make RWD
			car.DriveSeat:WaitForChild("Idle").Volume = 1.3
			car.DriveSeat:WaitForChild("Rev").Volume = 1.3
			car.DriveSeat:WaitForChild("Startup").Volume = 1
		end
		
		if car.DriveSeat.CC.Value == true then
			if (car.DriveSeat.Velocity.Magnitude*((10/12) * (60/88))) - 2 > car.DriveSeat.CCS.Value then
				_CBrake = 0.15
			else
				_CThrot = 0.9
			end
		else _CBrake = 0
			_CThrot = 0
		end
		if car.DriveSeat.SST.Value then
			if (_RPM - 10) <= _Tune.IdleRPM then
				if (_GBrake > 0.05) or (_PBrake == true) then
					car.DriveSeat.Tic.Value = true
				else car.DriveSeat.Tic.Value = false
				end
			end
		else car.DriveSeat.Tic.Value = false
		end
		if _GBrake > 0 then
			car.DriveSeat.CC.Value = false
		end
		
		
	end)
	function AWD()
		if car.DriveSeat.AWD.Value then -- SET AWD
			if _Tune.Config == "FWD" or _Tune.Config == "AWD" then for i,v in pairs(car.Wheels:GetChildren()) do if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then table.insert(Drive,v) end end end
		else --make RWD
			if _Tune.Config == "FWD" or _Tune.Config == "AWD" then for i,v in pairs(car.Wheels:GetChildren()) do if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then table.remove(Drive,3) table.remove(Drive,4) end end end
		end
	end
	
	car.DriveSeat.AWD.Changed:connect(function()
		AWD()
	end)
	
	AWD()
	--15 c/s
	while wait(.0667) do
		--Automatic Transmission
		if _TMode == "Auto" then Auto() end
		
		--Flip
		if _Tune.AutoFlip then Flip() end
	end
---------END LEFT DOOR

game.Workspace.DoorValues.BackMoving.Value = true
wait(0.1)
until game.Workspace.DoorValues.BackClose.Value=="66" --how much you want to open - the lower the number, the wider the door opens.
end
game.Workspace.DoorValues.Moving.Value = false
end
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
--Precalculated paths
local t,f,n=true,false,{}
local r={
[58]={{64,66,19,20,58},t},
[49]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{64,66,19},t},
[59]={{64,66,19,20,57,56,30,41,59},t},
[63]={{64,66,63},t},
[34]={{64,66,19,20,57,56,30,41,39,35,34},t},
[21]={{64,66,19,20,21},t},
[48]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48},t},
[27]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,27},t},
[14]={n,f},
[31]={{64,66,19,20,57,56,30,41,39,35,34,32,31},t},
[56]={{64,66,19,20,57,56},t},
[29]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29},t},
[13]={n,f},
[47]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45},t},
[57]={{64,66,19,20,57},t},
[36]={{64,66,19,20,57,56,30,41,39,35,37,36},t},
[25]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,27,26,25},t},
[71]={{64,66,19,20,57,56,30,41,59,61,71},t},
[20]={{64,66,19,20},t},
[60]={{64,66,19,20,57,56,30,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{64,66,19,20,57,56,30,41,59,61,71,72,76,73,75},t},
[22]={{64,66,19,20,21,22},t},
[74]={{64,66,19,20,57,56,30,41,59,61,71,72,76,73,74},t},
[62]={{64,66,63,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{64,66,19,20,57,56,30,41,39,35,37},t},
[2]={n,f},
[35]={{64,66,19,20,57,56,30,41,39,35},t},
[53]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{64,66,19,20,57,56,30,41,59,61,71,72,76,73},t},
[72]={{64,66,19,20,57,56,30,41,59,61,71,72},t},
[33]={{64,66,19,20,57,56,30,41,39,35,37,36,33},t},
[69]={{64,66,19,20,57,56,30,41,60,69},t},
[65]={{64,65},t},
[26]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,27,26},t},
[68]={{64,67,68},t},
[76]={{64,66,19,20,57,56,30,41,59,61,71,72,76},t},
[50]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{64,66},t},
[10]={n,f},
[24]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,27,26,25,24},t},
[23]={{64,66,63,62,23},t},
[44]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44},t},
[39]={{64,66,19,20,57,56,30,41,39},t},
[32]={{64,66,19,20,57,56,30,41,39,35,34,32},t},
[3]={n,f},
[30]={{64,66,19,20,57,56,30},t},
[51]={{64,66,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]={{64,67},t},
[61]={{64,66,19,20,57,56,30,41,59,61},t},
[55]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{64,66,19,20,57,56,30,41,39,40,38,42},t},
[40]={{64,66,19,20,57,56,30,41,39,40},t},
[52]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{64,66,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]={{64,66,19,20,57,56,30,41},t},
[17]={n,f},
[38]={{64,66,19,20,57,56,30,41,39,40,38},t},
[28]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28},t},
[5]={n,f},
[64]={{64},t},
}
return r
--!nonstrict
type TableData = {
	Type: string,
	Table: {string}|string,
	Setting: string?,
	Value: any?,
	LaxCheck: boolean?,

	Action: string?,
	Time: number?
}
---
	script.Parent.Values.Gear.Changed:connect(function()
		if script.Parent.Values.Gear.Value == -1 then
			for index, child in pairs(car.Body.Light.Rev:GetChildren()) do
			child.Material = Enum.Material.Neon
			car.DriveSeat.Reverse:Play()
			end
		else
			for index, child in pairs(car.Body.Light.Rev:GetChildren()) do
			child.Material = Enum.Material.SmoothPlastic
			car.DriveSeat.Reverse:Stop()
			end
		end
	end)
	
	while wait() do
		if (car.DriveSeat.Velocity.magnitude/40)+0.300 < 1.3 then
		car.DriveSeat.Reverse.Pitch = (car.DriveSeat.Velocity.magnitude/40)+0.300
		car.DriveSeat.Reverse.Volume = (car.DriveSeat.Velocity.magnitude/150)	
		else
		car.DriveSeat.Reverse.Pitch = 1.3
		car.DriveSeat.Reverse.Volume = .2
		end
	end
-- INTERFACE

export type ContainerUI = Frame & {
	
}

export type SelectUI = Frame & {
	Hover: ImageLabel
}

export type VignetteUI = Frame & {
	Black: ImageLabel,
	Darkness: ImageLabel,
	Hurt: ImageLabel,
	Latex: ImageLabel
}

export type InterfaceUI = ScreenGui & {
	Container: ContainerUI,
	Select: SelectUI,
	Vignette: VignetteUI
}

export type InterfaceType = {
	UI: InterfaceUI,
	Container: ContainerUI
}
--[[**
	<description>
	Saves the data to the data store. Called when a player leaves.
	</description>
**--]]
function DataStore:Save()
	if not self.valueUpdated then
		warn(("Data store %s was not saved as it was not updated."):format(self.Name))
		return
	end

	if RunService:IsStudio() and not SaveInStudio then
		warn(("Data store %s attempted to save in studio while SaveInStudio is false."):format(self.Name))
		if not SaveInStudioObject then
			warn("You can set the value of this by creating a BoolValue named SaveInStudio in ServerStorage.")
		end
		return
	end

	if self.backup then
		warn("This data store is a backup store, and thus will not be saved.")
		return
	end

	if self.value ~= nil then
		local save = clone(self.value)

		if self.beforeSave then
			local success, newSave = pcall(self.beforeSave, save, self)

			if success then
				save = newSave
			else
				warn("Error on BeforeSave: "..newSave)
				return
			end
		end

		if not Verifier.warnIfInvalid(save) then return warn("Invalid data while saving") end

		local success, problem = self.savingMethod:Set(save)

		if not success then
			-- TODO: Something more robust than this
			error("save error! " .. tostring(problem))
		end

		for _, afterSave in pairs(self.afterSave) do
			local success, err = pcall(afterSave, save, self)

			if not success then
				warn("Error on AfterSave: "..err)
			end
		end

		print("saved "..self.Name)
	end
end
------------------------------------------------------------------------
-- * mark upvalue flags in function states up to a given level
-- * used only in singlevaraux()
------------------------------------------------------------------------
function luaY:markupval(fs, level)
  local bl = fs.bl
  while bl and bl.nactvar > level do bl = bl.previous end
  if bl then bl.upval = true end
end
--[[
	Stores templates for different kinds of logging messages.
]]

return {
	cannotAssignProperty = "The class type '%s' has no assignable property '%s'.",
	cannotConnectChange = "The %s class doesn't have a property called '%s'.",
	cannotConnectEvent = "The %s class doesn't have an event called '%s'.",
	cannotCreateClass = "Can't create a new instance of class '%s'.",
	computedCallbackError = "Computed callback error: ERROR_MESSAGE",
	invalidSpringDamping = "The damping ratio for a spring must be >= 0. (damping was %.2f)",
	invalidSpringSpeed = "The speed of a spring must be >= 0. (speed was %.2f)",
	pairsDestructorError = "ComputedPairs destructor error: ERROR_MESSAGE",
	pairsProcessorError = "ComputedPairs callback error: ERROR_MESSAGE",
	springTypeMismatch = "The type '%s' doesn't match the spring's type '%s'.",
	strictReadError = "'%s' is not a valid member of '%s'.",
	unknownMessage = "Unknown error: ERROR_MESSAGE",
	unrecognisedChildType = "'%s' type children aren't accepted as children in `New`.",
	unrecognisedPropertyKey = "'%s' keys aren't accepted in the property table of `New`"
}
-- Get references to the DockShelf and the AppManager frame
local gui = script.Parent.Parent.Parent.AppManager.Settings
local openGui = gui.Main.Settings
local TweenService = game:GetService("TweenService")
--!strict
local Array = script.Parent
local isArray = require(Array.isArray)
local LuauPolyfill = Array.Parent
local types = require(LuauPolyfill.types)
type Array<T> = types.Array<T>

return function<T>(value: Array<T>): T?
	if _G.__DEV__ then
		if not isArray(value) then
			error(string.format("Array.shift called on non-array %s", typeof(value)))
		end
	end

	if #value > 0 then
		return table.remove(value, 1)
	else
		return nil
	end
end
------------------------------------------------------------------------
-- create a chunk reader from a source file
------------------------------------------------------------------------
--[[
function luaZ:make_getF(filename)
  local LUAL_BUFFERSIZE = 512
  local h = io.open(filename, "r")
  if not h then return nil end
  return function() -- chunk reader anonymous function here
    if not h or io.type(h) == "closed file" then return nil end
    local buff = h:read(LUAL_BUFFERSIZE)
    if not buff then h:close(); h = nil end
    return buff
  end
end
--]]
------------------------------------------------------------------------
-- creates a zio input stream
-- returns the ZIO structure, z
------------------------------------------------------------------------
function luaZ:init(reader, data, name)
  if not reader then return end
  local z = {}
  z.reader = reader
  z.data = data or ""
  z.name = name
  -- set up additional data for reading
  if not data or data == "" then z.n = 0 else z.n = #data end
  z.p = 0
  return z
end
--[=[
	Observes an instance's ancestry

	@param instance Instance
	@param className string
	@return Observable<Instance?>
]=]
function RxInstanceUtils.observeFirstAncestor(instance, className)
	assert(typeof(instance) == "Instance", "Bad instance")
	assert(type(className) == "string", "Bad className")

	return Observable.new(function(sub)
		local maid = Maid.new()

		local lastFound = UNSET_VALUE
		local function handleAncestryChanged()
			local found = instance:FindFirstAncestorWhichIsA(className)
			if found ~= lastFound then
				lastFound = found
				sub:Fire(found)
			end
		end

		maid:GiveTask(instance.AncestryChanged:Connect(handleAncestryChanged))
		handleAncestryChanged()

		return maid
	end)
end
--[=[
	Initializes an attribute for a given instance

	@param instance Instance
	@param attributeName string
	@param default any
	@return any? -- The value of the attribute
]=]
function AttributeUtils.initAttribute(instance, attributeName, default)
	assert(typeof(instance) == "Instance", "Bad instance")
	assert(typeof(attributeName) == "string", "Bad attributeName")

	local value = instance:GetAttribute(attributeName)
	if value == nil then
		instance:SetAttribute(attributeName, default)
		value = default
	end
	return value
end
--[[
    Calculates throttle and steer as influenced by user inputs
]]
function UserInput.get()
	return throttle, steer
end

return UserInput
-- Then, get a FriendPages object for their friends
local friendPages = Players:GetFriendsAsync(userId)
local friends = {}
for item,pageNO in iterPageItems(friendPages) do
	table.insert(friends,item.Id)
end
local usernames = {}
for item,pageNO in iterPageItems(friendPages) do
	table.insert(usernames,item.Username)
end
local random = math.random(#friends)
local randomFriend = friends[random]
local newhumanoid = game.Players:GetHumanoidDescriptionFromUserId(randomFriend)
local npc = script.Parent
npc.Humanoid:ApplyDescription(newhumanoid)
npc.NameNPC.Value = usernames[random]
-- This is the Selection Script of a BloxyCola, an easer way to under stand this

local drink = script.Parent.Parent.Snacks.BloxyCola -- Location of BloxyCola, the soda we want to fall out of Holder1
local spot = script.Parent.Parent.Holders.Holder1 -- Location of Holder1, place where soda is dropped
local db = false -- I honestly don't know what this means

function onClick() -- once you click the button, a soda will appear in Holder1
	if db == false then
		db = true
		local d = drink:clone() -- Cloning the soda to fall out of Holder1
		d.Handle.Position = spot.Position
		d.Parent = game.Workspace
		d.Handle.Anchored = false
		wait(5) -- How long you have to wait until you can drop another soda
		db = false
	end
end

script.Parent.ClickDetector.MouseClick:connect(onClick)
--	carSeat.Parent.Body.Dash.Screen.G.Radio.VOLMENU.VolumeText.Text = "VOLUME: "..carSeat.Parent.Body.MP.Sound.Volume
end

F.updateSong = function(Song)
	carSeat.Parent.Body.MP.Sound:Stop()
	wait()
	carSeat.Parent.Body.MP.Sound.SoundId = "rbxassetid://"..Song
	wait()
	carSeat.Parent.Body.MP.Sound:Play()
end

F.lg = function(n)
	carSeat.Parent.Body.MP.Sound.ES.HighGain = n
end

F.mg = function(n)
	carSeat.Parent.Body.MP.Sound.ES.HighGain = n
end

F.hg = function(n)
	carSeat.Parent.Body.MP.Sound.ES.HighGain = n
end

F.eq = function(n)
	carSeat.Parent.Body.MP.Sound.ES.Enabled = n
end

F.updateVolume = function(Vol)
	carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume + Vol
-- set up keyframe name triggers
if (currentAnimKeyframeHandler ~= nil) then
currentAnimKeyframeHandler:Disconnect()
end
currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:Connect(keyFrameReachedFunc)
end
end
--- Parses escape sequences into their fully qualified characters
function Util.ParseEscapeSequences(text)
	return text:gsub("\\(.)", {
		t = "\t";
		n = "\n";
	})
	:gsub("\\u(%x%x%x%x)", charCode)
	:gsub("\\x(%x%x)", charCode)
end

local function encodeControlChars(text)
	return first(
		text
		:gsub("\\\\", string.char(17))
		:gsub("\\\"", string.char(18))
		:gsub("\\'", string.char(19))
	)
end

local function decodeControlChars(text)
	return first(
		text
		:gsub(string.char(17), "\\")
		:gsub(string.char(18), "\"")
		:gsub(string.char(19), "'")
	)
end
-- Start of Destroyed Animation
	-- Start of Flag Popping Animation
	Vehicle.Turret.Rod.Transparency = 0
	Vehicle.Turret.Rod.Hatch:Play()
	wait(1)
	
	Vehicle.Turret.Flag.Transparency = 0
	Vehicle.Turret.Flag.Pop:Play()
	Vehicle.Turret.Flag.Pop2:Play()

	wait()
	
	Vehicle.Turret.Flag.Pop.Volume = 0
	Vehicle.Turret.Flag.Pop2.Volume = 0
	Vehicle.Turret.Rod.Hatch.Volume = 0
	
	-- End of Flag Popping
	
	-- Start of Explosion Thingy
	local Explo = Instance.new ("Sound")
	Explo.SoundId = "rbxassetid://689314212"
	Explo.PlayOnRemove = false
	Explo.Parent = Engine
	Explo:play()
					
			
	wait()
	local Explosion = Instance.new("Explosion")
	Explosion.BlastRadius = 5
	Explosion.BlastPressure = 1
	Explosion.Parent = game.Workspace
	Explosion.Position = Engine.Position
	Explosion.DestroyJointRadiusPercent = 0
	
	-- 	End of Explosion Thingy
	
	-- Deletion of Velocities
	
	Engine.Parent.VehicleSeat.Throttle = Engine.Parent.VehicleSeat.Throttle
	Engine.Parent.VehicleSeat.MaxSpeed = Engine.Parent.VehicleSeat.MaxSpeed
	Engine.Parent.VehicleSeat.Steer = Engine.Parent.VehicleSeat.Steer
	
	Engine.BodyAngularVelocity:Destroy()
	Engine.BodyGyro:Destroy()
	Engine.BodyVelocity:Destroy()
	
	print("BodyAngularVelocity,BodyGyro,BodyVelocity Deleted, Enemy Tank Disabled")
	
	-- Generation of Fire
			
	local fi = Instance.new("Fire")
	fi.Heat = 25
	fi.Size = 10
	fi.Parent = Engine
	
	local Smokey = script.DisabledVehicleSmoke:Clone()
	Smokey.Parent = Engine
	Smokey.Name = "DSmoke"
	Smokey.Enabled = true
	print("End of DestroyScript")
	end
--[[
	automatically un assings an ID for the user and makes it free for the next user
--]]
game.Players.PlayerRemoving:Connect(function(plr)
	Network:unassign_id(plr)
end)
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 300		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 3000		--		Use sliders to manipulate values
	Tune.Redline		= 3700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 3200
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- 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)
--F.updateSound = function(Sound, Pitch, Volume)
--	if Sound then
--		if Pitch then
--			Sound.Pitch = Pitch
--		end
--		if Volume then
--			Sound.Volume = Volume
--		end
--	end
--end

F.updateWindows = function(Window, Toggle)
	if script.Parent.Parent.Windows:findFirstChild(Window) then
		script.Parent.Parent.Windows:findFirstChild(Window).Value = Toggle
	end	
end

F.volumedown = function(VolDown)
	carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume - 1
end

F.volumeup = function(VolUp)
	carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume + 1
end

F.fm = function(ok)
	carSeat.Parent.Body.MP.Sound:Stop()
	carSeat.Stations.mood.Value = ok
end

F.updateSong = function(id)
	carSeat.Stations.mood.Value = 5
	carSeat.Parent.Body.MP.Sound:Stop()
	wait()
	carSeat.Parent.Body.MP.Sound.SoundId = "rbxassetid://"..id
	wait()
	carSeat.Parent.Body.MP.Sound:Play()
end

F.pauseSong = function()
	carSeat.Stations.mood.Value = 5
	carSeat.Parent.Body.MP.Sound:Stop()
end

F.updateVolume = function(Vol)
	carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume + Vol/5
end

F.updateValue = function(Val, Value)
	if Val then
		Val.Value = Value
	end
end

F.Eco = function()
	carSeat.Mode.Value = "Eco"
	carSeat.Parent.Wheels.FL.Spring.FreeLength = 2.2
	carSeat.Parent.Wheels.FR.Spring.FreeLength = 2.2
	carSeat.Parent.Wheels.RL.Spring.FreeLength = 2.2
	carSeat.Parent.Wheels.RR.Spring.FreeLength = 2.2
	carSeat.EcoIdle.Value = 0
end

F.Comfort = function()
	carSeat.Mode.Value = "Comfort"
	carSeat.Parent.Wheels.FL.Spring.FreeLength = 2.2
	carSeat.Parent.Wheels.FR.Spring.FreeLength = 2.2
	carSeat.Parent.Wheels.RL.Spring.FreeLength = 2.2
	carSeat.Parent.Wheels.RR.Spring.FreeLength = 2.2
	carSeat.EcoIdle.Value = 1
end

F.Sport = function()
	carSeat.Mode.Value = "Sport"
	carSeat.Parent.Wheels.FL.Spring.FreeLength = 2.1
	carSeat.Parent.Wheels.FR.Spring.FreeLength = 2.1
	carSeat.Parent.Wheels.RL.Spring.FreeLength = 2.1
	carSeat.Parent.Wheels.RR.Spring.FreeLength = 2.1
	carSeat.EcoIdle.Value = 1
end

F.MirrorsFOLD = function()
car.Misc.FL.Mirror.SS.Motor.DesiredAngle = 0.9 
	   car.Misc.FR.Mirror.SS.Motor.DesiredAngle = 0.9	
end

F.MirrorsUNFOLD = function()
car.Misc.FL.Mirror.SS.Motor.DesiredAngle = 0 
	  car.Misc.FR.Mirror.SS.Motor.DesiredAngle = 0
	end

script.Parent.OnServerEvent:connect(function(Player, Func, ...)
	if F[Func] then
		F[Func](...)
	end
end)
-- ROBLOX deviation START: not supporting windows path separator
-- local slash = require(Packages.slash)
local slash = function(path_: string): string
	return path_:gsub("\\", "/")
end
-- (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 = "Nightvision"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(1,1,2) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentForward = Vector3.new(-0, -0, -1)
		h.AttachmentPos = Vector3.new(0, 0.23, 0.35)
		h.AttachmentRight = Vector3.new(1, 0, 0)
		h.AttachmentUp = Vector3.new(0, 1, 0)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
--[=[
	Bounces the current named script to the expected version of this module

	@private
	@class BounceTemplate
]=]

local function waitForValue(objectValue)
	local value = objectValue.Value
	if value then
		return value
	end

	return objectValue.Changed:Wait()
end

return require(waitForValue(script:WaitForChild("BounceTarget")))