Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local CoreGui = game:GetService("CoreGui")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Debris = game:GetService("Debris")
- local HttpService = game:GetService("HttpService")
- local raceColliders = workspace["$raceColliders"]
- local LocalPlayer = Players.LocalPlayer
- local PlayerGui = LocalPlayer.PlayerGui
- local Races = PlayerGui.Races
- local assets = ReplicatedStorage.assets
- local assetsraces = assets.races
- local remotes = ReplicatedStorage.remotes
- local remotesraces = remotes.races
- local RaceNotifier = remotesraces:FindFirstChild("RaceNotifier")
- if RaceNotifier then
- RaceNotifier:Destroy()
- end
- local SignalInterest = remotesraces.SignalInterest
- local src = ReplicatedStorage.src
- local pcar = src.pcar
- local CarInput = pcar.CarInput
- local Keyboard = require(CarInput.Keyboard)
- local CarPlacer = require(pcar.CarPlacer)
- local CarTracker = require(pcar.CarTracker)
- local ClientCarState = require(pcar.ClientCarState)
- local prace = src.prace
- local ClientRaceState = require(prace["ClientRaceState.client"])
- local ResetVelocityOfLocalPlayersCar = function(...)
- local LocalPlayersCar = CarTracker.getCarFromDriver(LocalPlayer)
- local Descendants = LocalPlayersCar:GetDescendants()
- table.foreachi(Descendants, function(_, Value, ...)
- if Value:IsA("BasePart") then
- Value.AssemblyLinearVelocity = Vector3.new()
- Value.AssemblyAngularVelocity = Vector3.new()
- return
- else
- return
- end
- end)
- return
- end
- if ClientCarState.isDriving then
- local LocalPlayersCar = CarTracker.getCarFromDriver(LocalPlayer)
- if not LocalPlayersCar.PrimaryPart.Anchored then
- LocalPlayersCar.PrimaryPart.Anchored = true
- end
- ResetVelocityOfLocalPlayersCar()
- local _, Size = LocalPlayersCar:GetBoundingBox()
- local Part = Instance.new("Part")
- Part.Name = HttpService:GenerateGUID(true)
- Part.Parent = workspace
- Part.Size = Vector3.new(Size.X, 1, 2048)
- Part.Position = Vector3.new(0, -65.5, 0)
- Part.Anchored = true
- CarPlacer.place(nil, LocalPlayersCar, Part.CFrame + Vector3.new(0, Part.Size.Y / 2 + Size.Y / 2, Part.Size.Z / 2 - Size.Z / 2))
- if LocalPlayersCar.PrimaryPart.Anchored then
- LocalPlayersCar.PrimaryPart.Anchored = false
- end
- local CarInput = debug.getupvalue(Keyboard.GetNitro, 1)
- local LocalPlayersCarPrimaryPart = LocalPlayersCar.PrimaryPart
- local Debounce = false
- local OldBestInactiveRaceId = nil
- local Hint = Instance.new("Hint")
- Hint.Text = "Please, Spawn/Enter Your Car (Before Executing)!"
- Hint.Name = HttpService:GenerateGUID(true)
- Hint.Parent = CoreGui
- Debris:AddItem(Hint, 5)
- return
- end
Advertisement
Add Comment
Please, Sign In to add comment