Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. local noclipplayerx = game:GetService("Players").LocalPlayer
  2. local noclipmousex = noclipplayerx:GetMouse()
  3. local myname = game:GetService("Players").LocalPlayer.Character.Name
  4. local isfasting = "nope"
  5. local dir = 0
  6. noclipmousex.KeyDown:connect(function(key)
  7. if (key == "y") then
  8. if isfasting == "nope" then
  9. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  10. Text = "Car Speed: ON",
  11. Color = Color3.new(0, 1, 0)
  12. })
  13. isfasting = "yeah"
  14. else
  15. isfasting = "nope"
  16. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  17. Text = "Car Speed: OFF",
  18. Color = Color3.new(1, 0, 0)
  19. })
  20. end
  21.  
  22.  
  23. if isfasting ~= "yeah" then
  24. dir = 0
  25. else
  26. dir = 1
  27. gs = game.GetService
  28.  
  29. val = {
  30. {Enum.KeyCode.W,1};
  31. {Enum.KeyCode.S,-1};
  32. }
  33. uis = gs(game,"UserInputService")
  34. chk = function(k)
  35. for i,v in next,val do
  36. if v[1]==k.KeyCode then
  37. return v[2]
  38. end
  39. end
  40. end
  41. uis.InputBegan:connect(function(k)
  42. dir = chk(k) or dir
  43. end)
  44. uis.InputEnded:connect(function(k)
  45. if chk(k) == dir then
  46. dir = 0
  47. end
  48. end)
  49.  
  50.  
  51.  
  52.  
  53. for i, v in pairs(game:GetService("Workspace").Vehicles:GetChildren()) do
  54. if (Vector3.new(v:GetPrimaryPartCFrame()) - Vector3.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position)).Magnitude < 50 then
  55. for ic, vc in pairs(v:GetChildren()) do
  56. for icx, vcx in pairs(vc:GetChildren()) do
  57. if vcx.Name == "PlayerName" then
  58. if vcx.Value == myname then
  59.  
  60. --v:FindFirstChild("PassengerSeat").Position = CFrame.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position)
  61.  
  62. if v:FindFirstChild("Engine") then
  63. local bf,cf = v.Engine:FindFirstChild("NewForce"),v:GetPrimaryPartCFrame().lookVector
  64. if not bf then
  65. bf = v.Engine:FindFirstChild("BodyForce") or v.Engine:FindFirstChild("VectorForce")
  66. if bf then
  67. bf = bf:Clone()
  68. bf.Parent = v.Engine
  69. bf.Name = "NewForce"
  70. end
  71. end
  72. if bf then
  73.  
  74.  
  75. while vcx.Value == myname and isfasting == "yeah" do
  76. wait(0.2)
  77. cf=v:GetPrimaryPartCFrame().lookVector
  78. bf.Force = Vector3.new(cf.X*300000*dir,0,cf.Z*300000*dir)
  79.  
  80. end
  81. if vcx.Value ~= myname then
  82. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  83. Text = "Car Speed: OFF",
  84. Color = Color3.new(1, 0, 0)
  85. })
  86. isfasting = "nope"
  87. end
  88. end
  89. end
  90.  
  91.  
  92. end
  93.  
  94. end
  95. end
  96. end
  97. end
  98. end
  99. end
  100. end
  101. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement