Advertisement
metilol

Untitled

Mar 19th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.02 KB | None | 0 0
  1. --Wrooom
  2. -- enjoy driving
  3. mouse = game.Players.LocalPlayer:GetMouse()
  4. rig = game.Players.LocalPlayer.Character.Torso
  5. game.Players.LocalPlayer.Character.Animate:destroy()
  6. run = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  7. run.SoundId = "rbxassetid://439704692"
  8. run.Volume = 0
  9. run.Looped = true
  10. run:Play()
  11. run.PlaybackSpeed = 1.2
  12. print(rig["Left Hip"].C0)
  13. print(rig["Right Hip"].C0)
  14. cart = Instance.new("Part", rig)
  15. cart.CanCollide = false
  16. weld = Instance.new("Weld", cart)
  17. weld.Part0 = cart
  18. weld.Part1 = rig
  19. mesh = Instance.new("SpecialMesh", cart)
  20. mesh.MeshId = "rbxassetid://1155560377"
  21. mesh.TextureId = "rbxassetid://1155560900"
  22. mesh.Scale = Vector3.new(1,1,1)
  23. weld.C0 = weld.C0 * CFrame.new(-1.2,0.5,-0.5)
  24. walking = true
  25. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 35
  26. for i = 1,20 do
  27. wait()
  28. rig["Left Shoulder"].C0 = rig["Left Shoulder"].C0 * CFrame.Angles(0,0,-0.08)
  29. rig["Right Shoulder"].C0 = rig["Right Shoulder"].C0 * CFrame.Angles(0,0,0.08)
  30. end
  31. function walk(key)
  32. key = key:lower()
  33. if key == "w" then
  34. walking = true
  35. run.Volume = 10
  36. if walking == true then
  37. wait()
  38. for i = 1,5 do
  39. end
  40. while walking == true do
  41. for i = 1,5 do
  42. wait()
  43. end
  44. for i = 1,5 do
  45. wait()
  46. end
  47. end
  48. end
  49. end
  50. end
  51. mouse.KeyDown:connect(walk)
  52. function notwalk(key)
  53. key = key:lower()
  54. if key == "w" then
  55. walking = false
  56. run.Volume = 0
  57. for i = 1,10 do
  58. wait()
  59. end
  60. end
  61. end
  62. mouse.KeyUp:connect(notwalk)
  63. ---------------------------------
  64. walking1 = false
  65. function walk1(key)
  66. key = key:lower()
  67. if key == "d" then
  68. walking1 = true
  69. if walking1 == true then
  70. wait()
  71. run.Volume = 10
  72. for i = 1,5 do
  73. end
  74. while walking1 == true do
  75. for i = 1,5 do
  76. wait()
  77. end
  78. for i = 1,5 do
  79. wait()
  80. end
  81. end
  82. end
  83. end
  84. end
  85. mouse.KeyDown:connect(walk1)
  86. function notwalk1(key)
  87. key = key:lower()
  88. if key == "d" then
  89. walking1 = false
  90. run.Volume = 0
  91. for i = 1,10 do
  92. wait()
  93. end
  94. end
  95. end
  96. mouse.KeyUp:connect(notwalk1)
  97. ------------------------------------------
  98. walking2 = false
  99. function walk2(key)
  100. key = key:lower()
  101. if key == "a" then
  102. walking2 = true
  103. run.Volume = 10
  104. if walking2 == true then
  105. wait()
  106. for i = 1,5 do
  107. end
  108. while walking2 == true do
  109. for i = 1,5 do
  110. wait()
  111. end
  112. for i = 1,5 do
  113. wait()
  114.  
  115. end
  116. end
  117. end
  118. end
  119. end
  120. mouse.KeyDown:connect(walk2)
  121. function notwalk2(key)
  122. key = key:lower()
  123. if key == "a" then
  124. walking2 = false
  125. run.Volume = 0
  126. for i = 1,10 do
  127. wait()
  128. end
  129. end
  130. end
  131. mouse.KeyUp:connect(notwalk2)
  132. ----------------------------------------------------
  133. walking3 = false
  134. function walk3(key)
  135. key = key:lower()
  136. if key == "s" then
  137. walking3 = true
  138. run.Volume = 10
  139. if walking3 == true then
  140. wait()
  141. for i = 1,5 do
  142. end
  143. while walking3 == true do
  144. for i = 1,5 do
  145. wait()
  146. end
  147. for i = 1,5 do
  148. wait()
  149. end
  150. end
  151. end
  152. end
  153. end
  154. mouse.KeyDown:connect(walk3)
  155. function notwalk3(key)
  156. key = key:lower()
  157. if key == "s" then
  158. walking3 = false
  159. run.Volume = 0
  160. for i = 1,10 do
  161. wait()
  162. end
  163. end
  164. end
  165. mouse.KeyUp:connect(notwalk3)
  166. grabbing = true
  167. function grab1(cart1)
  168. if grabbing == true then
  169. local torso = cart1.Parent:findFirstChild("Torso")
  170. if torso ~= nil then
  171. local hum = cart1.Parent:findFirstChild("Humanoid")
  172. if hum ~= nil then
  173. hum.PlatformStand = true
  174. local weld1 = Instance.new("Weld", torso)
  175. weld1.Part0 = torso
  176. weld1.Part1 = cart
  177. weld1.C0 = weld1.C0 * CFrame.Angles(-8,-8,0) * CFrame.new(0,0,-4)
  178. end
  179. end
  180. end
  181. end
  182. cart.Touched:connect(grab1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement