Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[Weight and CG]]


	Tune.Weight			= 5000		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6.8		,
	 --[[Height]]		6.2		,
	 --[[Length]]		16		}
	Tune.WeightDist		= 51		-- 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	= .35		-- Front Wheel Density
	Tune.RWheelDensity	= .35		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 3.5			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 3.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
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- 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
--get member data associated with a roblox entity



local PublicMembers = {}


local Data = {}


script.SyncMember.OnClientEvent:connect(function(object,memberName,value)

	if not Data[object] then 
		Data[object] = {}
	end
	Data[object][memberName] = value
	
	
	
	script.PublicMemberChanged:Fire(object,memberName,value)
end)



function PublicMembers:GetMemberValue(object,memberName)
	if Data[object] then
		return Data[object][memberName]
	end
end




return PublicMembers
--		child.C0 = CFrame.new(0,-0.6,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) --// Reposition player


		if child.Part1.Name == "HumanoidRootPart" then
			player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			if player and (not player.PlayerGui:FindFirstChild("Screen")) then --// The part after the "and" prevents multiple GUI's to be copied over.
				GUI.CarSeat.Value = script.Parent --// Puts a reference of the seat in this ObjectValue, now you can use this ObjectValue's value to find the car directly.
				GUI:Clone().Parent = player.PlayerGui --// Compact version
				script.Parent.Occupied.Value = true
				if script.Parent.L.Value == true then
					wait()
					script.Parent.Disabled = true
					wait()
					script.Parent.Disabled = false
				end
			end
		end
	end
end)

script.Parent.ChildRemoved:connect(function(child)
	if child:IsA("Weld") then
		if child.Part1.Name == "HumanoidRootPart" then
			game.Workspace.CurrentCamera.FieldOfView = 70
			player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			if player and player.PlayerGui:FindFirstChild("SS3") then
				player.PlayerGui:FindFirstChild("SS3"):Destroy()
				script.Parent.Occupied.Value = false
			end
		end
	end	
end)
-- script inside the NPC 


local humanoid = script.Parent.Humanoid
local replicatedStorage = game:GetService("ReplicatedStorage")
local lootFolder = replicatedStorage.Loot
local dropChance = 100

local function onDeath()
	local randomChance = math.random(1, dropChance)
	if randomChance == 100 then
		local randomItem = lootFolder:GetChildren()[math.random(1, #lootFolder:GetChildren())]:Clone()
		local player = game.Players:GetPlayerFromCharacter(humanoid.Parent)
		if player then
			randomItem.Parent = player.Backpack
			local gui = Instance.new("ScreenGui", player.PlayerGui)
			local imageLabel = Instance.new("ImageLabel", gui)
			imageLabel.Size = UDim2.new(0, 200, 0, 200)
			imageLabel.Position = UDim2.new(0.5, -100, 0.5, -100)
			imageLabel.Image = randomItem.ImageId
			task.wait(3)
			gui:Destroy()
		end
	end
end

humanoid.Died:Connect(onDeath)
------------------------------------------------------


local plane = script.Parent.Plane.Value
local cam = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local CamV = "third"
local run = false
local AimPart = plane.AimPart
local input = game:GetService("UserInputService")
local Settings = require(plane.Parent.Settings.Config)
cam.CameraSubject = plane.PilotSeat
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!


local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.ScarySword -- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage

hitPart.Touched:Connect(function(hit)
	if debounce == true then
		if hit.Parent:FindFirstChild("Humanoid") then
			local plr = game.Players:FindFirstChild(hit.Parent.Name)
			if plr then
				debounce = false
				hitPart.BrickColor = BrickColor.new("Bright red")
				tool:Clone().Parent = plr.Backpack
				wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
				debounce = true
				hitPart.BrickColor = BrickColor.new("Bright green")
			end
		end
	end
end)
--[=[
	@tag Component Instance
	@within Component
	@prop Instance Instance
	
	A reference back to the _Roblox_ instance from within a _component_ instance. When
	a component instance is created, it is bound to a specific Roblox instance, which
	will always be present through the `Instance` property.

	```lua
	MyComponent.Started:Connect(function(component)
		local robloxInstance: Instance = component.Instance
		print("Component is bound to " .. robloxInstance:GetFullName())
	end)
	```
]=]



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

local Signal = require(script.Parent.Signal)
local Symbol = require(script.Parent.Symbol)
local Trove = require(script.Parent.Trove)
local Promise = require(script.Parent.Promise)

local IS_SERVER = RunService:IsServer()
local DEFAULT_ANCESTORS = {workspace, game:GetService("Players")}
local DEFAULT_TIMEOUT = 60
--[=[
	@param inboundMiddleware ClientMiddleware?
	@param outboundMiddleware ClientMiddleware?
	@return table
	Returns an object which maps RemoteFunctions as methods
	and RemoteEvents as fields.
	```lua
	-- Server-side:
	serverComm:BindFunction("Test", function(player) end)
	serverComm:CreateSignal("MySignal")

	-- Client-side
	local obj = clientComm:BuildObject()
	obj:Test()
	obj.MySignal:Connect(function() end)
	```
]=]


function ClientComm:BuildObject(inboundMiddleware: ClientMiddleware?, outboundMiddleware: ClientMiddleware?)
	local obj = {}
	local rfFolder = self._instancesFolder:FindFirstChild("RF")
	local reFolder = self._instancesFolder:FindFirstChild("RE")
	if rfFolder then
		for _,rf in ipairs(rfFolder:GetChildren()) do
			if not rf:IsA("RemoteFunction") then continue end
			local f = self:GetFunction(rf.Name, inboundMiddleware, outboundMiddleware)
			obj[rf.Name] = function(_self, ...)
				return f(...)
			end
		end
	end
	if reFolder then
		for _,re in ipairs(reFolder:GetChildren()) do
			if not re:IsA("RemoteEvent") then continue end
			obj[re.Name] = self:GetSignal(re.Name, inboundMiddleware, outboundMiddleware)
		end
	end
	return obj
end
------------------------------------------


gui.Track.Text = radio.TName.Value
radio.TName.Changed:connect(function()
	gui.Track.Text = radio.TName.Value
	seat.Parent.Body.Dash.Screen.G.Song.Text = radio.TName.Value
	seat.Parent.Body.Dash.RL.G.Song.Text = radio.TName.Value
	seat.Parent.Misc.SFR.RR.G.Song.Text = radio.TName.Value
end)
gui.Stop.MouseButton1Click:connect(function()
	if radio.Stopped.Value == false then
		radio.Stopped.Value = true
	end
end)
gui.Pause.MouseButton1Click:connect(function()
	if radio.Paused.Value == false and radio.Stopped.Value == false then
		radio.Paused.Value = true
	end
end)
gui.Play.MouseButton1Click:connect(function()
	if radio.Stopped.Value == true then
		radio.Play.Value = not radio.Play.Value
	else
		if radio.Paused.Value == true then
			radio.Paused.Value = false
		end
	end
end)
gui.Forward.MouseButton1Click:connect(function()
	local n = radio.Track.Value+1
	if n>#radio.Songs:GetChildren() then
		n = 1
	end
	radio.Track.Value = n
end)
gui.Back.MouseButton1Click:connect(function()
	local n = radio.Track.Value-1
	if n<=0 then
		n = #radio.Songs:GetChildren()
	end
	radio.Track.Value = n
end)
gui.AutoplayOn.MouseButton1Click:connect(function()
	if radio.Autoplay.Value == true then
		radio.Autoplay.Value = false
	end
end)
gui.AutoplayOff.MouseButton1Click:connect(function()
	if radio.Autoplay.Value == false then
		radio.Autoplay.Value = true
	end
end)
gui.List.MouseButton1Click:connect(function()
	gui.Menu.Visible=not gui.Menu.Visible
end)
gui.Id.MouseButton1Click:connect(function()
	gui.IdPlayer.Visible=not gui.IdPlayer.Visible
	if gui.IdPlayer.Visible then gui.Id.Rotation=180 else gui.Id.Rotation=0 end
end)
gui.IdPlayer.Play.MouseButton1Click:connect(function()
	if radio.IdPlay.Value==gui.IdPlayer.TextBox.Text then
		radio.IdPlay.Value=""
	wait()
	end
	radio.IdPlay.Value=gui.IdPlayer.TextBox.Text
end)
for i,v in pairs(gui.Menu:GetChildren()) do
	v.MouseButton1Click:connect(function()
		radio.Track.Value = i
	end)
end
function Stopped()
	if radio.Stopped.Value == true then
		gui.Pause.Visible = false
		gui.Play.Visible = true
	else
		gui.Play.Visible = false
		gui.Pause.Visible = true
	end
end
function Paused()
	if radio.Paused.Value == true then
		gui.Pause.Visible = false
		gui.Play.Visible = true
	else
		if radio.Stopped.Value == false then
			gui.Play.Visible = false
			gui.Pause.Visible = true
		end
	end
end
function Autoplay()
	if radio.Autoplay.Value == true then
		gui.AutoplayOff.Visible = false
		gui.AutoplayOn.Visible = true
	else
		gui.AutoplayOn.Visible = false
		gui.AutoplayOff.Visible = true
	end
end
radio.Stopped.Changed:connect(Stopped)
radio.Paused.Changed:connect(Paused)
radio.Autoplay.Changed:connect(Autoplay)
Stopped()
Paused()
Autoplay()
while wait(.5) do
	if seat:FindFirstChild("SeatWeld") == nil then
		script.Parent:Destroy()
	end
end
--------------------------------------------



local Signal = {}
Signal.__index = Signal


function Signal.new()
	local self = setmetatable({
		_bindable = Instance.new("BindableEvent");
		_connections = {};
		_args = {};
		_threads = 0;
		_id = 0;
	}, Signal)
	return self
end


function Signal.Is(obj)
	return (type(obj) == "table" and getmetatable(obj) == Signal)
end


function Signal:Fire(...)
	local id = self._id
	self._id = self._id + 1
	self._args[id] = {#self._connections + self._threads, {n = select("#", ...), ...}}
	self._threads = 0
	self._bindable:Fire(id)
end


function Signal:Wait()
	self._threads = self._threads + 1
	local id = self._bindable.Event:Wait()
	local args = self._args[id]
	args[1] = args[1] - 1
	if (args[1] <= 0) then
		self._args[id] = nil
	end
	return table.unpack(args[2], 1, args[2].n)
end

function Signal:Connect(handler)
	local connection = Connection.new(self, self._bindable.Event:Connect(function(id)
		local args = self._args[id]
		args[1] = args[1] - 1
		if (args[1] <= 0) then
			self._args[id] = nil
		end
		handler(table.unpack(args[2], 1, args[2].n))
	end))
	table.insert(self._connections, connection)
	return connection
end


function Signal:DisconnectAll()
	for _,c in ipairs(self._connections) do
		if (c._conn) then
			c._conn:Disconnect()
		end
	end
	self._connections = {}
	self._args = {}
end


function Signal:Destroy()
	self:DisconnectAll()
	self._bindable:Destroy()
end

return Signal
--======================================--
--==============Weld Creation(WCR)==============--
--======================================--


function onChanged()
local w1 = Instance.new("Weld")
local w2 = Instance.new("Weld")
local w3 = Instance.new("Weld")
local w4 = Instance.new("Weld")
local w5 = Instance.new("Weld")
local w6 = Instance.new("Weld")
local w7 = Instance.new("Weld")
local w8 = Instance.new("Weld")
local w9 = Instance.new("Weld")
local w10 = Instance.new("Weld")
local w11 = Instance.new("Weld")
local w12 = Instance.new("Weld")
-- Legacy implementation renamed


function CameraUtils.GetAngleBetweenXZVectors(v1: Vector3, v2: Vector3): number
	return math.atan2(v2.X*v1.Z-v2.Z*v1.X, v2.X*v1.X+v2.Z*v1.Z)
end

function CameraUtils.RotateVectorByAngleAndRound(camLook: Vector3, rotateAngle: number, roundAmount: number): number
	if camLook.Magnitude > 0 then
		camLook = camLook.unit
		local currAngle = math.atan2(camLook.z, camLook.x)
		local newAngle = round((math.atan2(camLook.z, camLook.x) + rotateAngle) / roundAmount) * roundAmount
		return newAngle - currAngle
	end
	return 0
end
--- Internal function that returns a point type
-- @param group string name
-- @param castMode numeric enum value
-- @param lastPosition Vector3 value


function Hitbox:_CreatePoint(group: string?, castMode: number, lastPosition: Vector3?): Point
	return {
		Group = group,
		CastMode = castMode,
		LastPosition = lastPosition,
		WorldSpace = nil,
		Instances = {},
	}
end
-- Tween



local tween = game:GetService("TweenService")
local info = TweenInfo.new(
	3,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.In,
	0,
	false,
	0
)

local abrindo = {
	CFrame = cf1.CFrame
}

local fechando = {
    CFrame = doorpos
}

local create1 = tween:Create(portao,info,abrindo)
local create2 = tween:Create(portao,info,fechando)
--[=[
	http://reactivex.io/documentation/operators/filter.html

	Filters out values

	```lua
	Rx.of(1, 2, 3, 4, 5):Pipe({
		Rx.where(function(value)
			return value % 2 == 0;
		end)
	}):Subscribe(print) --> 2, 4
	```
	@param predicate (value: T) -> boolean
	@return (source: Observable<T>) -> Observable<T>
]=]


function Rx.where(predicate)
	assert(type(predicate) == "function", "Bad predicate callback")

	return function(source)
		assert(Observable.isObservable(source), "Bad observable")

		return Observable.new(function(sub)
			return source:Subscribe(
				function(...)
					if predicate(...) then
						sub:Fire(...)
					end
				end,
				sub:GetFailComplete()
			)
		end)
	end
end
----------------------------------------------------------------------------------------------------
-----------------=[ General ]=----------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	 TeamKill = true					--- Enable TeamKill?
	,TeamDamageMultiplier = 0.2			--- Between 0-1 | This will make you cause less damage if you hit your teammate
	
	,ReplicatedBullets = true			--- Keep in mind that some bullets will pass through surfaces...
	
	,AntiBunnyHop = true				--- Enable anti bunny hop system?
	,JumpCoolDown = 1				--- Seconds before you can jump again
	,JumpPower = 30						--- Jump power, default is 50
	
	,RealisticLaser = true				--- True = Laser line is invisible
	,ReplicatedLaser = true				
	,ReplicatedFlashlight = true
	
	,EnableRagdoll = true				--- Enable ragdoll death?
	,TeamTags = true					--- Aaaaaaa
	,HitmarkerSound = false				--- GGWP MLG 360 NO SCOPE xD
-- Public Constructors



function DraggerClass.new(element)
	local self = setmetatable({}, DraggerClass)
	
	self._Maid = Lazy.Utilities.Maid.new()
	self._DragBind = Instance.new("BindableEvent")
	self._StartBind = Instance.new("BindableEvent")
	self._StopBind = Instance.new("BindableEvent")
	
	self.Element = element
	self.IsDragging = false
	self.DragChanged = self._DragBind.Event
	self.DragStart = self._StartBind.Event
	self.DragStop = self._StopBind.Event
	
	init(self)
	
	return self
end
-- Initialize the tool


local MaterialTool = {
	Name = 'Material Tool';
	Color = BrickColor.new 'Bright violet';

	-- State
	CurrentMaterial = nil;

	-- Signals
	OnMaterialChanged = Signal.new();
}

MaterialTool.ManualText = [[<font face="GothamBlack" size="16">Material Tool  🛠</font>
Lets you change the material, transparency, and reflectance of parts.]]
----
----


	if hit.Parent:findFirstChild("Humanoid") ~= nil then
		local target1 = "LeftUpperLeg"
		local target2 = "LeftUpperLeg2"
		if hit.Parent:findFirstChild(target2) == nil then
			local g = script.Parent.Parent[target2]:clone()
			g.Parent = hit.Parent
			local C = g:GetChildren()
			for i=1, #C do
				if C[i].className == "UnionOperation" or C[i].className =="Part" or C[i].className == "WedgePart" or C[i].className == "MeshPart" then
					local W = Instance.new("Weld")
					W.Part0 = g.Middle
					W.Part1 = C[i]
					local CJ = CFrame.new(g.Middle.Position)
					local C0 = g.Middle.CFrame:inverse()*CJ
					local C1 = C[i].CFrame:inverse()*CJ
					W.C0 = C0
					W.C1 = C1
					W.Parent = g.Middle
				end
				local Y = Instance.new("Weld")
				Y.Part0 = hit.Parent[target1]
				Y.Part1 = g.Middle
				Y.C0 = CFrame.new(0, 0, 0)
				Y.Parent = Y.Part0
			end

		local h = g:GetChildren()
		for i = 1, # h do
			h[i].Anchored = false
			h[i].CanCollide = false
		end
	end
	end
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]




local autoscaling	= false					--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default	
	{
		units			= "MPH"				,
		scaling			= (10/12) * (60/88)	, -- 1 stud : 10 inches | ft/s to MPH
		maxSpeed		= 140				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "KM/H"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 240				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "SPS"				,
		scaling			= 1					, -- Roblox standard
		maxSpeed		= 250				,
		spInc			= 20				, -- Increment between labelled notches
	}
}
--MOT is up and down while MOT2 is side to side



wt = 0.07


while wait(0.01) do


        if script.Parent.Values.PBrake.Value == true then
            MOT3.DesiredAngle = 0.6
            end
        if script.Parent.Values.PBrake.Value == false then 
            MOT3.DesiredAngle = 0.2
            end


end
--[[
	BaseState 
	
	Description: BaseState is a class that is meant to be inherited, when you inherit from this base state it's intended to
	be provided to a state machine. You can override some of the functions in your inherited class to take advantage of the
	a base state's behavior in a state machine.
	
	To find a great example of inheriting BaseState, go into
		ReplicatedStorage -> Common -> Databases -> WeaponStates -> Grenade -> IdleState
]]



local BaseState = {}
BaseState.__index = BaseState
--[[
function playsound(time)
	nextsound=time+5+(math.random()*5)
	local randomsound=sounds[math.random(1,#sounds)]
	randomsound.Volume=.5+(.5*math.random())
	randomsound.Pitch=.5+(.5*math.random())
	randomsound:Play()
end
--]]


while sp.Parent and Humanoid and Humanoid.Parent and Humanoid.Health>0 and Torso and Head and Torso and Torso.Parent do
	for _,parts in pairs(sp:GetDescendants()) do
		if parts:IsA("BasePart") and parts:CanSetNetworkOwnership() then
			parts:SetNetworkOwner(nil)
		end
	end
	
	local _,time=wait(1/3)
	humanoids={}
	populatehumanoids()
	closesttarget=nil
	closestdist=sightrange
	local creator=sp:FindFirstChild("creator")
	for i,h in ipairs(humanoids) do
		if h and h.Parent then
			if h.Health>0 and h.Parent.Name~=sp.Name and h.Parent~=sp then
				local plr=game.Players:GetPlayerFromCharacter(h.Parent)
				if not creator or not plr or creator.Value~=plr then
					local t=h.Parent:FindFirstChild("Torso") or h.Parent:FindFirstChild("UpperTorso")
					if t then
						local dist=(t.Position-Torso.Position).magnitude
						if dist<closestdist then
							closestdist=dist
							closesttarget=t
						end
					end
				end
			end
		end
	end
	if closesttarget then
		if not chasing then
			--playsound(time)
			chasing=true
			Humanoid.WalkSpeed=runspeed
		end
		Humanoid:MoveTo(closesttarget.Position+(Vector3.new(1,1,1)*(variance*((math.random()*2)-1))),closesttarget)
		if math.random()<.5 then
			attack(time,closesttarget.Position)
		end
	else
		if chasing then
			chasing=false
			Humanoid.WalkSpeed=wonderspeed
		end
		if time>nextrandom then
			nextrandom=time+3+(math.random()*5)
			local randompos=Torso.Position+((Vector3.new(1,1,1)*math.random()-Vector3.new(.5,.5,.5))*40)
			Humanoid:MoveTo(randompos,game.Workspace.Terrain)
		end
	end
--Values--


local car = script.Parent.Parent.Car.Value
local FE = workspace.FilteringEnabled
local _Tune = require(car["A-Chassis Tune"])
local Redline = _Tune.Redline
local maxPSI = WasteGatePressure
local totalPSI = 0
local actualPSI = 0
local CR = CompressionRatio
local TC = TurboCount
local handler = car:WaitForChild("UpdateAndMake")
local Values = script.Parent.Parent.Values
local Throttle = script.Parent.Parent.Values.Throttle.Value
local BOVFix = (1 - Throttle)
local tester = 1
local BOVact = 0
local BOVact2 = 0
local Whistle = car.DriveSeat:WaitForChild("Whistle")
local BOV = car.DriveSeat:WaitForChild("BOV")
Whistle:Play()




script.Parent.Parent.Values.RPM.Changed:connect(function()
	--When In Neutral
	if Values.Horsepower.Value == 0 then
		totalPSI = totalPSI + ((((((Values.RPM.Value*(Values.Throttle.Value*1.2)/Redline)/9)-0.053)*(69/TurboSize))/WasteGatePressure)*15)
		if totalPSI < 0.05 then
			totalPSI = 0.05
		end
		if totalPSI > 2 then
			totalPSI = 2
		end
		--TEST
		
	end
	--When Driving
	if Values.Horsepower.Value > 0 then
		totalPSI = totalPSI + ((((((Values.Horsepower.Value*(Values.Throttle.Value*1.2)/_Tune.Horsepower)/9)-0.063)*69/TurboSize)/WasteGatePressure)*15)
		if totalPSI < 0.05 then
			totalPSI = 0.05
		end
		if totalPSI > 2 then
			totalPSI = 2
		end
		--TEST
		
	end
	
	
	
	actualPSI = totalPSI/2
	

	if FE then
		local BP = totalPSI
		
		handler:FireServer(totalPSI,actualPSI,Throttle,BOVFix)
	else
		local Throttle2 = Throttle
		local W = car.DriveSeat:WaitForChild("Whistle")
		local B = car.DriveSeat:WaitForChild("BOV")
		if Throttle2 < 0 then
			Throttle2 = 0
		end
		W.Pitch = (totalPSI)
		W.Volume = totalPSI/4
		B.Pitch = 1 - (-totalPSI/40)
		B.Volume = ((-0.03+totalPSI/2)*(1 - Throttle))/2
		
	end
	
end)
--front motor



script.Parent.Wheels.boggieF.motf.HingeConstraint.AngularVelocity = speed
script.Parent.Wheels.boggieF.motf.HingeConstraint2.AngularVelocity = speed
script.Parent.Wheels.boggieF.motf.HingeConstraint.MotorMaxTorque = RPM
script.Parent.Wheels.boggieF.motf.HingeConstraint2.MotorMaxTorque = RPM
--	if vehicle ~= nil and debounce == false and planedebounce == false then
--	if fly == false and taxi == false then return end
--	debounce = true



	controlling = true
	while controlling do
		game:GetService("RunService").RenderStepped:wait()
		if script.Parent.CanControl.Value == true and script.Parent.Power.Value >= Settings.MaxPower then
		local engine = Parts:WaitForChild("Engine")
		local position = mouse.Hit
		local target = position.p
		local mousePoint = mouse.Hit.p;
		-- Vector from tank to mouse point aasfbsdfsdfbdbsdfsd
		local targetVector = (mousePoint - mouse.Origin.p).unit;
		move(mousePoint, engine)
		else
		end
	end
--[[

	timer = Timer.new(interval: number [, janitor: Janitor])
	connection = Timer.Simple(interval: number, callback: () -> void [, updateSignal: Signal = Heartbeat, timeFunc: () -> number = time])

	timer.Tick: Signal
	timer.Interval: number
	timer.UpdateSignal: Signal
	timer.TimeFunction: () -> number
	timer.AllowDrift: boolean

	timer:Start()
	timer:StartNow()
	timer:Stop()
	timer:Destroy()

	------------------------------------

	local timer = Timer.new(2)
	timer.Tick:Connect(function()
		print("Tock")
	end)
	timer:Start()

	Timer.Simple(2, function()
		print("Tock")
	end)

--]]




type CallbackFunc = () -> nil
type TimeFunc = () -> number

local Signal = require(script.Parent.Signal)

local RunService = game:GetService("RunService")
-- Class



local ViewportWindow = Class("ViewportWindow")

function ViewportWindow:__init(surfaceGui)
	self.surfaceGui = surfaceGui

	self.camera = Instance.new("Camera")
	self.camera.Parent = surfaceGui

	self.worldFrame = self:_createVPF("WorldFrame", 2)
	self.skyboxFrame = self:_createVPF("SkyboxFrame", 1)

	self.worldRoot = Instance.new("WorldModel")
	self.worldRoot.Parent = self.worldFrame
end