Guest User

Untitled

a guest
Dec 3rd, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.25 KB | None | 0 0
  1. _G.mantisReload = function()
  2.  
  3. local plr = game:service'Players'.LocalPlayer
  4. local pg = plr:WaitForChild("PlayerGui")
  5. local mouse = plr:GetMouse()
  6. local char = plr.Character
  7. local root = char:WaitForChild'HumanoidRootPart'
  8. local head = char:WaitForChild'Head'
  9. local tor = char:WaitForChild'Torso'
  10. local la,ra = char["Left Arm"],char["Right Arm"]
  11. local ll,rl = char["Left Leg"],char["Right Leg"]
  12. tor.CFrame = tor.CFrame + Vector3.new(0,5,0)
  13.  
  14.  
  15. local hum = char.Humanoid
  16. local step = game:GetService("RunService").RenderStepped
  17.  
  18.  
  19. pcall(function() workspace["vmodel"..plr.Name]:Destroy() end)
  20. pcall(function() pg.bgui:Destroy() end)
  21. if not script:IsA("ModuleScript") then
  22. pcall(function() script.Parent.vehicularScript:Destroy() end)
  23. script.Name = "vehicularScript"
  24. end
  25.  
  26.  
  27. local sg = Instance.new("ScreenGui",pg)
  28. sg.Name = "bgui"
  29. local p = Instance.new("ImageLabel",sg)
  30. p.Size = UDim2.new(0,6,0,6)
  31. p.Position = UDim2.new(.5,-3,.5,-3)
  32. p.BackgroundColor3 = Color3.new(1,1,1)
  33. p.BackgroundTransparency = .6
  34. local p2 = p:Clone()
  35. p2.Parent = sg
  36. p2.Rotation = 45
  37. local m = Instance.new("Model",workspace)
  38. m.Name = "vmodel"..plr.Name
  39. Instance.new("Humanoid",m).Name = "Shadow"
  40. local hval = Instance.new("NumberValue",m)
  41. hval.Value = 100
  42. hval.Name = "hp"
  43.  
  44.  
  45. function weld(a,b,c,d)
  46. local w = Instance.new("Motor6D",a)
  47. w.Part0,w.Part1,w.C0,w.C1 = a,b,c or CFrame.new(),d or CFrame.new()
  48. return w
  49. end
  50.  
  51.  
  52. do
  53. local function QuaternionFromCFrame(cf)
  54. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  55. local trace = m00 + m11 + m22
  56. if trace > 0 then
  57. local s = math.sqrt(1 + trace)
  58. local recip = 0.5/s
  59. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  60. else
  61. local i = 0
  62. if m11 > m00 then
  63. i = 1
  64. end
  65. if m22 > (i == 0 and m00 or m11) then
  66. i = 2
  67. end
  68. if i == 0 then
  69. local s = math.sqrt(m00-m11-m22+1)
  70. local recip = 0.5/s
  71. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  72. elseif i == 1 then
  73. local s = math.sqrt(m11-m22-m00+1)
  74. local recip = 0.5/s
  75. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  76. elseif i == 2 then
  77. local s = math.sqrt(m22-m00-m11+1)
  78. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  79. end
  80. end
  81. end
  82. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  83. local xs, ys, zs = x + x, y + y, z + z
  84. local wx, wy, wz = w*xs, w*ys, w*zs
  85. local xx = x*xs
  86. local xy = x*ys
  87. local xz = x*zs
  88. local yy = y*ys
  89. local yz = y*zs
  90. local zz = z*zs
  91. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  92. end
  93. local function QuaternionSlerp(a, b, t)
  94. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  95. local startInterp, finishInterp;
  96. if cosTheta >= 0.0001 then
  97. if (1 - cosTheta) > 0.0001 then
  98. local theta = math.acos(cosTheta)
  99. local invSinTheta = 1/math.sin(theta)
  100. startInterp = math.sin((1-t)*theta)*invSinTheta
  101. finishInterp = math.sin(t*theta)*invSinTheta
  102. else
  103. startInterp = 1-t
  104. finishInterp = t
  105. end
  106. else
  107. if (1+cosTheta) > 0.0001 then
  108. local theta = math.acos(-cosTheta)
  109. local invSinTheta = 1/math.sin(theta)
  110. startInterp = math.sin((t-1)*theta)*invSinTheta
  111. finishInterp = math.sin(t*theta)*invSinTheta
  112. else
  113. startInterp = t-1
  114. finishInterp = t
  115. end
  116. end
  117. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  118. end
  119. function clerp(a,b,t)
  120. local qa = {QuaternionFromCFrame(a)}
  121. local qb = {QuaternionFromCFrame(b)}
  122. local ax, ay, az = a.x, a.y, a.z
  123. local bx, by, bz = b.x, b.y, b.z
  124. local _t = 1-t
  125. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  126. end
  127. end
  128.  
  129.  
  130. function lerp(a,b,t)
  131. return a+(b-a)*t
  132. end
  133.  
  134.  
  135. local cancollide = true
  136. local par = m
  137. function Part(Part0,C0,C1,Size,Color,Ref,Trans,Mesh,Material)
  138. local p = Instance.new("Part",par)
  139. p.FormFactor = "Custom"
  140. p.TopSurface,p.BottomSurface,p.BackSurface,p.FrontSurface,p.RightSurface,p.LeftSurface = 10,10,10,10,10,10
  141. p.Size = Size or Vector3.new()
  142. p.Material = "SmoothPlastic"
  143. p.CanCollide = cancollide
  144. p.Locked = true
  145. if p.Size ~= Size or Mesh then
  146. local bm = Mesh or Instance.new("BlockMesh")
  147. bm.Parent = p
  148. bm.Scale = Size/p.Size*bm.Scale
  149. bm.Parent = p
  150. end
  151. p.BrickColor = Color or BrickColor.new(1001)
  152. p.Reflectance = Ref or 0
  153. p.Transparency = Trans or 0
  154. p.Material = Material or p.Material
  155. local w;
  156. if Part0 then
  157. w = weld(Part0,p,C0,C1)
  158. end
  159. return p,w
  160. end
  161.  
  162.  
  163. function Mesh(type,scale,arg1,arg2,arg3,arg4,arg5)
  164. local m = Instance.new(type)
  165. m.Scale = scale or Vector3.new(1,1,1)
  166. if type == "SpecialMesh" then
  167. m.MeshType = arg1
  168. if arg1=="FileMesh" then
  169. m.MeshId = arg2 or m.MeshId
  170. m.TextureId = arg3 or m.TextureId
  171. m.Offset = arg4 or m.Offset
  172. m.VertexColor = arg5 or m.VertexColor
  173. else
  174. m.VertexColor = arg3 or m.VertexColor
  175. m.Offset = arg2 or m.Offset
  176. end
  177. else
  178. m.Offset = arg1 or m.Offset
  179. m.VertexColor = arg2 or m.VertexColor
  180. end
  181. return m
  182. end
  183.  
  184.  
  185. local b = BrickColor.new
  186. local cols = {b(21),b(23),b(141),b(104),b(106),b(24),b(9),b(5)}
  187. function gcol(plr)
  188. if teamColorsEnabled and pcall(function() assert(plr.AccountAge ~= nil) end) and not plr.Neutral then
  189. return plr.TeamColor.Color
  190. else
  191. local v=0;
  192. local n=tostring(plr);
  193. local a=#n;
  194. for i in n:gmatch(".") do
  195. v = v + ((a+(#n%2==1 and -1 or 0))%4 > 1 and -1 or 1)*i:byte()
  196. a = a - 1
  197. end
  198. return cols[(v%8)+1].Color
  199. end
  200. end
  201.  
  202.  
  203.  
  204. local body = BrickColor.new("Really black")
  205. local body2 = BrickColor.new("Institutional white")
  206. local body3 = BrickColor.new("Really black")
  207. local bodyref = .2
  208. local body2ref = .2
  209. local body3ref = .5
  210.  
  211.  
  212. local pipe = BrickColor.new("Dark stone grey")
  213. local pipe2 = body2--BrickColor.new("Institutional white")
  214. local pipe3 = body--BrickColor.new("Really black")
  215. local piperef = .25
  216. local pipe2ref = .2
  217. local pipe3ref = .25
  218.  
  219.  
  220. hum.Sit = true
  221.  
  222.  
  223.  
  224. local fc = Instance.new("Model",m)
  225. par = fc
  226. local tr = Part(tor,CFrame.new(),CFrame.new(),Vector3.new(),BrickColor.new(),0,1)
  227. tr.Name = "Torso"
  228. Part(tr,CFrame.new(),CFrame.new(),Vector3.new(),BrickColor.new(),0,1).Name = "Head"
  229. Part(ra,CFrame.new(),CFrame.new(),Vector3.new(),ra.BrickColor,0,0).Name = "Right Arm"
  230. Part(la,CFrame.new(),CFrame.new(),Vector3.new(),la.BrickColor,0,0).Name = "Left Arm"
  231. Part(rl,CFrame.new(),CFrame.new(),Vector3.new(),rl.BrickColor,0,0).Name = "Right Leg"
  232. Part(ll,CFrame.new(),CFrame.new(),Vector3.new(),ll.BrickColor,0,0).Name = "Left Leg"
  233. local hm = Instance.new("Humanoid",fc)
  234. hm.MaxHealth = math.huge
  235. hm.PlatformStand = true
  236. for i,v in pairs(char:GetChildren()) do
  237. if v:IsA("Clothing") or v:IsA("CharacterMesh") then
  238. v:Clone().Parent = fc
  239. if v:IsA("Shirt") then
  240. pcall(game.Destroy,tr:FindFirstChild("Mesh"))
  241. pcall(game.Destroy,fc["Right Arm"]:FindFirstChild("Mesh"))
  242. pcall(game.Destroy,fc["Left Arm"]:FindFirstChild("Mesh"))
  243. elseif v:IsA("Pants") then
  244. pcall(game.Destroy,tr:FindFirstChild("Mesh"))
  245. pcall(game.Destroy,fc["Right Leg"]:FindFirstChild("Mesh"))
  246. pcall(game.Destroy,fc["Left Leg"]:FindFirstChild("Mesh"))
  247. end
  248. end
  249. end
  250. local h = Instance.new("Hat",fc)
  251. par = h
  252. Part(tr,CFrame.new(),CFrame.new(),Vector3.new(),BrickColor.new(),0,1).Name = "Handle"
  253. par = m
  254.  
  255.  
  256. local main,mainweld = Part(tor,CFrame.new(0,-2.25,0)*CFrame.Angles(0,0,0),CFrame.new(0,0,0),Vector3.new(3,1,2),body,bodyref,0)
  257. Part(main,CFrame.new(0,.5,-.4),CFrame.new(),Vector3.new(2.3,.2,1.3),body2,0,0)
  258. local p = Part(main,CFrame.new(0,-.5,1)*CFrame.Angles(-1.4,0,0)*CFrame.new(0,.5,1.25),CFrame.new(),Vector3.new(2.3,.75,2.5),body,bodyref)
  259. Part(p,CFrame.new(0,.375,0),CFrame.new(),Vector3.new(2.2,.2,1.4),body2,0,0)
  260. p = Part(p,CFrame.new(0,-.375,1.25)*CFrame.Angles(-.15,0,0)*CFrame.new(0,.375,.8),CFrame.new(),Vector3.new(2.3,.75,1.6),body,bodyref)
  261. p.CanCollide = false
  262. Part(p,CFrame.new(0,.375,0),CFrame.new(),Vector3.new(2.2,.2,1.2),body2,0,0).CanCollide = false
  263. local back = Part(main,CFrame.new(0,1.4,1)*CFrame.Angles(.15,math.pi,0),CFrame.new(),Vector3.new(2,2,3),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(3,3.8,6.5),"FileMesh","rbxassetid://9944765"))
  264. Part(main,CFrame.new(0,-.5,1.75)*CFrame.Angles(-1.1,0,0)*CFrame.new(0,.5,1.25),CFrame.new(),Vector3.new(1.75,1.5,2.25),body,bodyref)
  265. Part(main,CFrame.new(0,0,1.25),CFrame.new(),Vector3.new(1.75,1.1,1.5),body,bodyref)
  266. local p = Part(main,CFrame.new(0,.5,-1)*CFrame.Angles(-.2,0,0)*CFrame.new(0,-.375,-.5),CFrame.new(),Vector3.new(2.75,.75,1),body,bodyref)
  267. Part(p,CFrame.new(0,.375,.05),CFrame.new(),Vector3.new(2.3,.2,.95),body2,0,0)
  268. Part(p,CFrame.new(0,.8,-.45),CFrame.new(),Vector3.new(2.3,1,.3),body2,0,0)
  269. Part(p,CFrame.new(0,1.5,-.4)*CFrame.Angles(.2,0,0),CFrame.new(),Vector3.new(2.3,.5,.3),body2,0,0)
  270. local p = Part(main,CFrame.new(0,2.1,-2.9)*CFrame.Angles(.9,0,0),CFrame.new(),Vector3.new(1.5,2.5,1),body,bodyref,0)
  271. local p = Part(p,CFrame.new(0,1.25,.5)*CFrame.Angles(-.9,0,0)*CFrame.new(0,.5,-.7),CFrame.new(),Vector3.new(1.501,1,1.4),body,bodyref,0)
  272. local h = Part(p,CFrame.new(.4,-.2,.7)*CFrame.Angles(0,1.425,0)*CFrame.new(.175,0,.9),CFrame.new(),Vector3.new(.35,.35,1.8),body,bodyref,0)
  273. Part(h,CFrame.new(0,0,.225),CFrame.new(),Vector3.new(.4,.4,1.3),body2,body2ref,0)
  274. Part(h,CFrame.new(0,0,.9),CFrame.new(),Vector3.new(.45,.45,.1),body3,body3ref,0)
  275. Part(h,CFrame.new(0,0,-.45),CFrame.new(),Vector3.new(.425,.425,.1),body3,body3ref,0)
  276. Part(h,CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  277. Part(h,CFrame.new(0,0,.6),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  278. Part(h,CFrame.new(0,0,.45),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  279. Part(h,CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  280. Part(h,CFrame.new(0,0,.15),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  281. Part(h,CFrame.new(0,0,0),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  282. Part(h,CFrame.new(0,0,-.15),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  283. Part(h,CFrame.new(0,0,-.3),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  284. local h = Part(p,CFrame.new(-.4,-.2,.7)*CFrame.Angles(0,-1.425,0)*CFrame.new(-.175,0,.9),CFrame.new(),Vector3.new(.35,.35,1.8),body,bodyref,0)
  285. Part(h,CFrame.new(0,0,.225),CFrame.new(),Vector3.new(.4,.4,1.3),body2,body2ref,0)
  286. Part(h,CFrame.new(0,0,.9),CFrame.new(),Vector3.new(.45,.45,.1),body3,body3ref,0)
  287. Part(h,CFrame.new(0,0,-.45),CFrame.new(),Vector3.new(.425,.425,.1),body3,body3ref,0)
  288. Part(h,CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  289. Part(h,CFrame.new(0,0,.6),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  290. Part(h,CFrame.new(0,0,.45),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  291. Part(h,CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  292. Part(h,CFrame.new(0,0,.15),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  293. Part(h,CFrame.new(0,0,0),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  294. Part(h,CFrame.new(0,0,-.15),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  295. Part(h,CFrame.new(0,0,-.3),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  296.  
  297.  
  298. local e = Part(main,CFrame.new(0,1,-4.6)*CFrame.Angles(-.2,-math.pi/2,0)*CFrame.new(0,-.2,0),CFrame.new(),Vector3.new(5,5,5),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  299. p = Part(e,CFrame.new(-2.25,2.25,0)*CFrame.Angles(0,-math.pi/2,0)*CFrame.Angles(-.05,0,0),CFrame.new(),Vector3.new(2,2,3),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(2,1.75,9.5),"FileMesh","rbxassetid://9944765"))
  300. p = Part(p,CFrame.new(0,-.2,.4)*CFrame.Angles(0,0,0)*CFrame.Angles(-.175,0,0),CFrame.new(),Vector3.new(1,1,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(2.3,2.3,2),"FileMesh","rbxassetid://9944765"))
  301.  
  302.  
  303. p = Part(e,CFrame.new(2,.25,2)*CFrame.Angles(1.35,math.pi/2,0)*CFrame.Angles(0,0,0),CFrame.new(),Vector3.new(2,2,3),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(2.5,2.5,9.5),"FileMesh","rbxassetid://9944765"))
  304. p = Part(p,CFrame.new(0,.2,-4.55)*CFrame.Angles(0,math.pi,-.1),CFrame.new(),Vector3.new(1,1,1),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(1.6,1.1,9),"FileMesh","rbxassetid://9944765"))
  305.  
  306.  
  307. p = Part(e,CFrame.new(2,.25,-2)*CFrame.Angles(-1.35,math.pi/2,0)*CFrame.Angles(0,0,0),CFrame.new(),Vector3.new(2,2,3),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(2.5,2.5,9.5),"FileMesh","rbxassetid://9944765"))
  308. p = Part(p,CFrame.new(0,.2,-4.55)*CFrame.Angles(0,math.pi,-.1),CFrame.new(),Vector3.new(1,1,1),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(1.6,1.1,9),"FileMesh","rbxassetid://9944765"))
  309.  
  310.  
  311.  
  312.  
  313.  
  314. local e2 = Part(e,CFrame.new(-2.5,0,0)*CFrame.Angles(0,math.pi/2,0),CFrame.new(),Vector3.new(5,5,1),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
  315. local et = Part(e2,CFrame.new(0,.05,-.6)*CFrame.Angles(-math.pi/2+.05,0,0),CFrame.new(),Vector3.new(5,5,1),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(3.45,5,3.45),"FileMesh","rbxassetid://16659502"))
  316. local g1 = Part(et,CFrame.new(0,-.5,0)*CFrame.Angles(math.pi/2,0,0),CFrame.new(),Vector3.new(2.5,2.5,2.5),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
  317. local g2 = Part(g1,CFrame.new(0,0,-1)*CFrame.Angles(.15,math.pi/2,0),CFrame.new(),Vector3.new(.75,.6,.6),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  318. local t1 = Part(g2,CFrame.new(.9,.05,0)*CFrame.Angles(0,0,0),CFrame.new(),Vector3.new(1,.4,.4),body3,body3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  319. local t1s = Instance.new("Sound",t1)
  320. t1s.SoundId = "rbxassetid://78498351"
  321. t1s.Volume = 0.5
  322. t1s.Pitch = 1.5
  323.  
  324.  
  325. Part(t1,CFrame.Angles(.75,0,0)*CFrame.new(.3,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  326. Part(t1,CFrame.Angles(.75,0,0)*CFrame.new(0,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  327. Part(t1,CFrame.Angles(.75,0,0)*CFrame.new(-.3,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  328. Part(t1,CFrame.Angles(-.75,0,0)*CFrame.new(.3,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  329. Part(t1,CFrame.Angles(-.75,0,0)*CFrame.new(0,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  330. Part(t1,CFrame.Angles(-.75,0,0)*CFrame.new(-.3,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  331. Part(t1,CFrame.new(.5,0,0),CFrame.new(),Vector3.new(.01,.225,.225),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  332.  
  333.  
  334. local b = Part(main,CFrame.new(0,-.65,-2.9),CFrame.new(),Vector3.new(2.8,2,7.9),body,bodyref,0)
  335. local b2 = Part(b,CFrame.new(0,-.5,-2.5),CFrame.new(),Vector3.new(7,1,2),body,bodyref,0)
  336.  
  337.  
  338. local w = Part(b2,CFrame.new(-3.5,0,0),CFrame.new(),Vector3.new(1.2,1.05,2),body,bodyref,0)
  339. local w = Part(w,CFrame.new(.6,0,-1)*CFrame.Angles(0,.5,0)*CFrame.new(-.6,0,-1),CFrame.new(),Vector3.new(1.2,1.049,2),body,bodyref,0)
  340. Part(w,CFrame.new(.6,0,0),CFrame.new(),Vector3.new(.5,1.1,2.07),body2,body2ref,0)
  341. local w = Part(w,CFrame.new(.6,0,-1)*CFrame.Angles(0,.5,0)*CFrame.new(-.6,0,-.95),CFrame.new(),Vector3.new(1.2,1.05,1.9),body,bodyref,0)
  342. Part(w,CFrame.new(.6,0,0),CFrame.new(),Vector3.new(.5,1.095,2.05),body2,body2ref,0)
  343. local w = Part(w,CFrame.new(.6,0,-.95)*CFrame.Angles(0,.57,0)*CFrame.new(-.65,0,-1.2),CFrame.new(),Vector3.new(1.3,1.049,2.4),body,bodyref,0)
  344. Part(w,CFrame.new(.65,0,.8),CFrame.new(),Vector3.new(.5,1.1,.95),body2,body2ref,0)
  345. local w = Part(w,CFrame.new(-.6,0,-1.2)*CFrame.Angles(0,-1.57,0)*CFrame.new(.8,0,-1.25),CFrame.new(),Vector3.new(1.6,1.05,2.5),body,bodyref,0)
  346. local w = Part(w,CFrame.new(-.8,0,-1.25)*CFrame.Angles(0,-.4,0)*CFrame.new(.7,0,1.25),CFrame.new(),Vector3.new(1.4,1.049,2.5),body,bodyref,0)
  347. local w = Part(w,CFrame.new(.7,0,1.25)*CFrame.Angles(0,-.45,0)*CFrame.new(-.7,0,1),CFrame.new(),Vector3.new(1.4,1.05,2),body,bodyref,0)
  348. local w = Part(w,CFrame.new(-.7,0,1)*CFrame.Angles(0,.6,0)*CFrame.new(.7,0,1),CFrame.new(),Vector3.new(1.4,1.049,2),body,bodyref,0)
  349. local w = Part(w,CFrame.new(-.7,0,1)*CFrame.Angles(0,.55,0)*CFrame.new(.7,0,1),CFrame.new(),Vector3.new(1.4,1.05,2),body,bodyref,0)
  350. local w = Part(w,CFrame.new(-.7,0,1)*CFrame.Angles(0,.5,0)*CFrame.new(.7,0,1),CFrame.new(),Vector3.new(1.4,1.049,2),body,bodyref,0)
  351. local w = Part(w,CFrame.new(-.7,0,1)*CFrame.Angles(0,.45,0)*CFrame.new(.6,0,.5),CFrame.new(),Vector3.new(1.5,1.05,1),body,bodyref,0)
  352. local w = Part(w,CFrame.new(-.75,0,.5)*CFrame.Angles(0,.325,0)*CFrame.new(.5,0,1.3),CFrame.new(),Vector3.new(1.6,1.049,2.6),body,bodyref,0)
  353. local w = Part(w,CFrame.new(-.2,0,1.3)*CFrame.Angles(0,.65,0)*CFrame.new(.5,0,.8),CFrame.new(),Vector3.new(1,1.05,1.6),body,bodyref,0)
  354. local w = Part(w,CFrame.new(-.5,0,.8)*CFrame.Angles(0,.45,0)*CFrame.new(.5,0,1),CFrame.new(),Vector3.new(1,1.05,2),body,bodyref,0)
  355.  
  356.  
  357.  
  358. cancollide = false
  359. Part(b2,CFrame.new(-3.5-3,.125,0)*CFrame.Angles(-math.pi/2,0,0),CFrame.new(),Vector3.new(3,3,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(5,5,6),"FileMesh","rbxassetid://3270017"),"DiamondPlate")
  360. Part(b2,CFrame.new(-3.5-3,-.125,0)*CFrame.Angles(-math.pi/2,0,0),CFrame.new(),Vector3.new(3,3,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(5,5,6),"FileMesh","rbxassetid://3270017"))
  361. cancollide = true
  362.  
  363.  
  364. local propl,proplw = Part(b2,CFrame.new(-6.5,0,0),CFrame.new(),Vector3.new(.4,.75,.4),body2,body2ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
  365. Part(propl,CFrame.new(0,.35,0),CFrame.new(),Vector3.new(.6,.25,.6),body3,body3ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
  366. Part(propl,CFrame.new(0,-.35,0),CFrame.new(),Vector3.new(.5,.15,.5),body3,body3ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
  367. Part(propl,CFrame.Angles(0,0*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
  368. Part(propl,CFrame.Angles(0,1*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
  369. Part(propl,CFrame.Angles(0,2*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
  370. propl.Name = "SoundPlayer1"
  371. local ps2 = Instance.new("Sound",propl)
  372. ps2.SoundId = "rbxassetid://134145308"
  373. ps2.Pitch = 2
  374. ps2.Volume = 1
  375. ps2.Looped = true
  376. ps2:Play()
  377.  
  378.  
  379.  
  380. local p = Part(propl,CFrame.Angles(0,0*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,-1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
  381. Part(p,CFrame.Angles(0,0,1.3)*CFrame.new(-.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
  382. local p = Part(propl,CFrame.Angles(0,1*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,-1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
  383. Part(p,CFrame.Angles(0,0,1.3)*CFrame.new(-.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
  384. local p = Part(propl,CFrame.Angles(0,2*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,-1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
  385. Part(p,CFrame.Angles(0,0,1.3)*CFrame.new(-.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
  386.  
  387.  
  388.  
  389. local w = Part(b2,CFrame.new(3.5,0,0),CFrame.new(),Vector3.new(1.2,1.05,2),body,bodyref,0)
  390. local w = Part(w,CFrame.new(-.6,0,-1)*CFrame.Angles(0,-.5,0)*CFrame.new(.6,0,-1),CFrame.new(),Vector3.new(1.2,1.049,2),body,bodyref,0)
  391. Part(w,CFrame.new(-.6,0,0),CFrame.new(),Vector3.new(.5,1.1,2.07),body2,body2ref,0)
  392. local w = Part(w,CFrame.new(-.6,0,-1)*CFrame.Angles(0,-.5,0)*CFrame.new(.6,0,-.95),CFrame.new(),Vector3.new(1.2,1.05,1.9),body,bodyref,0)
  393. Part(w,CFrame.new(-.6,0,0),CFrame.new(),Vector3.new(.5,1.095,2.05),body2,body2ref,0)
  394. local w = Part(w,CFrame.new(-.6,0,-.95)*CFrame.Angles(0,-.57,0)*CFrame.new(.65,0,-1.2),CFrame.new(),Vector3.new(1.3,1.049,2.4),body,bodyref,0)
  395. Part(w,CFrame.new(-.65,0,.8),CFrame.new(),Vector3.new(.5,1.1,.95),body2,body2ref,0)
  396. local w = Part(w,CFrame.new(.6,0,-1.2)*CFrame.Angles(0,1.57,0)*CFrame.new(-.8,0,-1.25),CFrame.new(),Vector3.new(1.6,1.05,2.5),body,bodyref,0)
  397. local w = Part(w,CFrame.new(.8,0,-1.25)*CFrame.Angles(0,.4,0)*CFrame.new(-.7,0,1.25),CFrame.new(),Vector3.new(1.4,1.049,2.5),body,bodyref,0)
  398. local w = Part(w,CFrame.new(-.7,0,1.25)*CFrame.Angles(0,.45,0)*CFrame.new(.7,0,1),CFrame.new(),Vector3.new(1.4,1.05,2),body,bodyref,0)
  399. local w = Part(w,CFrame.new(.7,0,1)*CFrame.Angles(0,-.6,0)*CFrame.new(-.7,0,1),CFrame.new(),Vector3.new(1.4,1.049,2),body,bodyref,0)
  400. local w = Part(w,CFrame.new(.7,0,1)*CFrame.Angles(0,-.55,0)*CFrame.new(-.7,0,1),CFrame.new(),Vector3.new(1.4,1.05,2),body,bodyref,0)
  401. local w = Part(w,CFrame.new(.7,0,1)*CFrame.Angles(0,-.5,0)*CFrame.new(-.7,0,1),CFrame.new(),Vector3.new(1.4,1.049,2),body,bodyref,0)
  402. local w = Part(w,CFrame.new(.7,0,1)*CFrame.Angles(0,-.45,0)*CFrame.new(-.6,0,.5),CFrame.new(),Vector3.new(1.5,1.05,1),body,bodyref,0)
  403. local w = Part(w,CFrame.new(.75,0,.5)*CFrame.Angles(0,-.325,0)*CFrame.new(-.5,0,1.3),CFrame.new(),Vector3.new(1.6,1.049,2.6),body,bodyref,0)
  404. local w = Part(w,CFrame.new(.2,0,1.3)*CFrame.Angles(0,-.65,0)*CFrame.new(-.5,0,.8),CFrame.new(),Vector3.new(1,1.05,1.6),body,bodyref,0)
  405. local w = Part(w,CFrame.new(.5,0,.8)*CFrame.Angles(0,-.45,0)*CFrame.new(-.5,0,1),CFrame.new(),Vector3.new(1,1.05,2),body,bodyref,0)
  406.  
  407.  
  408.  
  409. cancollide = false
  410. Part(b2,CFrame.new(3.5+3,.125,0)*CFrame.Angles(-math.pi/2,0,0),CFrame.new(),Vector3.new(3,3,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(5,5,6),"FileMesh","rbxassetid://3270017"),"DiamondPlate")
  411. Part(b2,CFrame.new(3.5+3,-.125,0)*CFrame.Angles(-math.pi/2,0,0),CFrame.new(),Vector3.new(3,3,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(5,5,6),"FileMesh","rbxassetid://3270017"))
  412. cancollide = true
  413.  
  414.  
  415. local propr,proprw = Part(b2,CFrame.new(6.5,0,0),CFrame.new(),Vector3.new(.4,.75,.4),body2,body2ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
  416. Part(propr,CFrame.new(0,.35,0),CFrame.new(),Vector3.new(.6,.25,.6),body3,body3ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
  417. Part(propr,CFrame.new(0,-.35,0),CFrame.new(),Vector3.new(.5,.15,.5),body3,body3ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
  418. Part(propr,CFrame.Angles(0,0*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
  419. Part(propr,CFrame.Angles(0,1*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
  420. Part(propr,CFrame.Angles(0,2*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
  421. propr.Name = "SoundPlayer2"
  422. local ps = Instance.new("Sound",propr)
  423. ps.SoundId = "rbxassetid://134145308"
  424. ps.Pitch = 2
  425. ps.Volume = 1
  426. ps.Looped = true
  427. ps:Play()
  428.  
  429.  
  430. local p = Part(propr,CFrame.Angles(0,0*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
  431. Part(p,CFrame.Angles(0,0,-1.3)*CFrame.new(.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
  432. local p = Part(propr,CFrame.Angles(0,1*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
  433. Part(p,CFrame.Angles(0,0,-1.3)*CFrame.new(.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
  434. local p = Part(propr,CFrame.Angles(0,2*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
  435. Part(p,CFrame.Angles(0,0,-1.3)*CFrame.new(.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
  436.  
  437.  
  438.  
  439.  
  440.  
  441. local p1 = Part(main,CFrame.new(-1.85,.35,-1.1)*CFrame.Angles(0,math.pi/2,0),CFrame.new(),Vector3.new(1.25,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  442. Part(p1,CFrame.new(.5,0,.025),CFrame.new(),Vector3.new(1.5,1,1),pipe2,pipe2ref,0,Mesh("SpecialMesh",Vector3.new(.7,.85,.85),"Cylinder"),"DiamondPlate")
  443. Part(p1,CFrame.new(-.625,0,0),CFrame.new(),Vector3.new(.7,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
  444. local p1 = Part(p1,CFrame.new(-.625,0,0)*CFrame.Angles(0,0,-1)*CFrame.new(-.95,0,0),CFrame.new(),Vector3.new(1.9,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  445. Part(p1,CFrame.new(-.95,0,0),CFrame.new(),Vector3.new(.7,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
  446. local p1 = Part(p1,CFrame.new(-.95,0,0)*CFrame.Angles(0,0,1)*CFrame.new(-1.25,0,0),CFrame.new(),Vector3.new(2.5,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  447. local p = Part(p1,CFrame.new(-.3,0,.01),CFrame.new(),Vector3.new(1.5,1,1),pipe2,pipe2ref,0,Mesh("SpecialMesh",Vector3.new(1,.8,.8),"Cylinder"),"DiamondPlate")
  448. Part(p,CFrame.new(.6,0,0),CFrame.new(),Vector3.new(.15,.9,.9),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  449. Part(p,CFrame.new(-.6,0,0),CFrame.new(),Vector3.new(.15,.9,.9),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  450. Part(p,CFrame.new(0,0,.65),CFrame.new(),Vector3.new(1.3,.3,.5),pipe3,pipe3ref,0)
  451. Part(p1,CFrame.new(-1.25,0,0),CFrame.new(),Vector3.new(.15,.65,.65),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  452. local p = Part(p1,CFrame.new(-1.35,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2),CFrame.new(),Vector3.new(1,1,1),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(.5,2,.5),"FileMesh","rbxassetid://16659502"))
  453. local firel = Instance.new("Fire",p)
  454. local lightl = Instance.new("PointLight",p)
  455.  
  456.  
  457. local p1 = Part(main,CFrame.new(1.85,.35,-1.1)*CFrame.Angles(0,math.pi/2,0),CFrame.new(),Vector3.new(1.25,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  458. Part(p1,CFrame.new(.5,0,-.025),CFrame.new(),Vector3.new(1.5,1,1),pipe2,pipe2ref,0,Mesh("SpecialMesh",Vector3.new(.7,.85,.85),"Cylinder"),"DiamondPlate")
  459. Part(p1,CFrame.new(-.625,0,0),CFrame.new(),Vector3.new(.7,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
  460. local p1 = Part(p1,CFrame.new(-.625,0,0)*CFrame.Angles(0,0,-1)*CFrame.new(-.95,0,0),CFrame.new(),Vector3.new(1.9,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  461. Part(p1,CFrame.new(-.95,0,0),CFrame.new(),Vector3.new(.7,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
  462. local p1 = Part(p1,CFrame.new(-.95,0,0)*CFrame.Angles(0,0,1)*CFrame.new(-1.25,0,0),CFrame.new(),Vector3.new(2.5,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  463. local p = Part(p1,CFrame.new(-.3,0,-.01),CFrame.new(),Vector3.new(1.5,1,1),pipe2,pipe2ref,0,Mesh("SpecialMesh",Vector3.new(1,.8,.8),"Cylinder"),"DiamondPlate")
  464. Part(p,CFrame.new(.6,0,0),CFrame.new(),Vector3.new(.15,.9,.9),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  465. Part(p,CFrame.new(-.6,0,0),CFrame.new(),Vector3.new(.15,.9,.9),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  466. Part(p,CFrame.new(0,0,-.65),CFrame.new(),Vector3.new(1.3,.3,.5),pipe3,pipe3ref,0)
  467. Part(p1,CFrame.new(-1.25,0,0),CFrame.new(),Vector3.new(.15,.65,.65),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  468. local p = Part(p1,CFrame.new(-1.35,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2),CFrame.new(),Vector3.new(1,1,1),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(.5,2,.5),"FileMesh","rbxassetid://16659502"))
  469. local firer = Instance.new("Fire",p)
  470. local lightr = Instance.new("PointLight",p)
  471.  
  472.  
  473. cancollide = false
  474. local s = Part(main,CFrame.new(1.05,3,-2.7)*CFrame.Angles(-.5,0,0)*CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.3,.3,1.5),body,bodyref,0)
  475. local s = Part(s,CFrame.new(0,.15,.75)*CFrame.Angles(.55,0,0)*CFrame.new(0,-.15,1.5),CFrame.new(),Vector3.new(.299,.3,3),body,bodyref,0)
  476. local s = Part(s,CFrame.new(0,.15,1.5)*CFrame.Angles(1.05,0,0)*CFrame.new(0,-.15,1),CFrame.new(),Vector3.new(.3,.3,2),body,bodyref,0)
  477. Part(s,CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.4,.4,.4),pipe3,pipe3ref,0)
  478.  
  479.  
  480. local s = Part(main,CFrame.new(-1.05,3,-2.7)*CFrame.Angles(-.5,0,0)*CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.3,.3,1.5),body,bodyref,0)
  481. local s = Part(s,CFrame.new(0,.15,.75)*CFrame.Angles(.55,0,0)*CFrame.new(0,-.15,1.5),CFrame.new(),Vector3.new(.299,.3,3),body,bodyref,0)
  482. local s = Part(s,CFrame.new(0,.15,1.5)*CFrame.Angles(1.05,0,0)*CFrame.new(0,-.15,1),CFrame.new(),Vector3.new(.3,.3,2),body,bodyref,0)
  483. Part(s,CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.4,.4,.4),pipe3,pipe3ref,0)
  484. cancollide = true
  485.  
  486.  
  487. local hp = Instance.new("Part",m)
  488. hp.Anchored = true
  489. hp.TopSurface,hp.BottomSurface =0,0
  490. hp.BrickColor = BrickColor.new("Dark red")
  491. hp.FormFactor = "Custom"
  492. hp.CanCollide = false
  493. hp.Size = Vector3.new(8,1.5,.5)
  494.  
  495.  
  496. local hptop = hp:Clone()
  497. hptop.Parent = m
  498. hptop.BrickColor = BrickColor.new("Dark green")
  499.  
  500.  
  501. firer.Size = .01
  502. firer.Heat = 1000
  503. firel.Size = .01
  504. firel.Heat = 1000
  505.  
  506.  
  507. local hm = Instance.new("Sound",sg)
  508. hm.SoundId = "rbxassetid://131864673"
  509. hm.Pitch = .8
  510.  
  511.  
  512. --[[coroutine.wrap(function()
  513. wait(.2)
  514. while wait(.6) do
  515. ps.Pitch = -ps.Pitch
  516. ps2.Pitch = -ps2.Pitch
  517. end
  518. end)()]]
  519.  
  520.  
  521. local bvel = Instance.new("BodyVelocity",main)
  522. bvel.maxForce = Vector3.new()
  523. bvel.velocity = Vector3.new()
  524. bvel.P = 5000
  525.  
  526.  
  527. local bgyro = Instance.new("BodyGyro",main)
  528. bgyro.maxTorque = Vector3.new()
  529. bgyro.cframe = main.CFrame
  530. bgyro.D = 800
  531.  
  532.  
  533. do
  534. local vecs = {}
  535. for i,v in pairs(Enum.NormalId:GetEnumItems()) do
  536. table.insert(vecs,Vector3.FromNormalId(v))
  537. end
  538. function getSide(h,r)
  539.  
  540. local ob = h.CFrame:pointToObjectSpace(r)
  541. if h:IsA("Part") and h.Shape == Enum.PartType.Ball then
  542. return (r-h.Position).unit
  543. elseif h:IsA("Part") and h.Shape == Enum.PartType.Cylinder then
  544. if isClose(math.abs(ob.y),h.Size.Y/2) then -- top
  545. return h.CFrame:vectorToWorldSpace((ob*Vector3.new(0,1,0)).unit)
  546. else
  547. return h.CFrame:vectorToWorldSpace(CFrame.new(Vector3.new(),ob*Vector3.new(1,0,1)).lookVector)
  548. end
  549. elseif h:IsA("WedgePart") then
  550. vecs = {Vector3.new(0,-1,0),Vector3.new(1,0,0),Vector3.new(-1,0,0),Vector3.new(0,0,1)}
  551. end
  552. for i,v in pairs(vecs) do
  553. if (ob*v/(h.Size/2)*v):isClose(v) then
  554. return h.CFrame:vectorToWorldSpace(v)
  555. end
  556. end
  557. if h:IsA("WedgePart") then
  558. return h.CFrame:vectorToWorldSpace(Vector3.new(0,h.Size.Z,h.Size.Y).unit)
  559. end
  560. end
  561. end
  562.  
  563.  
  564. local function Raycast(ray,ign)
  565. local ign = ign or {m,char}
  566. local h,p = workspace:FindPartOnRayWithIgnoreList(ray,ign)
  567. if h and not h.CanCollide then
  568. table.insert(ign,h)
  569. return Raycast(ray,ign)
  570. else
  571. return h,p
  572. end
  573. end
  574.  
  575.  
  576. local cam = workspace.CurrentCamera
  577. local vehicleOn = true
  578. local lastVehicleOn = false
  579. local acc = 0
  580. local maxSpeed = 180
  581. local spd = 0
  582. local jump = false
  583.  
  584.  
  585. local kd = {}
  586. local function isDown(k)
  587. return kd[k:byte()] and 1 or 0
  588. end
  589. mouse.KeyDown:connect(function(k)
  590. kd[k:byte()] = true
  591. if k == "f" then
  592. vehicleOn = not vehicleOn
  593. elseif k == "r" then
  594. -- hval.Value = 0
  595. end
  596. end)
  597. mouse.KeyUp:connect(function(k)
  598. kd[k:byte()] = false
  599. end)
  600.  
  601.  
  602. mouse.Button1Down:connect(function()
  603. b1d = true
  604. end)
  605. mouse.Button1Up:connect(function()
  606. b1d = false
  607. end)
  608. mouse.Button2Down:connect(function()
  609. b2d = true
  610. end)
  611. mouse.Button2Up:connect(function()
  612. b2d = false
  613. end)
  614.  
  615.  
  616.  
  617. hum.Changed:connect(function()
  618. if hum.Jump then
  619. jump = true
  620. hum.Jump = false
  621. hum.Sit = true
  622. end
  623. end)
  624.  
  625.  
  626. local fire = {}
  627.  
  628.  
  629. mouse.TargetFilter = m
  630.  
  631.  
  632. local t,delta = tick(),0
  633. local smokers = {}
  634.  
  635.  
  636. local guntimer = 0
  637. local scon;
  638. local lastjump = 0
  639. scon = step:connect(function()
  640.  
  641.  
  642. local now = tick()
  643. delta,t = now-t,now
  644.  
  645.  
  646. if hval.Value <= 0 then
  647. game:service'Debris':AddItem(m,5)
  648. coroutine.wrap(function()
  649. bvel:Destroy()
  650. local parts = {}
  651. local function a(b)
  652. for i,v in pairs(b:GetChildren()) do
  653. if v:IsA("BasePart") then
  654. table.insert(parts,v)
  655. end
  656. a(v)
  657. end
  658. end
  659. a(m)
  660. bvel:Destroy()
  661. bgyro:Destroy()
  662. local aTouched = false
  663. for i,v in pairs(parts) do
  664. v.Touched:connect(function()
  665. if aTouched then return end
  666. aTouched = true
  667. local exp = Instance.new("Explosion",workspace)
  668. exp.Position = v.Position
  669. exp.BlastRadius = 0
  670. exp.BlastPressure = .5
  671. m:BreakJoints()
  672. char:BreakJoints()
  673. for i,x in pairs(m:GetChildren()) do
  674. if x:IsA("BasePart") and v ~= x then
  675. local diff = (x.Position-v.Position)
  676. x.Velocity = x.Velocity + diff.unit * diff.magnitude/0.25/v:GetMass()
  677. end
  678. end
  679. script.Disabled = true
  680. end)
  681. end
  682. wait(5)
  683. script.Disabled = true
  684. end)()
  685. scon:disconnect()
  686. return
  687. else
  688. hp.Transparency = hval.Value == 100 and math.min(1,hp.Transparency+.05) or math.max(0,hp.Transparency-.05)
  689. hptop.Transparency = hp.Transparency
  690. hp.CFrame = CFrame.new(head.Position+Vector3.new(0,9,0))*CFrame.Angles(0,(tick()/2)%(math.pi*2),0)
  691. hptop.Size = Vector3.new(hval.Value/100*(hp.Size.X+.05),hp.Size.Y+.1,hp.Size.Z+.1)
  692. hptop.CFrame = hp.CFrame * CFrame.new(-hp.Size.X/2-.025+hptop.Size.X/2,0,0)
  693. end
  694.  
  695.  
  696. if b1d and vehicleOn then
  697. guntimer = guntimer + delta
  698. if guntimer > .1 then
  699. t1s:Play()
  700. t1s.Pitch = 1.5 + (math.random()-.5)*.1
  701. guntimer = guntimer - .1
  702. local b = Instance.new("Part",m)
  703. b.Anchored = true
  704. b.FormFactor = "Custom"
  705. b.TopSurface,b.BottomSurface = 0,0
  706. b.CanCollide = false
  707. b.BrickColor = BrickColor.new("Bright yellow")
  708. b.Size = Vector3.new(.2,.2,.8)
  709. local sm = Instance.new("SpecialMesh",b)
  710. sm.MeshId = "rbxassetid://2697549"
  711. sm.Scale = Vector3.new(.5,.5,.25)
  712. local orig = t1.CFrame*CFrame.new(.5,0,0)*CFrame.Angles(0,-math.pi/2,0)
  713. local vel = (mouse.Hit.p-orig.p).unit*250 + main.Velocity*delta
  714. b.CFrame = orig
  715. coroutine.wrap(function()
  716. local t = tick()
  717. while true do
  718. step:wait()
  719. local n = tick()
  720. local d,t = n-t,n
  721. local ocf = b.CFrame
  722. local h,r = Raycast(Ray.new(ocf.p,vel*d),{char,m})
  723. if h then
  724. b:Destroy()
  725. local hit = false
  726. local hp = h.Parent:FindFirstChild("hp") or h.Parent.Parent:FindFirstChild("hp")
  727. if hp and hp:IsA("NumberValue") then
  728. hp.Value = hp.Value - 3
  729. hit = "rbxassetid://142082170"
  730. end
  731. local hp = h.Parent:FindFirstChild("Humanoid") or h.Parent.Parent:FindFirstChild("Humanoid")
  732. if hp and hp:IsA("Humanoid") then
  733. hp.Health = hp.Health - 3
  734. hit = "rbxassetid://133758570"
  735. end
  736. if hit then
  737. hm:Play()
  738. local sp = Instance.new("Part",m)
  739. sp.FormFactor = "Custom"
  740. sp.Size = Vector3.new()
  741. sp.Transparency = 1
  742. sp.Anchored = true
  743. sp.CanCollide = false
  744. sp.CFrame = CFrame.new(r)
  745. local s = Instance.new("Sound",sp)
  746. s.SoundId = hit
  747. s.Volume = 1
  748. s.Pitch = 1.1+math.random()*.2
  749. wait()
  750. s:Play()
  751. game:service'Debris':AddItem(sp,5)
  752. end
  753. break
  754. end
  755. b.CFrame = CFrame.new(ocf.p+vel*d,ocf.p+vel*d*2)
  756. sm.Scale = Vector3.new(.5-vel.magnitude*d/100,.5-vel.magnitude*d/100,vel.magnitude*d/3)
  757. vel = vel - Vector3.new(0,4*d,0)
  758. if ocf.Y < -100 then
  759. b:Destroy()
  760. break
  761. end
  762. end
  763. end)()
  764. end
  765. else
  766. guntimer = 0
  767. end
  768.  
  769.  
  770. local mcfr = main.CFrame
  771. local mpos = mcfr.p
  772.  
  773.  
  774. local raydir = Vector3.new(0,-100,0)--mcfr:vectorToWorldSpace(Vector3.new(0,-100,0))
  775.  
  776.  
  777. local dhit,dray = Raycast(Ray.new(mpos,raydir),{char,m})
  778. local diff = dray-mpos
  779.  
  780.  
  781. local rays = {
  782. tip = Ray.new((mcfr*CFrame.new(0,0,-11.5)).p,raydir),
  783. Ray.new((mcfr*CFrame.new(7,0,-11)).p,raydir),
  784. Ray.new((mcfr*CFrame.new(-7,0,-11)).p,raydir),
  785. Ray.new((mcfr*CFrame.new(1,0,-10.5)).p,raydir),
  786. Ray.new((mcfr*CFrame.new(-1,0,-10.5)).p,raydir),
  787. Ray.new((mcfr*CFrame.new(2.5,0,-6)).p,raydir),
  788. Ray.new((mcfr*CFrame.new(-2.5,0,-6)).p,raydir),
  789. rtip = Ray.new((mcfr*CFrame.new(10.5,0,-3)).p,raydir),
  790. ltip = Ray.new((mcfr*CFrame.new(-10.5,0,-3)).p,raydir),
  791. rprop = Ray.new((mcfr*CFrame.new(6.5,0,-3)).p,raydir),
  792. lprop = Ray.new((mcfr*CFrame.new(-6.5,0,-3)).p,raydir),
  793. Ray.new((mcfr*CFrame.new(2.5,0,-3)).p,raydir),
  794. Ray.new((mcfr*CFrame.new(-2.5,0,-3)).p,raydir),
  795. Ray.new((mcfr*CFrame.new(6.5,0,-1)).p,raydir),
  796. Ray.new((mcfr*CFrame.new(-6.5,0,-1)).p,raydir),
  797. Ray.new((mcfr*CFrame.new(2.5,0,4)).p,raydir),
  798. Ray.new((mcfr*CFrame.new(-2.5,0,4)).p,raydir),
  799. Ray.new((mcfr*CFrame.new(2.5,0,2)).p,raydir),
  800. Ray.new((mcfr*CFrame.new(-2.5,0,2)).p,raydir),
  801. }
  802. for i,v in pairs(rays) do
  803. local h,r = Raycast(v,{char,m})
  804. local df = r-v.Origin
  805. if df.Y > diff.Y then
  806. diff = df
  807. end
  808. rays[i] = {r=r,d=df,h=h}
  809. end
  810.  
  811. local moving = false
  812. local movdir = Vector3.new()
  813. local hoverHeight = 7 + math.sin(now)/2
  814. local vel = Vector3.new(0,(hoverHeight+diff.Y)*3,0)
  815. if isDown'w'+isDown's'+isDown'd'+isDown'a' > 0 then
  816. moving = true
  817. movdir = Vector3.new(isDown'd'-isDown'a',0,isDown's'-isDown'w')
  818. if movdir.magnitude < .001 then
  819. moving = false
  820. else
  821. movdir = movdir.unit
  822. end
  823. end
  824. bgyro.maxTorque = Vector3.new(1,1,1)*1e5
  825.  
  826.  
  827. if vehicleOn then
  828. if not lastVehicleOn or not lastDown then
  829. lastDown = tick()
  830. end
  831. if not lastVehicleOn then
  832. local ray = rays.rprop
  833. for a,ray in pairs({rays.rprop,rays.lprop}) do
  834. if ray.h and -ray.d.Y < 5 then
  835. local x = a==1 and 1 or -1
  836. local am = 0
  837. for i=math.pi/4*x,x*(-math.pi-math.pi/4),x*-math.pi/8 do
  838. local p = Instance.new("Part",m)
  839. p.Anchored = true
  840. p.Transparency = 1
  841. p.CanCollide = false
  842. p.FormFactor = "Custom"
  843. p.Size = Vector3.new()
  844. local smoke = Instance.new("Smoke",p)
  845. smoke.Color = Color3.new(.5,.5,.5)--Color3.new(lerp(.5,ray.h.Color.r,.8),lerp(.5,ray.h.Color.g,.8),lerp(.5,ray.h.Color.b,.8))
  846. smoke.Size = .1
  847. smoke.Opacity = .04
  848. smoke.RiseVelocity = 10
  849. p.CFrame = CFrame.new(ray.r,ray.r+mcfr.lookVector*Vector3.new(1,0,1))*CFrame.Angles(math.pi/2,0,i+.2*x)*CFrame.new(0,2.5,0)
  850. local add = am/13
  851. if add > .5 then
  852. add = 1-add
  853. end
  854. am = am + 1
  855. game.Debris:AddItem(p,.75+add*14)
  856. end
  857. end
  858. end
  859. end
  860. local ovel = main.CFrame:vectorToObjectSpace(main.Velocity)
  861.  
  862. local xrot = math.max(-1,math.min(1,ovel.Z/maxSpeed*2))*.25
  863. local zrot = math.max(-1,math.min(1,-ovel.X/maxSpeed*2))*.25
  864. local xadd,zadd = 0,0
  865. if rays.tip.h and dhit and (-rays.tip.d.Y < hoverHeight+10 or -diff.Y < hoverHeight+10) then
  866. local ydiff = rays.tip.r.Y-dray.Y
  867. --print(ydiff)
  868. xadd = math.max(-.75,math.min(.75,math.asin(ydiff/11.5)))
  869. xrot = xrot*math.cos(xadd) + xadd
  870. --print("x",movdir,xadd)
  871. movdir = CFrame.Angles(xadd,0,0)*movdir
  872. --print("x2",movdir)
  873. end
  874.  
  875.  
  876. if rays.lprop.h and rays.rprop.h and rays.lprop.h == rays.rprop.h and (-rays.lprop.d.Y < hoverHeight+10 or -rays.rprop.d.Y < hoverHeight+10) then
  877. local xdiff = rays.rprop.r.Y-rays.lprop.r.Y
  878. zadd = math.max(-.75,math.min(.75,math.asin(xdiff/22)))
  879. zrot = zrot*math.cos(zadd) + zadd
  880. --print("z",movdir,zadd)
  881. movdir = CFrame.Angles(0,0,zadd)*movdir
  882. --print("z2",movdir)
  883. end
  884. --[[
  885. if movdir.magnitude > .001 then
  886. local p = Instance.new("Part",m)
  887. p.Anchored = true
  888. p.FormFactor = "Custom"
  889. p.CanCollide = false
  890. p.FrontSurface = "Hinge"
  891. p.Size = Vector3.new(1,1,3)
  892. p.CFrame = CFrame.new(head.Position+Vector3.new(0,5,0),head.Position+Vector3.new(0,5,0)+CFrame.new(cam.CoordinateFrame.p,cam.CoordinateFrame.p+cam.CoordinateFrame.lookVector*Vector3.new(1,0,1)):vectorToWorldSpace(movdir))
  893. game.Debris:AddItem(p,.1)
  894. end
  895. ]]
  896. local windup = math.min(1,(tick()-lastDown))
  897.  
  898.  
  899. if windup < .25 then
  900. moving = false
  901. elseif windup < 1 then
  902. bgyro.maxTorque = Vector3.new(1,1,1)*50000
  903. end
  904. local ldir = windup >= .25 and cam.CoordinateFrame.lookVector*Vector3.new(1,0,1) or main.CFrame.lookVector*Vector3.new(1,0,1)
  905. bgyro.cframe = CFrame.new(main.CFrame.p,main.CFrame.p+ldir)*CFrame.Angles(xrot,0,zrot)
  906. proplw.C1 = proplw.C1 * CFrame.Angles(0,windup*-(.8+main.Velocity.magnitude/maxSpeed*.75)*(moving and 1.5 or 1)+math.random()*.05,0)
  907. proprw.C1 = proprw.C1 * CFrame.Angles(0,windup*(.8+main.Velocity.magnitude/maxSpeed*.75)*(moving and 1.5 or 1)+math.random()*.05,0)
  908.  
  909.  
  910. local odir = main.CFrame:vectorToObjectSpace(bgyro.cframe.lookVector)
  911. firer.Enabled = ovel.Z < -1 or odir.X < -.1
  912. firel.Enabled = ovel.Z < -1 or odir.X > .1
  913. bvel.maxForce = Vector3.new(70000,-diff.Y < hoverHeight+1+math.max(0,-main.Velocity.Y*delta*40) and 400000 or 40000,70000)
  914.  
  915.  
  916. windup = windup + main.Velocity.magnitude/maxSpeed*.35*(moving and 1.5 or 1)
  917. ps.Volume = windup*.07
  918. ps2.Volume = ps.Volume
  919. ps.Pitch = ps.Pitch
  920. ps2.Pitch = ps2.Pitch
  921. else
  922. if lastVehicleOn or not lastUp then
  923. lastUp = tick()
  924. end
  925. firel.Enabled,firer.Enabled = false,false
  926. bvel.maxForce = Vector3.new(40000,-diff.Y > 1 and 1e5 or 0,40000)
  927. vel = Vector3.new(0,-100-((tick()-lastUp)*9.81*10)^2,0)
  928. bgyro.cframe = clerp(bgyro.cframe,CFrame.new(mpos,mpos+mcfr.lookVector*Vector3.new(1,0,1)),.2)
  929.  
  930.  
  931. local windup = 1-math.min(1,(tick()-lastUp)/5)
  932. vel = Vector3.new(0,(1-windup)*-25,0)
  933. proplw.C1 = proplw.C1 * CFrame.Angles(0,-.8*windup,0)
  934. proprw.C1 = proprw.C1 * CFrame.Angles(0,.8*windup,0)
  935. ps.Volume = windup*.07
  936. ps2.Volume = ps.Volume
  937. ps.Pitch = ps.Pitch
  938. ps2.Pitch = ps2.Pitch
  939.  
  940.  
  941. moving = false
  942.  
  943.  
  944. if tick()-lastUp > 2 then
  945. hval.Value = math.min(100,hval.Value + .1)
  946. end
  947. end
  948.  
  949.  
  950. if moving then
  951. local od = movdir
  952. movdir = CFrame.new(cam.CoordinateFrame.p,cam.CoordinateFrame.p+cam.CoordinateFrame.lookVector*Vector3.new(1,0,1)):vectorToWorldSpace(movdir*Vector3.new(1,.25,1))
  953.  
  954. if movdir.magnitude < 0.001 or tostring(movdir):lower():find("nan") then
  955. moving = false
  956. --print(od)
  957. else
  958. movdir = movdir.unit
  959. acc = acc + delta*70
  960. spd = math.min(maxSpeed,spd + acc)
  961. vel = vel + movdir*spd
  962. end
  963. end
  964. if not moving then
  965. spd = 0
  966. acc = 0
  967. end
  968.  
  969.  
  970. bvel.velocity = vel
  971. if jump then
  972. if vehicleOn and -diff.Y < hoverHeight + 1 and tick()-lastjump > 2 then
  973. tor.Velocity = tor.Velocity + Vector3.new(0,110,0)
  974. lastjump = tick()
  975. end
  976. jump = false
  977. end
  978. lightr.Range = 5+math.sin(tick()*50)
  979. lightl.Range = 5+math.cos(tick()*50)
  980.  
  981.  
  982. lightr.Color = firer.Color
  983. lightl.Color = firel.Color
  984.  
  985.  
  986. lightr.Enabled = firer.Enabled
  987. lightl.Enabled = firel.Enabled
  988. lastVehicleOn = vehicleOn
  989. end)
  990.  
  991.  
  992. char.AncestryChanged:connect(function()
  993. m:Destroy()
  994. scon:disconnect()
  995. end)
  996.  
  997.  
  998. end
  999. return _G.mantisReload()
Add Comment
Please, Sign In to add comment