local a=.2 local R={}R.__index=R local l=130 function R.new(a,l)local g=setmetatable({},R)g.connections={}g.car=a g.localSeatModule=require(ScriptsFolder.LocalVehicleSeating)g.chassis=a:WaitForChild("\067\104\097\115\115\105\115")g.seat=g.chassis:WaitForChild("\086\101\104\105\099\108\101\083\101\097\116")g.gui=Gui:Clone()g.gui.Name="\065\099\116\105\118\101\071\117\105"g.gui.Parent=script g.touchFrame=g.gui:WaitForChild("\084\111\117\099\104\067\111\110\116\114\111\108\070\114\097\109\101")g.accelButton=g.touchFrame:WaitForChild("\065\099\099\101\108\101\114\097\116\101\066\117\116\116\111\110")g.brakeButton=g.touchFrame:WaitForChild("\066\114\097\107\101\066\117\116\116\111\110")g.exitButton=g.touchFrame:WaitForChild("\069\120\105\116\066\117\116\116\111\110")g.speedoFrame=g.gui:WaitForChild("\083\112\101\101\100\111\070\114\097\109\101")g.speedoFrameOff=g.speedoFrame:WaitForChild("\079\102\102\070\114\097\109\101")g.speedoOff=g.speedoFrameOff:WaitForChild("\083\112\101\101\100\111")g.speedoFrameOn=g.speedoFrame:WaitForChild("\079\110\070\114\097\109\101")g.speedoOn=g.speedoFrameOn:WaitForChild("\083\112\101\101\100\111")g.speedText=g.speedoFrame:WaitForChild("\083\112\101\101\100\084\101\120\116")g.unitText=g.speedoFrame:WaitForChild("\085\110\105\116\084\101\120\116")return g end
-- Length of an input to be considered a tap
local SINGLE_TAP_THRESHOLD = 0.2

local VehicleGui = {}
VehicleGui.__index = VehicleGui

local MAX_SPEED = 130

function VehicleGui.new(car, seat)
	local self = setmetatable({}, VehicleGui)

	self.connections = {}
	self.car = car
	self.localSeatModule = require(ScriptsFolder.LocalVehicleSeating)
	self.chassis = car:WaitForChild("Chassis")
	self.seat = self.chassis:WaitForChild("VehicleSeat")
	self.gui = Gui:Clone()
	self.gui.Name = "ActiveGui"
	self.gui.Parent = script
	self.touchFrame = self.gui:WaitForChild("TouchControlFrame")
	self.accelButton = self.touchFrame:WaitForChild("AccelerateButton")
	self.brakeButton = self.touchFrame:WaitForChild("BrakeButton")
	self.exitButton = self.touchFrame:WaitForChild("ExitButton")

	self.speedoFrame = self.gui:WaitForChild("SpeedoFrame")
	self.speedoFrameOff = self.speedoFrame:WaitForChild("OffFrame")
	self.speedoOff = self.speedoFrameOff:WaitForChild("Speedo")
	self.speedoFrameOn = self.speedoFrame:WaitForChild("OnFrame")
	self.speedoOn = self.speedoFrameOn:WaitForChild("Speedo")
	self.speedText = self.speedoFrame:WaitForChild("SpeedText")
	self.unitText = self.speedoFrame:WaitForChild("UnitText")

	return self
end
