Roblox/luau_corpus huggingface dataset:
--Leave this
Heat = 0

if GUI then
	script.Parent.Visible = true
else
	script.Parent.Visible = false
end

if not FE then
	
radiator.Oil.Enabled = false
radiator.Antifreeze.Enabled = false
radiator.Liquid.Volume = 0
radiator.Fan:Play()
radiator.Fan.Pitch = 1+FanSpeed
radiator.Steam:Play()
radiator.Liquid:Play()
script.Blown.Value = false

while wait(.2) do
	if Heat > FanTemp and Fan == true then
		FanCool = -FanSpeed
		radiator.Fan.Volume = FanVolume
	elseif Heat < FanTempAlpha then
		FanCool = 0
		radiator.Fan.Volume = 0
	end
	
	Load = ((script.Parent.Parent.Values.Throttle.Value*script.Parent.Parent.Values.RPM.Value*10*OverheatSpeed)/math.ceil((car.DriveSeat.Velocity.magnitude+.0000001)/100)/75000)-CoolingEfficiency
	Heat = math.max(RunningTemp,(Heat+Load)+FanCool)
	
	if Heat >= BlowupTemp then
		Heat = BlowupTemp
		radiator.Break:Play()
		radiator.Liquid.Volume = .5
		radiator.Oil.Enabled = true
		radiator.Antifreeze.Enabled = true
		script.Parent.Parent.IsOn.Value = false
		script.Blown.Value = true
	elseif Heat >= BlowupTemp-10 then
		radiator.Smoke.Transparency = NumberSequence.new((BlowupTemp-Heat)/10,1)
		radiator.Smoke.Enabled = true
		radiator.Steam.Volume = math.abs(((BlowupTemp-Heat)-10)/10)
	else
		radiator.Smoke.Enabled = false
		radiator.Steam.Volume = 0
	end
	
	script.Celsius.Value = Heat
	script.Parent.Temp.Text = math.floor(Heat).."°c"
	script.Parent.Temp.TextColor3 = Color3.fromRGB(255,255-((Heat-FanTemp)*10),255-((Heat-FanTemp)*10))
end

else

	handler:FireServer("Initialize",FanSpeed)
while wait(.2) do
	
	if Heat > FanTemp and Fan == true then
		FanCool = -FanSpeed
		handler:FireServer("FanVolume",FanVolume)
	else
		FanCool = 0
		handler:FireServer("FanVolume",0)
	end
	
	Load = ((script.Parent.Parent.Values.Throttle.Value*script.Parent.Parent.Values.RPM.Value*10*OverheatSpeed)/math.ceil((car.DriveSeat.Velocity.magnitude+.0000001)/100)/75000)-CoolingEfficiency
	Heat = math.max(RunningTemp,(Heat+Load)+FanCool)
	
	if Heat >= BlowupTemp then
		Heat = BlowupTemp
		handler:FireServer("Blown")
		script.Parent.Parent.IsOn.Value = false
		script.Blown.Value = true
	elseif Heat >= BlowupTemp-10 then
		handler:FireServer("Smoke",true,BlowupTemp,Heat)
	else
		handler:FireServer("Smoke",false,BlowupTemp,Heat)
	end
	
	script.Celsius.Value = Heat
	script.Parent.Temp.Text = math.floor(Heat).."°c"
end
end
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  

local prev
local parts = script.Parent:GetChildren()
for i = 1,#parts do
	if ((parts[i].className == "Part") or (parts[i].className == "Handle") or (parts[i].className == "TrussPart") or (parts[i].className == "VehicleSeat") or (parts[i].className == "SkateboardPlatform")) then
		if (prev ~= nil) then
			local weld = Instance.new("Weld")
			weld.Part0 = prev
			weld.Part1 = parts[i]
			weld.C0 = prev.CFrame:inverse(Engine)
			weld.C1 = parts[i].CFrame:inverse(Part)
			weld.Parent = prev
			parts[i].Anchored = false
		end
		prev = parts[i]
	end
end


local bp = Instance.new("BodyPosition")
bp.Parent = script.Parent.middle
bp.maxForce = Vector3.new(force,0,force)
bp.D = 250
bp.position = script.Parent.middle.Position
wait()

script.Parent.Hinges.Parta.Transparency = 1
script.Parent.Hinges.Partb.Transparency = 1

local people = script.Parent:GetChildren()
for i = 1,#people do
if people[i].className == "Part" then
people[i].TopSurface = "SmoothNoOutlines"
people[i].BottomSurface = "SmoothNoOutlines"
people[i].LeftSurface = "SmoothNoOutlines"
people[i].RightSurface = "SmoothNoOutlines"
people[i].FrontSurface = "SmoothNoOutlines"
people[i].BackSurface = "SmoothNoOutlines"
people[i].Anchored = false
end end
--[=[
	@param overridePos Vector2?
	@return viewportMouseRay: Ray

	Returns the viewport point ray for the mouse at the current mouse
	position (or the override position if provided).
]=]
function Mouse:GetRay(overridePos)
	local mousePos = overridePos or UserInputService:GetMouseLocation()
	local viewportMouseRay = workspace.CurrentCamera:ViewportPointToRay(mousePos.X, mousePos.Y)
	return viewportMouseRay
end
-- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local PlayersService = game:GetService("Players")
---
local  Paint = false
	
script.Parent.MouseButton1Click:connect(function()
	Paint = not Paint
	handler:FireServer("Burgundy",Paint)
end)
-- The subset of a Thenable required by things thrown by Suspense.
-- This doesn't require a value to be passed to either handler.
export type Wakeable = {
	andThen: (
		self: Wakeable,
		onFulfill: () -> ...any,
		onReject: () -> ...any
		-- ROBLOX FIXME Luau: needs union type packs to parse () | Wakeable
	) -> nil | Wakeable,
	-- Special flag to opt out of tracing interactions across a Suspense boundary.
	__reactDoNotTraceInteractions: boolean?,
}
--handler:FireServer("stopSound",Your sound here)
wait()
handler:FireServer("playSound",car.DriveSeat.Rev)
--Aspiration Setup

_TCount = _Tune.Turbochargers
_TPsi = _Tune.T_Boost*_Tune.Turbochargers

_SCount = _Tune.Superchargers
_SPsi = _Tune.S_Boost*_Tune.Superchargers
--------RIGHT DOOR --------
game.Workspace.doorright.l11.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l12.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l13.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l43.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l71.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l73.BrickColor = BrickColor.new(106)

game.Workspace.doorright.l21.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l22.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l23.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l52.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l53.BrickColor = BrickColor.new(21)

game.Workspace.doorright.l31.BrickColor = BrickColor.new(133)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(133)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(133)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(133)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(133)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(133)

game.Workspace.doorright.pillar.BrickColor = BrickColor.new(106)
-- VALORES DE AJUSTE
----------------------------------------
-- Fator de torque aplicado para fazer as rodas girarem
-- Número maior geralmente significa aceleração mais rápida
local TORQUE = 9000
--NOTE: We create the rocket once and then clone it when the player fires
local Rocket = Instance.new('Part') do
	-- Set up the rocket part
	Rocket.Name = 'Rocket'
	Rocket.FormFactor = Enum.FormFactor.Custom --NOTE: This must be done before changing Size
	Rocket.Size = ROCKET_PART_SIZE
	Rocket.CanCollide = false

	-- Add the mesh
	local mesh = Instance.new('SpecialMesh', Rocket)
	mesh.MeshId = MISSILE_MESH_ID
	mesh.Scale = MISSILE_MESH_SCALE

	-- Add fire
	local fire = Instance.new('Fire', Rocket)
	fire.Heat = 5
	fire.Size = 2

	-- Add a force to counteract gravity
	local bodyForce = Instance.new('BodyForce', Rocket)
	bodyForce.Name = 'Antigravity'
	bodyForce.Force = Vector3.new(0, Rocket:GetMass() * GRAVITY_ACCELERATION, 0)

	-- Clone the sounds and set Boom to PlayOnRemove
	local swooshSoundClone = SwooshSound:Clone()
	swooshSoundClone.Parent = Rocket
	local boomSoundClone = BoomSound:Clone()
	boomSoundClone.PlayOnRemove = true
	boomSoundClone.Parent = Rocket

	-- Attach creator tags to the rocket early on
	local creatorTag = Instance.new('ObjectValue', Rocket)
	creatorTag.Value = MyPlayer
	creatorTag.Name = 'creator' --NOTE: Must be called 'creator' for website stats
	local iconTag = Instance.new('StringValue', creatorTag)
	iconTag.Value = Tool.TextureId
	iconTag.Name = 'icon'

	-- Finally, clone the rocket script and enable it
	local rocketScriptClone = RocketScript:Clone()
	rocketScriptClone.Parent = Rocket
	rocketScriptClone.Disabled = false
end
--[[**
	ensures Roblox TweenInfo type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.TweenInfo = t.typeof("TweenInfo")
--[[ SERVICES ]]
local PlayersService = game:GetService('Players')
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ChatService = game:GetService("Chat")
-------------------------------------------------------------------
function regenerate()
	Click.MaxActivationDistance = 0
	enabled = false
	if DeleteEmptyModels then
		GUIText.Text = "DELETING UNUSED MODELS"
		for _,v in pairs(game.Workspace:GetDescendants())do
			if v.Name == ModelName and v:IsA("Model") then
				local Delete = CheckDeletes(v,true)
				if Delete == true then
					v:Destroy()
				end
			end
		end
	end
	wait()
	if model.PrimaryPart ~= nil and (model.PrimaryPart.CFrame.p-script.Parent.CFrame.p).Magnitude>50 then
		model = backup:clone()
		model.Parent = game.Workspace
		Cooldown()
	else
		model = backup:clone()
		model.Parent = game.Workspace
		Cooldown()
	end
end
--[[
	[Horizontal and Vertical limits for head and body tracking.]
	[Setting to 0 negates tracking, setting to 1 is normal tracking, and setting to anything higher than 1 goes past real life head/body rotation capabilities.]
--]]
local HeadHorFactor = 1
local HeadVertFactor = 0.6
local BodyHorFactor = 0.5
local BodyVertFactor = 0.4
--// bolekinds

if game.ServerStorage.ServerData.CatBed.Value == true then
	game.ServerStorage["Cat Bed"]:Clone().Parent = workspace
else
	if workspace:FindFirstChild("Cat Bed") then
		workspace:FindFirstChild("Cat Bed"):Destroy()
	end
end

game.ServerStorage.ServerData.CatBed.Changed:Connect(function()
	if not workspace:FindFirstChild("Cat Bed") and game.ServerStorage.ServerData.CatBed.Value == true then
		game.ServerStorage["Cat Bed"]:Clone().Parent = workspace
	else
		if game.ServerStorage.ServerData.CatBed.Value == false then
			if workspace:FindFirstChild("Cat Bed") then
				workspace:FindFirstChild("Cat Bed"):Destroy()
			end
		end
	end
end)
--[[Drivetrain Initialize]]

	local Drive={}
	
	--Power Front Wheels
		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
	
	--Power Rear Wheels
-- Define a function to handle button clicks and ban the player
function onBanButtonClicked()
	local playerId = tonumber(idTextBox.Text)
	if playerId then
		local success, result = pcall(function()
			return banPlayerRemote:A(playerId)
		end)
		if success and result then
			idTextBox.Text = ""
			idTextBox.PlaceholderText = "Player ID"
			idTextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
			idTextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
		else
			idTextBox.TextColor3 = Color3.fromRGB(255, 0, 0)
			idTextBox.BackgroundColor3 = Color3.fromRGB(255, 200, 200)
			idTextBox.PlaceholderText = "Invalid ID"
		end
	else
		idTextBox.TextColor3 = Color3.fromRGB(255, 0, 0)
		idTextBox.BackgroundColor3 = Color3.fromRGB(255, 200, 200)
		idTextBox.PlaceholderText = "Invalid ID"
	end
end
--// Extras
	WalkAnimEnabled = true; -- Set to false to disable walking animation, true to enable
	SwayEnabled = true;	 -- Set to false to disable sway, true to enable
	TacticalModeEnabled = true;
--[[
	
	Detects if an enemy is close by and if the agent can see the enemy.
	
	This will return the currently selected target if one is present
]]

function AngleBetweenVectors(a, b)
    return math.acos(a:Dot(b) / (a.Magnitude * b.Magnitude))
end

return function( self )
	
	--local Target = self.Target
	local ClosestCharacter = nil
	local ClosestDistance = self.MaxDetectionRange
	--if not Target then
		for _,plr in pairs(game.Players:GetPlayers()) do
			if plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then
				local dist = (plr.Character.HumanoidRootPart.Position - self.HumanoidRootPart.Position).magnitude

				--[[print("Dot:",self.HumanoidRootPart.CFrame.lookVector:Dot(
						plr.Character.HumanoidRootPart.Position 
						- self.HumanoidRootPart.Position))]]

				if dist < ClosestDistance 
					and -- Get the dot product to see if the NPC can see the player
					--[[self.HumanoidRootPart.CFrame.lookVector:Dot(
						plr.Character.HumanoidRootPart.Position 
						- self.HumanoidRootPart.Position) > (self.MaxDetectionAngle/360)]]
						math.deg(AngleBetweenVectors(self.HumanoidRootPart.CFrame.lookVector, plr.Character.HumanoidRootPart.Position
		- self.HumanoidRootPart.Position)) <= self.MaxDetectionAngle/2
					then
					ClosestDistance = dist
					ClosestCharacter = plr.Character
				end
			end
		end
	--end


	self.ClosestEnemy = ClosestCharacter
	if self.ClosestEnemy then
		--print("EnemyIsNearby,",true)
		--print("Closest Character:",self.ClosestEnemy.Name)
		self:AddAggro( self.ClosestEnemy,.0000001 ) -- we're adding a tiny aggro amount so that damages will take priority
		return true
	else
		--print("EnemyIsNearby,",false)
		return false
	end
end
--move current data down
script.Parent.Parent.AgeBoxtwo.Text=script.Parent.Parent.AgeBox.Text
script.Parent.Parent.NameBoxtwo.Text=script.Parent.Parent.NameBox.Text
script.Parent.Parent.UserIDBoxtwo.Text=script.Parent.Parent.UserIDBox.Text
-------- OMG HAX

r = game:service("RunService")


local damage = 18


local slash_damage = 18


sword = script.Parent.Handle
Tool = script.Parent


local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
SlashSound.Parent = sword
SlashSound.Volume = 1


local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1


function blow(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
	if humanoid~=nil and humanoid ~= hum and hum ~= nil then
		-- final check, make sure sword is in-hand

		local right_arm = vCharacter:FindFirstChild("Right Arm")
		if (right_arm ~= nil) then
			local joint = right_arm:FindFirstChild("RightGrip")
			if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
				tagHumanoid(humanoid, vPlayer)
				humanoid:TakeDamage(damage)
				wait(1)
				untagHumanoid(humanoid)
			end
		end


	end
end


function tagHumanoid(humanoid, player)
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = humanoid
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end


function attack()
	damage = slash_damage
	SlashSound:play()
	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Slash"
	anim.Parent = Tool
end


function swordUp()
	Tool.GripForward = Vector3.new(-1,0,0)
	Tool.GripRight = Vector3.new(0,1,0)
	Tool.GripUp = Vector3.new(0,0,1)
end

function swordOut()
	Tool.GripForward = Vector3.new(0,0,1)
	Tool.GripRight = Vector3.new(0,-1,0)
	Tool.GripUp = Vector3.new(-1,0,0)
end



Tool.Enabled = true

function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return 
	end

	

	attack()

	wait(1)

	Tool.Enabled = true
end


function onEquipped()
	UnsheathSound:play()
end


script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)


connection = sword.Touched:connect(blow)
--[[**
	<description>
	Gets the result from the data store. Will yield the first time it is called.
	</description>

	<parameter name = "defaultValue">
	The default result if there is no result in the data store.
	</parameter>

	<parameter name = "dontAttemptGet">
	If there is no cached result, just return nil.
	</parameter>

	<returns>
	The value in the data store if there is no cached result. The cached result otherwise.
	</returns>
**--]]
function DataStore:Get(defaultValue, dontAttemptGet)
	if dontAttemptGet then
		return self.value
	end

	local backupCount = 0

	if not self.haveValue then
		while not self.haveValue do
			local success, error = pcall(self._GetRaw, self)

			if not success then
				if self.backupRetries then
					backupCount = backupCount + 1

					if backupCount >= self.backupRetries then
						self.backup = true
						self.haveValue = true
						self.value = self.backupValue
						break
					end
				end

				self:Debug("Get returned error:", error)
			end
		end

		if self.value ~= nil then
			for _,modifier in pairs(self.beforeInitialGet) do
				self.value = modifier(self.value, self)
			end
		end
	end

	local value

	if self.value == nil and defaultValue ~= nil then --not using "not" because false is a possible value
		value = defaultValue
	else
		value = self.value
	end

	value = clone(value)

	self.value = value

	return value
end
--[=[
	Returns the results from the promise.

	:::warning
	This API surface will error if the promise is still pending.
	:::

	@return boolean -- true if resolved, false otherwise.
	@return any
]=]
function Promise:GetResults()
	if self._rejected then
		return false, unpack(self._rejected, 1, self._valuesLength)
	elseif self._fulfilled then
		return true, unpack(self._fulfilled, 1, self._valuesLength)
	else
		error("Still pending")
	end
end

function Promise:_getResolveReject()
	return function(...)
		self:Resolve(...)
	end, function(...)
		self:_reject({...}, select("#", ...))
	end
end
-- A variant of the function above that returns the velocity at a given point in time.
local function GetVelocityAtTime(time: number, initialVelocity: Vector3, acceleration: Vector3): Vector3
	return initialVelocity + acceleration * time
end

local function GetTrajectoryInfo(cast: ActiveCast, index: number): {[number]: Vector3}
	assert(cast.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	local trajectories = cast.StateInfo.Trajectories
	local trajectory = trajectories[index]
	local duration = trajectory.EndTime - trajectory.StartTime
	
	local origin = trajectory.Origin
	local vel = trajectory.InitialVelocity
	local accel = trajectory.Acceleration
	
	return {GetPositionAtTime(duration, origin, vel, accel), GetVelocityAtTime(duration, vel, accel)}
end

local function GetLatestTrajectoryEndInfo(cast: ActiveCast): {[number]: Vector3}
	assert(cast.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	return GetTrajectoryInfo(cast, #cast.StateInfo.Trajectories)
end

local function CloneCastParams(params: RaycastParams): RaycastParams
	local clone = RaycastParams.new()
	clone.CollisionGroup = params.CollisionGroup
	clone.FilterType = params.FilterType
	clone.FilterDescendantsInstances = params.FilterDescendantsInstances
	clone.IgnoreWater = params.IgnoreWater
	return clone
end

local function SendRayHit(cast: ActiveCast, resultOfCast: RaycastResult, segmentVelocity: Vector3, cosmeticBulletObject: Instance?)
	--cast.RayHit:Fire(cast, resultOfCast, segmentVelocity, cosmeticBulletObject)
	cast.Caster.RayHit:Fire(cast, resultOfCast, segmentVelocity, cosmeticBulletObject)
end

local function SendRayPierced(cast: ActiveCast, resultOfCast: RaycastResult, segmentVelocity: Vector3, cosmeticBulletObject: Instance?)
	--cast.RayPierced:Fire(cast, resultOfCast, segmentVelocity, cosmeticBulletObject)
	cast.Caster.RayPierced:Fire(cast, resultOfCast, segmentVelocity, cosmeticBulletObject)
end

local function SendLengthChanged(cast: ActiveCast, lastPoint: Vector3, rayDir: Vector3, rayDisplacement: number, segmentVelocity: Vector3, cosmeticBulletObject: Instance?)
	--cast.LengthChanged:Fire(cast, lastPoint, rayDir, rayDisplacement, segmentVelocity, cosmeticBulletObject)
	cast.Caster.LengthChanged:Fire(cast, lastPoint, rayDir, rayDisplacement, segmentVelocity, cosmeticBulletObject)
end
--phace 1
core.Stage4Overload.Enabled=true
wait(4)
CG.CoreStatus.Value="overload"
--or script.Parent.RPMManagement.Disabled == false 
while wait() do
	speed = carSeat.Velocity.Magnitude
	if carSeat.Throttle ~= 1 and juice == false then
		juice = true
		for i = 0.3, 0, -0.02 do
			wait()
			script.Parent.Value.Value = i
		end --script.Parent.Value.Value = 0
	elseif carSeat.Throttle == 1 and juice == true then 
		juice = false
		for i = 0, 0.3, 0.02 do
			wait()
			script.Parent.Value.Value = i
		end
	end
end
--==================================================
--Setting
--==================================================
local Ammo = math.huge --Amount of Ammo to give. Set it to "math.huge" to refill the gun's ammo.
local GunToRefillAmmo = {
	"Pistol",
	--Add more gun here if you want
}
--Simple function to make the door appear and disappear
	
local clickDetector = script.Parent.ClickDetector	

function onMouseClick()
	if script.Parent.CanCollide == false then
		print "Close door"
		local C = script.Parent.Parent:GetChildren()
		for i=1, #C do
			if (C[i].className == "Part") or (C[i].className == "Seat") or (C[i].className == "WedgePart") or (C[i].className == "CornerWedgePart") or (C[i].className == "VehicleSeat") or (C[i].className == "UnionOperation") then
			if C[i].Name == "Window" then
				C[i].Transparency = 0.6
			else
				C[i].Transparency = 0
			end
			C[i].CanCollide = true
			end
		end
	else
		print "Open door"
		local C = script.Parent.Parent:GetChildren()
		for i=1, #C do
			if (C[i].className == "Part") or (C[i].className == "Seat") or (C[i].className == "WedgePart") or (C[i].className == "CornerWedgePart") or (C[i].className == "VehicleSeat") or (C[i].className == "UnionOperation") then
			C[i].Transparency = 1
			C[i].CanCollide = false
			end
		end
	end
end	

clickDetector.MouseClick:connect(onMouseClick)
--SETTINGS:
--[
defaultWalkSpeed = 16 --The speed the player walks when not running
runSpeed = 24 --The speed the player walks when running
stamina = 100 --The current stamina of the player (this variable can be used to check the stamina level of the player)
maxStamina = 100 --The maximum ammount of stamina the character will regen to
minStaminaToRun = 30 --The minimum amount of stamina required to run
staminaPerSecond = 10 --The ammount of stamina that is used per second when running
staminaRegenPerSecond = 5 --The amount of stamina that is regenerated every second when not running

staminaGui = script.StaminaGui --Change "StaminaGui" to the name of your Gui parented to this script
-- update leaderboard
spawn(function ()
	while wait(LEADERBOARD_UPDATE*60) do
		UpdateBoard()
	end
end)
-- Encuentra el sonido llamado "hyperx" en el servicio de sonido
local sound = soundService:FindFirstChild("black")
--// # key, Cruise
mouse.KeyDown:connect(function(key)
	if key=="n" then 
		veh.Lightbar.middle.Beep:Play()
		veh.Lightbar.Remotes.CruiseEvent:FireServer(true)
	end
end)
-- SpeederScripts
local SpeederScripts = ReplicatedStorage:FindFirstChild("SpeederScripts")
local Controller = SpeederScripts:FindFirstChild("Controller")
--spawn(function()
	while true do
		game:GetService("RunService").Stepped:wait()
		for i, part in pairs(car:GetChildren()) do
			if part.Name == "Thruster" then
				UpdateThruster(part)
			end
		end
		if car.DriveSeat.Occupant then
			local ratio = car.DriveSeat.Velocity.magnitude / stats.Speed.Value
			car.EngineBlock.Running.Pitch = 1 + ratio / 4
			bodyPosition.MaxForce = Vector3.new()
			bodyGyro.MaxTorque = Vector3.new()
		else
			local hit, position, normal = Raycast.new(car.Chassis.Position, car.Chassis.CFrame:vectorToWorldSpace(Vector3.new(0, -1, 0)) * stats.Height.Value)
			if hit and hit.CanCollide then
				bodyPosition.MaxForce = Vector3.new(mass / 5, math.huge, mass / 5)
				bodyPosition.Position = (CFrame.new(position, position + normal) * CFrame.new(0, 0, -stats.Height.Value + 0.5)).p
				bodyGyro.MaxTorque = Vector3.new(math.huge, 0, math.huge)
				bodyGyro.CFrame = CFrame.new(position, position + normal) * CFrame.Angles(-math.pi/2, 0, 0)
			else
				bodyPosition.MaxForce = Vector3.new()
				bodyGyro.MaxTorque = Vector3.new()
			end
		end
	end