MADE BY gamermanaway
FEATURE:
- CAR MODIFIER
local RunService = game:GetService('RunService')
local realShared = getrenv().shared
local CarTracker = select(2, pcall(realShared.import, '/pcar/CarTracker'))
local ui = loadstring(game:GetObjects("rbxassetid://4133667265")[1].Source)("Library by wally")
local carHacks = ui:CreateWindow('Car Hacks')
local options = {
MaxSpeed = 157,
Acceleration = 3,
Braking = 0.7,
Handling = 0.7,
infiniteNitro = false,
driftMult = 0.7853981633974483
}
local function userInterface()
carHacks:Section('Modify It!')
carHacks:Slider("Max Speed",{precise=false,default=options.MaxSpeed,min=10,max=1000,flag="maxSpeed",location=getfenv()},function() options.MaxSpeed=tonumber(maxSpeed) end)
carHacks:Slider("Acceleration (s)",{precise=true,default=options.Acceleration,min=0,max=10,flag="acceleration",location=getfenv()},function() options.Acceleration=tonumber(acceleration) end)
carHacks:Slider("Braking (%)",{precise=false,default=options.Braking,min=1,max=150,flag="braking",location=getfenv()},function() options.Braking=tonumber(braking)/100 end)
carHacks:Slider("Handling (%)",{precise=false,default=options.Handling,min=1,max=150,flag="handling",location=getfenv()},function() options.Handling=tonumber(handling)/100 end)
carHacks:Section('Other...')
carHacks:Toggle('Infinite Nitro',{flag="toggle",location = getfenv()},function() options.infiniteNitro=toggle end)
carHacks:Slider("Drift Mult",{precise=true,default=options.driftMult,min=0,max=10,flag="driftMult",location=getfenv()},function() options.driftMult=tonumber(driftMult) end)
return
end
local function getCarUpdateFunc()
for _, connection in ipairs(getconnections(RunService.Stepped)) do
if connection.Function and getfenv(connection.Function).script.Name == 'CarClient' then return connection.Function end
end
return nil
end
local function getCarDriftFunc()
for _, connection in ipairs(getconnections(RunService.Heartbeat)) do
if connection.Function and debug.getconstant(connection.Function, 1) == 'setDriftAngle' then return connection.Function end
end
return nil
end
local debounce = false
local connection = nil
local function onStepped()
if CarTracker.getCarFromDriver(realShared.player) then
if not debounce then
debounce = true
local carUpdateFunc = getCarUpdateFunc()
local carDriftFunc = getCarDriftFunc()
connection = RunService.Stepped:Connect(function()
local carRig = debug.getupvalue(carUpdateFunc, 2)
rawset(carRig, 'MaxSpeed', options.MaxSpeed)
rawset(carRig, 'Acceleration', options.Acceleration)
rawset(carRig, 'Braking', options.Braking)
rawset(carRig, 'Handling', options.Handling)
if options.infiniteNitro then debug.setupvalue(carUpdateFunc, 22, 3) end
debug.setconstant(carDriftFunc, 2, options.driftMult)
end)
end
else
if debounce then
debounce = false
connection:Disconnect()
end
end
return
end
local function main()
userInterface()
RunService.Stepped:Connect(onStepped)
return
end
main()