Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local RunService = game:GetService("RunService")
- local LocalPlayer = Players.LocalPlayer
- local src = ReplicatedStorage.src
- local pcar = src.pcar
- local CarTracker = require(pcar.CarTracker)
- local Debounce = false
- local RBXScriptSignal = nil
- RunService.RenderStepped:Connect(function(...)
- if CarTracker.getCarFromDriver(LocalPlayer) then
- if not Debounce then
- Debounce = true
- table.foreachi(getconnections(RunService.Stepped), function(_, Value, ...)
- if Value.Function and getfenv(Value.Function).script.Name == "CarClient" then
- RBXScriptSignal = RunService.RenderStepped:Connect(function(...)
- debug.setupvalue(Value.Function, 21, 3)
- end)
- return
- else
- return
- end
- end)
- end
- else
- if Debounce then
- Debounce = false
- RBXScriptSignal:Disconnect()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement