Advertisement
subaru112g

car

Feb 6th, 2019
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.49 KB | None | 0 0
  1. local char = owner.Character
  2.  
  3. for i,v in pairs(char:GetChildren()) do
  4. if v.ClassName == "Hat" or v.ClassName == "Accessory" or v.ClassName == "ShirtGraphic" then
  5. v:Destroy()
  6. end
  7. if v.ClassName == "Part" or v.ClassName == "MeshPart" then
  8. if not(v.Name == "Torso") then
  9. v.Transparency = 1
  10. end
  11. end
  12. end
  13.  
  14.  
  15. for i,v in pairs(char.Head:GetChildren()) do
  16. if v.ClassName == "Decal" then
  17. v.Transparency = 1
  18. end
  19. end
  20.  
  21. local p = Instance.new("Part",char)
  22. p.Size = Vector3.new(5.5, 2.5, 2.7)
  23. p.Massless = true
  24. local w = Instance.new("Weld",p)
  25. w.Part0 = char.Torso
  26. w.Part1 = p
  27. w.C0 = CFrame.new(0, -0.599999905, -5.80000305, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  28.  
  29. function onTouched(fire)
  30. if not(fire.Parent == char) then
  31. if not(fire.Name == "Torso" or fire.Name == "HumanoidRootPart" or fire.Name == "UpperTorso" or fire.Name == "LowerTorso" or fire.Name == "Head") then
  32. local hum = fire.Parent:FindFirstChildOfClass("Humanoid")
  33. if hum then
  34. hum.WalkSpeed = hum.WalkSpeed - 1
  35. end
  36. fire.Parent = game.Workspace
  37. fire.CanCollide = true
  38. fire.Anchored = false
  39. fire:BreakJoints()
  40. end
  41. end
  42. end
  43. p.Touched:connect(onTouched)
  44.  
  45. if char:FindFirstChild("Animate") then
  46. char.Animate:Destroy()
  47. end
  48. wait(0.1)
  49. local hum = char:FindFirstChildOfClass("Humanoid")
  50. local idleanim = Instance.new("Animation")
  51. idleanim.Name = "Roblox Idle Animation"
  52. idleanim.AnimationId = "http://www.roblox.com/asset/?id=182435998"
  53. local idleanimplay = hum:LoadAnimation(idleanim)
  54. idleanimplay:Play()
  55.  
  56. if hum then
  57. hum.Name = "CAR"
  58. hum.WalkSpeed = 40
  59. hum.MaxHealth = 9999999999999999
  60. hum.Health = 9999999999999999
  61. end
  62.  
  63. local mus = Instance.new("Sound",char)
  64. mus.Playing = true
  65. mus.SoundId = "rbxassetid://279207008"
  66. mus.Volume = 1
  67. mus.Looped = true
  68. local timepos = nil
  69.  
  70. local m = Instance.new("SpecialMesh",char.Torso)
  71. m.Scale = Vector3.new(0.005, 0.005, 0.005)
  72. m.Offset = Vector3.new(0, -0.7, 0)
  73. m.MeshId = "rbxassetid://453074009"
  74. m.TextureId = "rbxassetid://453073781"
  75.  
  76. local plr = owner
  77.  
  78. local remote = Instance.new("RemoteEvent", char)
  79. remote.Name = "ReplicationEvent"
  80. local client = NLS([==[
  81. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  82. local remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
  83. spawn(function()
  84. while game:GetService("RunService").Heartbeat:Wait() do
  85. remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
  86. end
  87. end)
  88. game:GetService("UserInputService").InputBegan:Connect(function(input, isTyping)
  89. if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard then
  90. remote:FireServer(1, input.KeyCode)
  91. end
  92. end)
  93. mouse.Button1Down:Connect(function()
  94. remote:FireServer(2)
  95. end)
  96. remote.OnClientEvent:Connect(function()
  97. game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position, Vector3.new(mouse.Hit.Position.X, game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position.Y, mouse.Hit.Position.Z))
  98. end)
  99. ]==], char)
  100.  
  101. ---------------------------------
  102. -------------Attacks-------------
  103. ---------------------------------
  104.  
  105. remote.OnServerEvent:Connect(function(Player, number, key)
  106. if number == 1 and plr.Name == Player.Name then
  107. if key == Enum.KeyCode.Z then
  108. --1
  109. hum.WalkSpeed = 40
  110. m.Scale = Vector3.new(0.005, 0.005, 0.005)
  111. m.Offset = Vector3.new(0, -0.7, 0)
  112. m.MeshId = "rbxassetid://453074009"
  113. m.TextureId = "rbxassetid://453073781"
  114.  
  115. end
  116. if key == Enum.KeyCode.X then
  117. --2
  118. hum.WalkSpeed = 100
  119. m.Scale = Vector3.new(5, 5, 5)
  120. m.Offset = Vector3.new(0, -0.7, 0)
  121. m.MeshId = "rbxassetid://693526472"
  122. m.TextureId = "rbxassetid://693526518"
  123.  
  124. end
  125. if key == Enum.KeyCode.C then
  126. --3
  127. hum.WalkSpeed = 150
  128. m.Scale = Vector3.new(0.5, 0.5, 0.5)
  129. m.Offset = Vector3.new(0, -0.7, 0)
  130. m.MeshId = "rbxassetid://633543481"
  131. m.TextureId = "rbxassetid://633543563"
  132.  
  133. end
  134. elseif Player.Name == owner.Name then
  135.  
  136. end
  137. end)
  138.  
  139. while true do
  140. wait()
  141. hum.Health = 9999999999999999
  142. for i,v in pairs(char:GetChildren()) do
  143. if v.ClassName == "Hat" or v.ClassName == "Accessory" then
  144. v:Destroy()
  145. end
  146. if v.ClassName == "Part" or v.ClassName == "MeshPart" then
  147. if not(v.Name == "Torso") then
  148. v.Transparency = 1
  149. end
  150. end
  151. end
  152.  
  153. if mus.Parent == char then
  154. mus.SoundId = "rbxassetid://279207008"
  155. mus.Playing = true
  156. mus.Volume = 1
  157. mus.Looped = true
  158. timepos = mus.TimePosition
  159. else
  160. mus = Instance.new("Sound", char)
  161. mus.TimePosition = timepos
  162. end
  163. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement