Advertisement
antoniorigo4

some car script by me ROBLOX_COMPATIBLE

Jun 17th, 2019
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.47 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Model0 = Instance.new("Model")
  20. Folder1 = Instance.new("Folder")
  21. Part2 = Instance.new("Part")
  22. Rotate3 = Instance.new("Rotate")
  23. Part4 = Instance.new("Part")
  24. Rotate5 = Instance.new("Rotate")
  25. Part6 = Instance.new("Part")
  26. Rotate7 = Instance.new("Rotate")
  27. Part8 = Instance.new("Part")
  28. Rotate9 = Instance.new("Rotate")
  29. VehicleSeat10 = Instance.new("VehicleSeat")
  30. Script11 = Instance.new("Script")
  31. WeldConstraint12 = Instance.new("WeldConstraint")
  32. Folder13 = Instance.new("Folder")
  33. Part14 = Instance.new("Part")
  34. Part15 = Instance.new("Part")
  35. Part16 = Instance.new("Part")
  36. Part17 = Instance.new("Part")
  37. Part18 = Instance.new("Part")
  38. Part19 = Instance.new("Part")
  39. Part20 = Instance.new("Part")
  40. Part21 = Instance.new("Part")
  41. Part22 = Instance.new("Part")
  42. Part23 = Instance.new("Part")
  43. Part24 = Instance.new("Part")
  44. Part25 = Instance.new("Part")
  45. Part26 = Instance.new("Part")
  46. Part27 = Instance.new("Part")
  47. Part28 = Instance.new("Part")
  48. Part29 = Instance.new("Part")
  49. Part30 = Instance.new("Part")
  50. Part31 = Instance.new("Part")
  51. Part32 = Instance.new("Part")
  52. Part33 = Instance.new("Part")
  53. Part34 = Instance.new("Part")
  54. Part35 = Instance.new("Part")
  55. Part36 = Instance.new("Part")
  56. Script37 = Instance.new("Script")
  57. NumberValue38 = Instance.new("NumberValue")
  58. Part39 = Instance.new("Part")
  59. SurfaceGui40 = Instance.new("SurfaceGui")
  60. TextLabel41 = Instance.new("TextLabel")
  61. WeldConstraint42 = Instance.new("WeldConstraint")
  62. Model0.Name = "Car"
  63. Model0.Parent = mas
  64. Folder1.Name = "Wheels"
  65. Folder1.Parent = Model0
  66. Part2.Name = "wheel1"
  67. Part2.Parent = Folder1
  68. Part2.CFrame = CFrame.new(-5.00000381, 4.01001692, -29, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  69. Part2.Position = Vector3.new(-5.00000381, 4.01001692, -29)
  70. Part2.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  71. Part2.Size = Vector3.new(2, 4, 4)
  72. Part2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  73. Part2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  74. Part2.BrickColor = BrickColor.new("Really black")
  75. Part2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  76. Part2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  77. Part2.RightParamA = 0
  78. Part2.RightParamB = 0
  79. Part2.RightSurface = Enum.SurfaceType.Hinge
  80. Part2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  81. Part2.brickColor = BrickColor.new("Really black")
  82. Part2.Shape = Enum.PartType.Cylinder
  83. Rotate3.Parent = Part2
  84. Rotate3.C0 = CFrame.new(1, 0, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  85. Rotate3.C1 = CFrame.new(-4.5, 0.199999988, 7, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  86. Rotate3.Part0 = Part2
  87. Rotate3.Part1 = Part30
  88. Rotate3.part1 = Part30
  89. Part4.Name = "wheel2"
  90. Part4.Parent = Folder1
  91. Part4.CFrame = CFrame.new(5.99999619, 4.01001692, -29, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  92. Part4.Orientation = Vector3.new(0, 180, 0)
  93. Part4.Position = Vector3.new(5.99999619, 4.01001692, -29)
  94. Part4.Rotation = Vector3.new(-180, 0, -180)
  95. Part4.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  96. Part4.Size = Vector3.new(2, 4, 4)
  97. Part4.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  98. Part4.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  99. Part4.BrickColor = BrickColor.new("Really black")
  100. Part4.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  101. Part4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  102. Part4.RightParamA = 0
  103. Part4.RightParamB = 0
  104. Part4.RightSurface = Enum.SurfaceType.Hinge
  105. Part4.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  106. Part4.brickColor = BrickColor.new("Really black")
  107. Part4.Shape = Enum.PartType.Cylinder
  108. Rotate5.Parent = Part4
  109. Rotate5.C0 = CFrame.new(1, 0, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  110. Rotate5.C1 = CFrame.new(4.5, 0.199999988, 7, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  111. Rotate5.Part0 = Part4
  112. Rotate5.Part1 = Part30
  113. Rotate5.part1 = Part30
  114. Part6.Name = "wheel3"
  115. Part6.Parent = Folder1
  116. Part6.CFrame = CFrame.new(-5.00000381, 4.01001692, -43, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  117. Part6.Position = Vector3.new(-5.00000381, 4.01001692, -43)
  118. Part6.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  119. Part6.Size = Vector3.new(2, 4, 4)
  120. Part6.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  121. Part6.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  122. Part6.BrickColor = BrickColor.new("Really black")
  123. Part6.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  124. Part6.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  125. Part6.RightParamA = 0
  126. Part6.RightParamB = 0
  127. Part6.RightSurface = Enum.SurfaceType.Hinge
  128. Part6.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  129. Part6.brickColor = BrickColor.new("Really black")
  130. Part6.Shape = Enum.PartType.Cylinder
  131. Rotate7.Parent = Part6
  132. Rotate7.C0 = CFrame.new(1, 0, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  133. Rotate7.C1 = CFrame.new(-4.5, 0.199999988, -7, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  134. Rotate7.Part0 = Part6
  135. Rotate7.Part1 = Part30
  136. Rotate7.part1 = Part30
  137. Part8.Name = "wheel4"
  138. Part8.Parent = Folder1
  139. Part8.CFrame = CFrame.new(5.99999619, 4.01001692, -43, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  140. Part8.Orientation = Vector3.new(0, 180, 0)
  141. Part8.Position = Vector3.new(5.99999619, 4.01001692, -43)
  142. Part8.Rotation = Vector3.new(-180, 0, -180)
  143. Part8.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  144. Part8.Size = Vector3.new(2, 4, 4)
  145. Part8.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  146. Part8.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  147. Part8.BrickColor = BrickColor.new("Really black")
  148. Part8.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  149. Part8.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  150. Part8.RightParamA = 0
  151. Part8.RightParamB = 0
  152. Part8.RightSurface = Enum.SurfaceType.Hinge
  153. Part8.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  154. Part8.brickColor = BrickColor.new("Really black")
  155. Part8.Shape = Enum.PartType.Cylinder
  156. Rotate9.Parent = Part8
  157. Rotate9.C0 = CFrame.new(1, 0, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  158. Rotate9.C1 = CFrame.new(4.5, 0.199999988, -7, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  159. Rotate9.Part0 = Part8
  160. Rotate9.Part1 = Part30
  161. Rotate9.part1 = Part30
  162. VehicleSeat10.Parent = Model0
  163. VehicleSeat10.CFrame = CFrame.new(0.499996185, 4.81001663, -37, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  164. VehicleSeat10.Position = Vector3.new(0.499996185, 4.81001663, -37)
  165. VehicleSeat10.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  166. VehicleSeat10.Size = Vector3.new(3, 1, 2)
  167. VehicleSeat10.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  168. VehicleSeat10.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  169. VehicleSeat10.BrickColor = BrickColor.new("Really black")
  170. VehicleSeat10.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  171. VehicleSeat10.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  172. VehicleSeat10.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  173. VehicleSeat10.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  174. VehicleSeat10.brickColor = BrickColor.new("Really black")
  175. Script11.Parent = VehicleSeat10
  176. table.insert(cors,sandbox(Script11,function()
  177. while true do
  178. local speed = script.Parent.Velocity.magnitude
  179. local fuel = script.Parent.Parent.FuelLeft.Value
  180. script.Parent.Parent.FuelLeft.Value = (script.Parent.Parent.FuelLeft.Value -speed)
  181. script.Parent.Parent.percentage.SurfaceGui.TextLabel.Text = "Fuel remaining: "..fuel
  182. if script.Parent.Parent.FuelLeft.Value <0 then
  183. script.Parent.Disabled = true
  184. wait ()
  185. end
  186. wait ()
  187. end
  188.  
  189. end))
  190. WeldConstraint12.Parent = VehicleSeat10
  191. WeldConstraint12.Part0 = VehicleSeat10
  192. WeldConstraint12.Part1 = Part30
  193. Folder13.Name = "Body"
  194. Folder13.Parent = Model0
  195. Part14.Parent = Folder13
  196. Part14.CFrame = CFrame.new(-3.50000381, 5.81001663, -36, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  197. Part14.Position = Vector3.new(-3.50000381, 5.81001663, -36)
  198. Part14.Color = Color3.new(0.388235, 0.372549, 0.384314)
  199. Part14.Size = Vector3.new(1, 3, 16)
  200. Part14.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  201. Part14.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  202. Part14.BrickColor = BrickColor.new("Dark stone grey")
  203. Part14.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  204. Part14.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  205. Part14.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  206. Part14.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  207. Part14.brickColor = BrickColor.new("Dark stone grey")
  208. Part15.Parent = Folder13
  209. Part15.CFrame = CFrame.new(4.49999619, 5.81001663, -37, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  210. Part15.Position = Vector3.new(4.49999619, 5.81001663, -37)
  211. Part15.Color = Color3.new(0.388235, 0.372549, 0.384314)
  212. Part15.Size = Vector3.new(1, 3, 2)
  213. Part15.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  214. Part15.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  215. Part15.BrickColor = BrickColor.new("Dark stone grey")
  216. Part15.CanCollide = false
  217. Part15.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  218. Part15.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  219. Part15.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  220. Part15.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  221. Part15.brickColor = BrickColor.new("Dark stone grey")
  222. Part16.Parent = Folder13
  223. Part16.CFrame = CFrame.new(-3.50000381, 8.31001663, -39, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  224. Part16.Position = Vector3.new(-3.50000381, 8.31001663, -39)
  225. Part16.Color = Color3.new(0.388235, 0.372549, 0.384314)
  226. Part16.Size = Vector3.new(1, 2, 2)
  227. Part16.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  228. Part16.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  229. Part16.BrickColor = BrickColor.new("Dark stone grey")
  230. Part16.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  231. Part16.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  232. Part16.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  233. Part16.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  234. Part16.brickColor = BrickColor.new("Dark stone grey")
  235. Part17.Name = "enginefront"
  236. Part17.Parent = Folder13
  237. Part17.CFrame = CFrame.new(0.499995589, 5.81001663, -43.5, 1, 0, 2.98023224e-08, 0, 1, 0, 2.98023224e-08, 0, 1)
  238. Part17.Position = Vector3.new(0.499995589, 5.81001663, -43.5)
  239. Part17.Color = Color3.new(0.388235, 0.372549, 0.384314)
  240. Part17.Size = Vector3.new(7, 3, 1)
  241. Part17.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  242. Part17.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  243. Part17.BrickColor = BrickColor.new("Dark stone grey")
  244. Part17.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  245. Part17.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  246. Part17.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  247. Part17.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  248. Part17.brickColor = BrickColor.new("Dark stone grey")
  249. Part18.Parent = Folder13
  250. Part18.CFrame = CFrame.new(0.499996185, 5.81001663, -34.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  251. Part18.Position = Vector3.new(0.499996185, 5.81001663, -34.5)
  252. Part18.Color = Color3.new(0.388235, 0.372549, 0.384314)
  253. Part18.Size = Vector3.new(7, 3, 1)
  254. Part18.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  255. Part18.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  256. Part18.BrickColor = BrickColor.new("Dark stone grey")
  257. Part18.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  258. Part18.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  259. Part18.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  260. Part18.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  261. Part18.brickColor = BrickColor.new("Dark stone grey")
  262. Part19.Parent = Folder13
  263. Part19.CFrame = CFrame.new(4.49999619, 8.31001663, -39, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  264. Part19.Position = Vector3.new(4.49999619, 8.31001663, -39)
  265. Part19.Color = Color3.new(0.388235, 0.372549, 0.384314)
  266. Part19.Size = Vector3.new(1, 2, 2)
  267. Part19.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  268. Part19.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  269. Part19.BrickColor = BrickColor.new("Dark stone grey")
  270. Part19.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  271. Part19.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  272. Part19.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  273. Part19.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  274. Part19.brickColor = BrickColor.new("Dark stone grey")
  275. Part20.Parent = Folder13
  276. Part20.CFrame = CFrame.new(0.499996185, 8.31001663, -39.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  277. Part20.Position = Vector3.new(0.499996185, 8.31001663, -39.5)
  278. Part20.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  279. Part20.Transparency = 0.5
  280. Part20.Size = Vector3.new(7, 2, 1)
  281. Part20.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  282. Part20.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  283. Part20.BrickColor = BrickColor.new("Cyan")
  284. Part20.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  285. Part20.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  286. Part20.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  287. Part20.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  288. Part20.brickColor = BrickColor.new("Cyan")
  289. Part21.Parent = Folder13
  290. Part21.CFrame = CFrame.new(4.49999619, 8.31001663, -37, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  291. Part21.Position = Vector3.new(4.49999619, 8.31001663, -37)
  292. Part21.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  293. Part21.Transparency = 0.5
  294. Part21.Size = Vector3.new(1, 2, 2)
  295. Part21.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  296. Part21.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  297. Part21.BrickColor = BrickColor.new("Cyan")
  298. Part21.CanCollide = false
  299. Part21.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  300. Part21.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  301. Part21.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  302. Part21.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  303. Part21.brickColor = BrickColor.new("Cyan")
  304. Part22.Parent = Folder13
  305. Part22.CFrame = CFrame.new(3.49999619, 4.81001663, -44.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  306. Part22.Position = Vector3.new(3.49999619, 4.81001663, -44.5)
  307. Part22.Color = Color3.new(1, 1, 0)
  308. Part22.Size = Vector3.new(1, 1, 1)
  309. Part22.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  310. Part22.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  311. Part22.BrickColor = BrickColor.new("New Yeller")
  312. Part22.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  313. Part22.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  314. Part22.Material = Enum.Material.Neon
  315. Part22.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  316. Part22.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  317. Part22.brickColor = BrickColor.new("New Yeller")
  318. Part23.Parent = Folder13
  319. Part23.CFrame = CFrame.new(-2.50000381, 4.81001663, -27.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  320. Part23.Position = Vector3.new(-2.50000381, 4.81001663, -27.5)
  321. Part23.Color = Color3.new(1, 1, 0)
  322. Part23.Size = Vector3.new(1, 1, 1)
  323. Part23.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  324. Part23.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  325. Part23.BrickColor = BrickColor.new("New Yeller")
  326. Part23.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  327. Part23.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  328. Part23.Material = Enum.Material.Neon
  329. Part23.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  330. Part23.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  331. Part23.brickColor = BrickColor.new("New Yeller")
  332. Part24.Parent = Folder13
  333. Part24.CFrame = CFrame.new(0.499996185, 9.81001663, -37, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  334. Part24.Position = Vector3.new(0.499996185, 9.81001663, -37)
  335. Part24.Color = Color3.new(0.388235, 0.372549, 0.384314)
  336. Part24.Size = Vector3.new(9, 1, 6)
  337. Part24.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  338. Part24.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  339. Part24.BrickColor = BrickColor.new("Dark stone grey")
  340. Part24.CanCollide = false
  341. Part24.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  342. Part24.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  343. Part24.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  344. Part24.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  345. Part24.brickColor = BrickColor.new("Dark stone grey")
  346. Part25.Parent = Folder13
  347. Part25.CFrame = CFrame.new(-2.50000381, 4.81001663, -44.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  348. Part25.Position = Vector3.new(-2.50000381, 4.81001663, -44.5)
  349. Part25.Color = Color3.new(1, 1, 0)
  350. Part25.Size = Vector3.new(1, 1, 1)
  351. Part25.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  352. Part25.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  353. Part25.BrickColor = BrickColor.new("New Yeller")
  354. Part25.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  355. Part25.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  356. Part25.Material = Enum.Material.Neon
  357. Part25.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  358. Part25.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  359. Part25.brickColor = BrickColor.new("New Yeller")
  360. Part26.Parent = Folder13
  361. Part26.CFrame = CFrame.new(3.49999619, 4.81001663, -27.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  362. Part26.Position = Vector3.new(3.49999619, 4.81001663, -27.5)
  363. Part26.Color = Color3.new(1, 1, 0)
  364. Part26.Size = Vector3.new(1, 1, 1)
  365. Part26.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  366. Part26.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  367. Part26.BrickColor = BrickColor.new("New Yeller")
  368. Part26.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  369. Part26.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  370. Part26.Material = Enum.Material.Neon
  371. Part26.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  372. Part26.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  373. Part26.brickColor = BrickColor.new("New Yeller")
  374. Part27.Parent = Folder13
  375. Part27.CFrame = CFrame.new(0.499996185, 5.81001663, -39.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  376. Part27.Position = Vector3.new(0.499996185, 5.81001663, -39.5)
  377. Part27.Size = Vector3.new(7, 3, 1)
  378. Part27.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  379. Part27.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  380. Part27.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  381. Part27.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  382. Part27.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  383. Part27.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  384. Part28.Parent = Folder13
  385. Part28.CFrame = CFrame.new(-3.50000381, 8.31001663, -37, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  386. Part28.Position = Vector3.new(-3.50000381, 8.31001663, -37)
  387. Part28.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  388. Part28.Transparency = 0.5
  389. Part28.Size = Vector3.new(1, 2, 2)
  390. Part28.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  391. Part28.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  392. Part28.BrickColor = BrickColor.new("Cyan")
  393. Part28.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  394. Part28.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  395. Part28.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  396. Part28.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  397. Part28.brickColor = BrickColor.new("Cyan")
  398. Part29.Parent = Folder13
  399. Part29.CFrame = CFrame.new(-3.50000381, 8.31001663, -35, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  400. Part29.Position = Vector3.new(-3.50000381, 8.31001663, -35)
  401. Part29.Color = Color3.new(0.388235, 0.372549, 0.384314)
  402. Part29.Size = Vector3.new(1, 2, 2)
  403. Part29.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  404. Part29.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  405. Part29.BrickColor = BrickColor.new("Dark stone grey")
  406. Part29.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  407. Part29.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  408. Part29.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  409. Part29.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  410. Part29.brickColor = BrickColor.new("Dark stone grey")
  411. Part30.Name = "body1"
  412. Part30.Parent = Folder13
  413. Part30.CFrame = CFrame.new(0.499996185, 3.81001663, -36, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  414. Part30.Position = Vector3.new(0.499996185, 3.81001663, -36)
  415. Part30.Color = Color3.new(0.388235, 0.372549, 0.384314)
  416. Part30.Size = Vector3.new(9, 1, 16)
  417. Part30.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  418. Part30.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  419. Part30.BrickColor = BrickColor.new("Dark stone grey")
  420. Part30.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  421. Part30.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  422. Part30.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  423. Part30.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  424. Part30.brickColor = BrickColor.new("Dark stone grey")
  425. Part31.Parent = Folder13
  426. Part31.CFrame = CFrame.new(0.499996185, 6.81001663, -41.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  427. Part31.Position = Vector3.new(0.499996185, 6.81001663, -41.5)
  428. Part31.Color = Color3.new(0.388235, 0.372549, 0.384314)
  429. Part31.Size = Vector3.new(7, 1, 3)
  430. Part31.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  431. Part31.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  432. Part31.BrickColor = BrickColor.new("Dark stone grey")
  433. Part31.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  434. Part31.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  435. Part31.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  436. Part31.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  437. Part31.brickColor = BrickColor.new("Dark stone grey")
  438. Part32.Parent = Folder13
  439. Part32.CFrame = CFrame.new(0.499996185, 8.31001663, -34.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  440. Part32.Position = Vector3.new(0.499996185, 8.31001663, -34.5)
  441. Part32.Color = Color3.new(0.0156863, 0.686275, 0.92549)
  442. Part32.Transparency = 0.5
  443. Part32.Size = Vector3.new(7, 2, 1)
  444. Part32.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  445. Part32.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  446. Part32.BrickColor = BrickColor.new("Cyan")
  447. Part32.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  448. Part32.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  449. Part32.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  450. Part32.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  451. Part32.brickColor = BrickColor.new("Cyan")
  452. Part33.Parent = Folder13
  453. Part33.CFrame = CFrame.new(4.49999619, 8.31001663, -35, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  454. Part33.Position = Vector3.new(4.49999619, 8.31001663, -35)
  455. Part33.Color = Color3.new(0.388235, 0.372549, 0.384314)
  456. Part33.Size = Vector3.new(1, 2, 2)
  457. Part33.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  458. Part33.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  459. Part33.BrickColor = BrickColor.new("Dark stone grey")
  460. Part33.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  461. Part33.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  462. Part33.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  463. Part33.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  464. Part33.brickColor = BrickColor.new("Dark stone grey")
  465. Part34.Parent = Folder13
  466. Part34.CFrame = CFrame.new(4.49999619, 5.81001663, -41, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  467. Part34.Position = Vector3.new(4.49999619, 5.81001663, -41)
  468. Part34.Color = Color3.new(0.388235, 0.372549, 0.384314)
  469. Part34.Size = Vector3.new(1, 3, 6)
  470. Part34.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  471. Part34.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  472. Part34.BrickColor = BrickColor.new("Dark stone grey")
  473. Part34.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  474. Part34.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  475. Part34.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  476. Part34.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  477. Part34.brickColor = BrickColor.new("Dark stone grey")
  478. Part35.Parent = Folder13
  479. Part35.CFrame = CFrame.new(0.499996185, 5.81001663, -28.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  480. Part35.Position = Vector3.new(0.499996185, 5.81001663, -28.5)
  481. Part35.Color = Color3.new(0.388235, 0.372549, 0.384314)
  482. Part35.Size = Vector3.new(7, 3, 1)
  483. Part35.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  484. Part35.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  485. Part35.BrickColor = BrickColor.new("Dark stone grey")
  486. Part35.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  487. Part35.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  488. Part35.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  489. Part35.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  490. Part35.brickColor = BrickColor.new("Dark stone grey")
  491. Part36.Parent = Folder13
  492. Part36.CFrame = CFrame.new(4.49999619, 5.81001663, -32, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  493. Part36.Position = Vector3.new(4.49999619, 5.81001663, -32)
  494. Part36.Color = Color3.new(0.388235, 0.372549, 0.384314)
  495. Part36.Size = Vector3.new(1, 3, 8)
  496. Part36.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  497. Part36.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  498. Part36.BrickColor = BrickColor.new("Dark stone grey")
  499. Part36.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  500. Part36.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  501. Part36.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  502. Part36.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  503. Part36.brickColor = BrickColor.new("Dark stone grey")
  504. Script37.Name = "qPerfectionWeld"
  505. Script37.Parent = Folder13
  506. table.insert(cors,sandbox(Script37,function()
  507. -- Created by Quenty (@Quenty, follow me on twitter).
  508. -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
  509. -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
  510.  
  511. --[[ INSTRUCTIONS
  512. - Place in the model
  513. - Make sure model is anchored
  514. - That's it. It will weld the model and all children.
  515.  
  516. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  517. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  518. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  519. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  520. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  521. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  522. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  523. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  524.  
  525. This script is designed to be used is a regular script. In a local script it will weld, but it will not attempt to handle ancestory changes.
  526. ]]
  527.  
  528. --[[ DOCUMENTATION
  529. - Will work in tools. If ran more than once it will not create more than one weld. This is especially useful for tools that are dropped and then picked up again.
  530. - Will work in PBS servers
  531. - Will work as long as it starts out with the part anchored
  532. - Stores the relative CFrame as a CFrame value
  533. - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
  534. - Utilizes a recursive algorith to find all parts in the model
  535. - Will reweld on script reparent if the script is initially parented to a tool.
  536. - Welds as fast as possible
  537. ]]
  538.  
  539. -- qPerfectionWeld.lua
  540. -- Created 10/6/2014
  541. -- Author: Quenty
  542. -- Version 1.0.3
  543.  
  544. -- Updated 10/14/2014 - Updated to 1.0.1
  545. --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
  546.  
  547. -- Updated 10/14/2014 - Updated to 1.0.2
  548. --- Fixed bug fix.
  549.  
  550. -- Updated 10/14/2014 - Updated to 1.0.3
  551. --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
  552.  
  553. local NEVER_BREAK_JOINTS = false -- If you set this to true it will never break joints (this can create some welding issues, but can save stuff like hinges).
  554.  
  555.  
  556. local function CallOnChildren(Instance, FunctionToCall)
  557. -- Calls a function on each of the children of a certain object, using recursion.
  558.  
  559. FunctionToCall(Instance)
  560.  
  561. for _, Child in next, Instance:GetChildren() do
  562. CallOnChildren(Child, FunctionToCall)
  563. end
  564. end
  565.  
  566. local function GetNearestParent(Instance, ClassName)
  567. -- Returns the nearest parent of a certain class, or returns nil
  568.  
  569. local Ancestor = Instance
  570. repeat
  571. Ancestor = Ancestor.Parent
  572. if Ancestor == nil then
  573. return nil
  574. end
  575. until Ancestor:IsA(ClassName)
  576.  
  577. return Ancestor
  578. end
  579.  
  580. local function GetBricks(StartInstance)
  581. local List = {}
  582.  
  583. -- if StartInstance:IsA("BasePart") then
  584. -- List[#List+1] = StartInstance
  585. -- end
  586.  
  587. CallOnChildren(StartInstance, function(Item)
  588. if Item:IsA("BasePart") then
  589. List[#List+1] = Item;
  590. end
  591. end)
  592.  
  593. return List
  594. end
  595.  
  596. local function Modify(Instance, Values)
  597. -- Modifies an Instance by using a table.
  598.  
  599. assert(type(Values) == "table", "Values is not a table");
  600.  
  601. for Index, Value in next, Values do
  602. if type(Index) == "number" then
  603. Value.Parent = Instance
  604. else
  605. Instance[Index] = Value
  606. end
  607. end
  608. return Instance
  609. end
  610.  
  611. local function Make(ClassType, Properties)
  612. -- Using a syntax hack to create a nice way to Make new items.
  613.  
  614. return Modify(Instance.new(ClassType), Properties)
  615. end
  616.  
  617. local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
  618. local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
  619.  
  620. local function HasWheelJoint(Part)
  621. for _, SurfaceName in pairs(Surfaces) do
  622. for _, HingSurfaceName in pairs(HingSurfaces) do
  623. if Part[SurfaceName].Name == HingSurfaceName then
  624. return true
  625. end
  626. end
  627. end
  628.  
  629. return false
  630. end
  631.  
  632. local function ShouldBreakJoints(Part)
  633. --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
  634. -- definitely some edge cases.
  635.  
  636. if NEVER_BREAK_JOINTS then
  637. return false
  638. end
  639.  
  640. if HasWheelJoint(Part) then
  641. return false
  642. end
  643.  
  644. local Connected = Part:GetConnectedParts()
  645.  
  646. if #Connected == 1 then
  647. return false
  648. end
  649.  
  650. for _, Item in pairs(Connected) do
  651. if HasWheelJoint(Item) then
  652. return false
  653. elseif not Item:IsDescendantOf(script.Parent) then
  654. return false
  655. end
  656. end
  657.  
  658. return true
  659. end
  660.  
  661. local function WeldTogether(Part0, Part1, JointType, WeldParent)
  662. --- Weld's 2 parts together
  663. -- @param Part0 The first part
  664. -- @param Part1 The second part (Dependent part most of the time).
  665. -- @param [JointType] The type of joint. Defaults to weld.
  666. -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
  667. -- @return The weld created.
  668.  
  669. JointType = JointType or "Weld"
  670. local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
  671.  
  672. local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
  673. Modify(NewWeld, {
  674. Name = "qCFrameWeldThingy";
  675. Part0 = Part0;
  676. Part1 = Part1;
  677. C0 = CFrame.new();--Part0.CFrame:inverse();
  678. C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
  679. Parent = Part1;
  680. })
  681.  
  682. if not RelativeValue then
  683. RelativeValue = Make("CFrameValue", {
  684. Parent = Part1;
  685. Name = "qRelativeCFrameWeldValue";
  686. Archivable = true;
  687. Value = NewWeld.C1;
  688. })
  689. end
  690.  
  691. return NewWeld
  692. end
  693.  
  694. local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
  695. -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
  696. -- @param MainPart The part to weld the model to (can be in the model).
  697. -- @param [JointType] The type of joint. Defaults to weld.
  698. -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
  699.  
  700. for _, Part in pairs(Parts) do
  701. if ShouldBreakJoints(Part) then
  702. Part:BreakJoints()
  703. end
  704. end
  705.  
  706. for _, Part in pairs(Parts) do
  707. if Part ~= MainPart then
  708. WeldTogether(MainPart, Part, JointType, MainPart)
  709. end
  710. end
  711.  
  712. if not DoNotUnanchor then
  713. for _, Part in pairs(Parts) do
  714. Part.Anchored = false
  715. end
  716. MainPart.Anchored = false
  717. end
  718. end
  719.  
  720. local function PerfectionWeld()
  721. local Tool = GetNearestParent(script, "Tool")
  722.  
  723. local Parts = GetBricks(script.Parent)
  724. local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or script.Parent:IsA("Model") and script.Parent.PrimaryPart or Parts[1]
  725.  
  726. if PrimaryPart then
  727. WeldParts(Parts, PrimaryPart, "Weld", false)
  728. else
  729. warn("qWeld - Unable to weld part")
  730. end
  731.  
  732. return Tool
  733. end
  734.  
  735. local Tool = PerfectionWeld()
  736.  
  737.  
  738. if Tool and script.ClassName == "Script" then
  739. --- Don't bother with local scripts
  740.  
  741. script.Parent.AncestryChanged:connect(function()
  742. PerfectionWeld()
  743. end)
  744. end
  745.  
  746. -- Created by Quenty (@Quenty, follow me on twitter).
  747.  
  748. end))
  749. NumberValue38.Name = "FuelLeft"
  750. NumberValue38.Parent = Model0
  751. NumberValue38.Value = 100000
  752. Part39.Name = "percentage"
  753. Part39.Parent = Model0
  754. Part39.CFrame = CFrame.new(0.589993536, 5.81001663, -44.1450005, 1, 0, 5.88595867e-07, 0, 1, 0, -4.91738319e-07, 0, 1)
  755. Part39.Position = Vector3.new(0.589993536, 5.81001663, -44.1450005)
  756. Part39.Color = Color3.new(0.121569, 0.501961, 0.113725)
  757. Part39.Size = Vector3.new(7.17999983, 1, 0.290000111)
  758. Part39.BottomSurface = Enum.SurfaceType.Smooth
  759. Part39.BrickColor = BrickColor.new("Forest green")
  760. Part39.TopSurface = Enum.SurfaceType.Smooth
  761. Part39.brickColor = BrickColor.new("Forest green")
  762. SurfaceGui40.Parent = Part39
  763. SurfaceGui40.LightInfluence = 1
  764. SurfaceGui40.ClipsDescendants = true
  765. SurfaceGui40.CanvasSize = Vector2.new(200, 50)
  766. SurfaceGui40.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  767. TextLabel41.Parent = SurfaceGui40
  768. TextLabel41.Size = UDim2.new(0, 200, 0, 50)
  769. TextLabel41.BackgroundColor = BrickColor.new("Institutional white")
  770. TextLabel41.BackgroundColor3 = Color3.new(1, 1, 1)
  771. TextLabel41.Font = Enum.Font.SourceSans
  772. TextLabel41.FontSize = Enum.FontSize.Size14
  773. TextLabel41.Text = "Fuel Remaining 100000"
  774. TextLabel41.TextColor = BrickColor.new("Really black")
  775. TextLabel41.TextColor3 = Color3.new(0, 0, 0)
  776. TextLabel41.TextScaled = true
  777. TextLabel41.TextSize = 14
  778. TextLabel41.TextWrap = true
  779. TextLabel41.TextWrapped = true
  780. WeldConstraint42.Parent = Part39
  781. WeldConstraint42.Part0 = Part39
  782. WeldConstraint42.Part1 = Part17
  783. for i,v in pairs(mas:GetChildren()) do
  784. v.Parent = workspace
  785. pcall(function() v:MakeJoints() end)
  786. end
  787. mas:Destroy()
  788. for i,v in pairs(cors) do
  789. spawn(function()
  790. pcall(v)
  791. end)
  792. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement