1 | |
2 | |
3 | local Library = loadstring(Game:HttpGet("https://raw.githubusercontent.com/bloodball/-back-ups-for-libs/main/wizard"))() |
4 | |
5 | local Window = Library:NewWindow("Driving Empire") |
6 | |
7 | local Section = Window:NewSection("Velocity Controls") |
8 | |
9 | local vehicleSpeed = 500 |
10 | local toggleVelocity = false |
11 | |
12 | |
13 | Section:CreateTextbox("Set Velocity", function(text) |
14 | local speed = tonumber(text) |
15 | if speed then |
16 | vehicleSpeed = speed |
17 | end |
18 | end) |
19 | |
20 | |
21 | Section:CreateToggle("Toggle Velocity", function(value) |
22 | toggleVelocity = value |
23 | |
24 | if toggleVelocity then |
25 | |
26 | startSettingVelocity() |
27 | else |
28 | |
29 | stopSettingVelocity() |
30 | end |
31 | end) |
32 | |
33 | function startSettingVelocity() |
34 | spawn(function() |
35 | while toggleVelocity do |
36 | task.wait() |
37 | local player = game.Players.LocalPlayer |
38 | local character = player.Character |
39 | if character and character:FindFirstChild("Humanoid") and character.Humanoid.SeatPart then |
40 | local car = character.Humanoid.SeatPart.Parent |
41 | car.PrimaryPart = car.Weight |
42 | |
43 | car.PrimaryPart.Velocity = Vector3.new(car.PrimaryPart.Velocity.X, -10, car.PrimaryPart.Velocity.Z) |
44 | car.PrimaryPart.Velocity = car.PrimaryPart.CFrame.LookVector * vehicleSpeed |
45 | car.PrimaryPart.Velocity = Vector3.new(car.PrimaryPart.Velocity.X, -10, car.PrimaryPart.Velocity.Z) |
46 | end |
47 | end |
48 | end) |
49 | end |
50 | |
51 | function stopSettingVelocity() |
52 | |
53 | end |