Advertisement
sina4

car

Feb 27th, 2020
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.22 KB | None | 0 0
  1. -- made by sina157
  2. car = Instance.new("Model")
  3. car.Name = "car"
  4. car.Parent = game.Workspace
  5.  
  6.  
  7. body = Instance.new("Part")
  8. body.Name = "body"
  9. body.Size = Vector3.new(4, 2.4, 16.01)
  10. body.Position = Vector3.new(-38.43, 2.21, -49.365)
  11. body.Parent = car
  12. body.Material = Enum.Material.Metal
  13. body.BrickColor = BrickColor.Red()
  14. body.BottomSurface = Enum.SurfaceType.Studs
  15.  
  16. seat = Instance.new("VehicleSeat")
  17. seat.Parent = car
  18. seat.Position = Vector3.new(-38.23, 3.555, -47.19)
  19. seat.Size = Vector3.new(1.68, 0.29, 1.78)
  20. seat.MaxSpeed = 80
  21. seat.Torque = 100
  22. seat.TurnSpeed = 0.7
  23. seat.TurnSpeed = 1
  24. seat.Material = Enum.Material.Metal
  25.  
  26.  
  27. w = Instance.new("Part")
  28. w.Name = "w"
  29. w.Size = Vector3.new(4, 4, 4)
  30. w.Position = Vector3.new(-42.43, 2.01, -42.36)
  31. w.Parent = car
  32. w.Shape = Enum.PartType.Cylinder
  33. w.RightSurface = Enum.SurfaceType.Hinge
  34. w.Material = Enum.Material.Metal
  35. w.BrickColor = BrickColor.Black()
  36.  
  37.  
  38. w1 = Instance.new("Part")
  39. w1.Name = "w1"
  40. w1.Size = Vector3.new(4, 4, 4)
  41. w1.Position = Vector3.new(-34.43, 2.01, -42.36)
  42. w1.Parent = car
  43. w1.Shape = Enum.PartType.Cylinder
  44. w1.LeftSurface = Enum.SurfaceType.Hinge
  45. w1.Material = Enum.Material.Metal
  46. w1.BrickColor = BrickColor.Black()
  47.  
  48. w2 = Instance.new("Part")
  49. w2.Name = "w2"
  50. w2.Size = Vector3.new(4, 4, 4)
  51. w2.Position = Vector3.new(-42.43, 2.01, -56.018)
  52. w2.Parent = car
  53. w2.Shape = Enum.PartType.Cylinder
  54. w2.RightSurface = Enum.SurfaceType.Hinge
  55. w2.Material = Enum.Material.Metal
  56. w2.BrickColor = BrickColor.Black()
  57.  
  58. w3 = Instance.new("Part")
  59. w3.Name = "w3"
  60. w3.Size = Vector3.new(4, 4, 4)
  61. w3.Position = Vector3.new(-34.43, 2.01, -56.018)
  62. w3.Parent = car
  63. w3.Shape = Enum.PartType.Cylinder
  64. w3.LeftSurface = Enum.SurfaceType.Hinge
  65. w3.Material = Enum.Material.Metal
  66. w3.BrickColor = BrickColor.Black()
  67.  
  68.  
  69. sp = Instance.new("Part")
  70. sp.BackSurface = Enum.SurfaceType.Glue
  71. sp.Parent = car
  72. sp.Name = "spike"
  73. sp.Size = Vector3.new(3.44, 2.04, 3.72)
  74. sp.Position = Vector3.new(-38.450, 2.309, -59.229)
  75. sm1 = Instance.new("SpecialMesh")
  76. sm1.Parent = sp
  77. sm1.MeshId = "rbxassetid://1257377360"
  78. sm1.TextureId = "http://www.roblox.com/asset?id=39251676"
  79. sm1.Scale = Vector3.new(0.05, 0.04, 0.1)
  80.  
  81. spikeB = Instance.new("Part")
  82. spikeB.Parent = car
  83. spikeB.Position = Vector3.new(-38.232, 3.731, -51.194)
  84. spikeB.Size = Vector3.new(0.58, 0.68, 0.58)
  85. spikeB.Material = Enum.Material.Metal
  86. spikeB.BottomSurface = Enum.SurfaceType.Glue
  87. wwwww = Instance.new("SpecialMesh")
  88. wwwww.Parent = spikeB
  89. wwwww.Scale = Vector3.new(0.01, 0.01, 0.015)
  90. wwwww.Offset = Vector3.new(0, 0, -0.3)
  91. wwwww.MeshId = "rbxassetid://1257377360"
  92. wwwww.TextureId = "http://www.roblox.com/asset?id=39251676"
  93. click1 = Instance.new("ClickDetector")
  94. click1.Parent = spikeB
  95.  
  96. PunchB = Instance.new("Part")
  97. PunchB.Parent = car
  98. PunchB.Position = Vector3.new(-39.31, 3.75, -51.194)
  99. PunchB.Size = Vector3.new(0.58, 0.68, 0.58)
  100. PunchB.Material = Enum.Material.Metal
  101. PunchB.BottomSurface = Enum.SurfaceType.Glue
  102. wwww = Instance.new("SpecialMesh")
  103. wwww.Parent = PunchB
  104. wwww.Scale = Vector3.new(1,1,1)
  105. wwww.MeshId = "rbxassetid://2686025433"
  106. wwww.TextureId = "http://www.roblox.com/asset?id=39251676"
  107. click2 = Instance.new("ClickDetector")
  108. click2.Parent = PunchB
  109.  
  110.  
  111. RemoveB = Instance.new("Part")
  112. RemoveB.Parent = car
  113. RemoveB.Position = Vector3.new(-37.122, 3.76, -51.194)
  114. RemoveB.Size = Vector3.new(0.58, 0.68, 0.58)
  115. RemoveB.Material = Enum.Material.Metal
  116. RemoveB.BottomSurface = Enum.SurfaceType.Glue
  117. www = Instance.new("SpecialMesh")
  118. www.Parent = RemoveB
  119. www.MeshId = ""
  120. www.Scale = Vector3.new(0.58, 0.68, 0.58)
  121. www.TextureId = "http://www.roblox.com/asset/?id=4163464"
  122. click3 = Instance.new("ClickDetector")
  123. click3.Parent = RemoveB
  124.  
  125. value = Instance.new("NumberValue")
  126. value.Parent = car
  127. value.Value = 1
  128.  
  129. sound = Instance.new("Sound")
  130. sound.Parent = sp
  131. sound.Volume = 10
  132.  
  133. revive = Instance.new("Part")
  134. revive.Parent = car
  135. revive.Position = Vector3.new(-38.496, 0.986, -49.787)
  136. revive.Size = Vector3.new(0.88, 0.05, 1.1)
  137. revive.Material = Enum.Material.Metal
  138. revive.TopSurface = Enum.SurfaceType.Glue
  139. RC = Instance.new("ClickDetector")
  140. RC.Parent = revive
  141.  
  142. x = math.random(0,25)
  143. z = math.random(0,25)
  144. car:MakeJoints()
  145. car:MoveTo(Vector3.new(x,10,z))
  146.  
  147.  
  148. function dgm(hit)
  149. if value.Value == 1 then
  150. local h = hit.Parent:findFirstChild("Humanoid")
  151. if not h then
  152. return
  153. end
  154. if h.Health == 0 then
  155. return
  156. end
  157. hit.Parent:findFirstChild("Humanoid"):TakeDamage(9999)
  158. sound.SoundId = "rbxassetid://220834019"
  159. sound:Play()
  160. elseif value.Value == 2 then
  161.  
  162. local h = hit.Parent:findFirstChild("Humanoid")
  163. if not h then
  164. return
  165. end
  166. if h.Health == 0 then
  167. return
  168. end
  169. local b = Instance.new("BodyPosition")
  170. local x = sp.Position.X
  171. local y = sp.Position.Y
  172. local z = sp.Position.Z
  173. if sp.Orientation.Y <= 50 and sp.Orientation.Y >= -50 then
  174. b.position = Vector3.new(x ,y+200 ,z-350)
  175.  
  176. elseif sp.Orientation.Y >= 50 and sp.Orientation.Y <= 150 then
  177. b.position = Vector3.new(x-200 ,y+350 ,z)
  178.  
  179. elseif sp.Orientation.Y >= 151 and sp.Orientation.Y >= -110 then
  180. b.position = Vector3.new(x ,y+200 ,z+350)
  181. elseif sp.Orientation.Y >= -110 and sp.Orientation.Y <= -40 then
  182. b.position = Vector3.new(x+200 ,y+350 ,z)
  183. end
  184. b.maxForce = Vector3.new(25000, 25000, 25000)
  185. b.Parent = hit.Parent.Head
  186. hit.Parent:findFirstChild("Humanoid"):TakeDamage(0.1)
  187. wait(0.4)
  188. b:Destroy()
  189. sound.SoundId = "rbxassetid://2808497405"
  190. sound:Play()
  191.  
  192. elseif value.Value == 3 then
  193.  
  194. hit:remove()
  195.  
  196. end
  197. end
  198.  
  199. function bu1(b1)
  200. value.Value = 1
  201. sm1.MeshId = "rbxassetid://1257377360"
  202. sm1.TextureId = "http://www.roblox.com/asset?id=39251676"
  203. sm1.Scale = Vector3.new(0.05, 0.04, 0.1)
  204. end
  205. function bu2(b2)
  206. value.Value = 2
  207. sm1.MeshId = "rbxassetid://2686025433"
  208. sm1.TextureId = "http://www.roblox.com/asset?id=39251676"
  209. sm1.Scale = Vector3.new(5, 5, 5)
  210. end
  211. function bu3(b3)
  212. value.Value = 3
  213. sm1.MeshId = ""
  214. sm1.TextureId = "http://www.roblox.com/asset/?id=4163464"
  215. sm1.Scale = Vector3.new(3, 2.2, 3.7)
  216. end
  217. function RCB(clk)
  218. body.Orientation= Vector3.new(0, 0, 0)
  219. body.Position = body.Position + Vector3.new(0,10,0)
  220. end
  221. RC.MouseClick:Connect(RCB)
  222. click1.MouseClick:Connect(bu1)
  223. click2.MouseClick:Connect(bu2)
  224. click3.MouseClick:Connect(bu3)
  225. sp.Touched:Connect(dgm)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement