Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local LocalPlayer = game:GetService("Players").LocalPlayer
- local Character = LocalPlayer.Character
- local Vehicle = workspace[string.format("%s\'s Car", LocalPlayer.Name)]
- local function MoveVehicle(Position)
- Character.Parent = Vehicle
- Vehicle:MoveTo(Position)
- Character.Parent = workspace
- end
- local Baseplate = workspace:FindFirstChild("Baseplate") or Instance.new("Part", workspace)
- Baseplate.Name = "Baseplate"
- Baseplate.Size = Vector3.new(2048, 20, 2048)
- Baseplate.CFrame = CFrame.new(0, 3e4, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
- Baseplate.Anchored = true
- Baseplate.CanCollide = true
- Baseplate.Transparency = 1
- MoveVehicle(Baseplate.CFrame.Position + Vector3.new(0, 15, 0))
- coroutine.resume(coroutine.create(function()
- while true do
- wait()
- pcall(function()
- for index, value in pairs(Vehicle["Wheels"]:GetChildren()) do
- if value.Position.X > 1000 then
- Baseplate.CFrame = CFrame.new(0, 3e4, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
- MoveVehicle(Baseplate.CFrame.Position + Vector3.new(0, 15, 0))
- end
- value.Velocity = Vector3.new(500, 0, 500)
- Baseplate.CFrame = CFrame.new(Character["HumanoidRootPart"].CFrame.X, 3e4, Character["HumanoidRootPart"].CFrame.Z) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
- end
- end)
- end
- end))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement