Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.68 KB | None | 0 0
  1. (col) p.Transparency=t p.Size=s p.CFrame=cf or cn() end)
  2. local m=Instance.new("SpecialMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) m.MeshType="Wedge" end)
  3. return p
  4. end;
  5. Gui=function(ins, par, bc, bg, tc, fs, text, t, s, pos)
  6. local g=Instance.new(ins, par) pcall(function() g.BorderColor=BrickColor.new(bc) g.BackgroundColor=BrickColor.new(bg) g.TextColor=BrickColor.new(tc) g.FontSize=fs g.Font="ArialBold" g.Text=text g.BackgroundTransparency=t g.Size=s g.Position=pos end)
  7. return g
  8. end;
  9. Weld=function(par, p1, cf)
  10. local w=Instance.new("Weld", par) pcall(function() w.Part0=w.Parent or par w.Part1=p1 w.C1=cf or cn() end)
  11. return w
  12. end;
  13. Mesh=function(ins, par, s, t, id, tid, of)
  14. pcall(function() for i, v in pairs(par:children()) do if v:isA("BlockMesh") or v:isA("CylinderMesh") or v:isA("SpecialMesh") then v:remove() end end end)
  15. local m=Instance.new(ins, par) pcall(function() m.Scale=s or Vector3.new(1, 1, 1) m.Offset=of or Vector3.new() m.MeshId=id or "" m.TextureId=tid or "" m.MeshType=t end)
  16. return m
  17. end;
  18. Sound=function(parent, id, pitch, volume)
  19. local s=Instance.new("Sound", parent) pcall(function() s.SoundId=id s.Volume=volume or 1 s.Pitch=pitch or 1 end)
  20. return s
  21. end;
  22. }
  23. local Sounds={
  24. Slash="rbxasset://sounds//swordslash.wav";
  25. Hit="http://www.roblox.com/asset/?id=11113679 ";
  26. Equip="rbxasset://sounds/unsheath.wav";
  27. Charge="http://www.roblox.com/asset/?id=2101137";
  28. ElectricShortage="http://roblox.com/asset/?id=10209481";
  29. ElectricSound="http://www.roblox.com/asset/?id=10756118";
  30. Electric="http://www.roblox.com/asset/?id=2800815";
  31. Abscond="http://www.roblox.com/asset/?id=2767090";
  32. Cannon="http://www.roblox.com/asset/?id=2920959";
  33. Bash="http://www.roblox.com/asset/?id=25270310";
  34. Suirize="http://roblox.com/asset/?id=10209605";
  35. Heli="http://www.roblox.com/asset/?id=27112125";
  36. }
  37. local Decals={
  38. }
  39. local Meshes={
  40. Charge="http://www.roblox.com/asset/?id=20329976";
  41. Noob="http://www.roblox.com/asset/?id=29515710";
  42. Ring="http://www.roblox.com/asset/?id=3270017";
  43. Crown="http://www.roblox.com/asset/?id=1323306";
  44. Spring="http://www.roblox.com/Asset/?id=9753878";
  45. Sword="rbxasset://fonts/sword.mesh";
  46. Shield="http://www.roblox.com/asset/?id=50798797";
  47. Diamond="http://www.roblox.com/Asset/?id=9756362";
  48. Shuriken="http://www.roblox.com/asset/?id=11112101";
  49. ShurikenT="http://www.roblox.com/asset/?id=11112112"
  50. }
  51. function createParts()
  52. --#GuiDescendants
  53. obj.AL=add.Gui("TextLabel", gui, "Really black", "Really black", "White", "Size18", "Speed(speed)", 0, UDim2.new(0, 150, 0, 50), UDim2.new(0, 0, 0, 150))
  54. obj.AL2=add.Gui("TextLabel", obj.AL, "Really black", "Really black", "White", "Size18", "HeavyBreak(V)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  55. obj.AL3=add.Gui("TextLabel", obj.AL2, "Really black", "Really black", "White", "Size18", "Rocket(R)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  56. obj.AL4=add.Gui("TextLabel", obj.AL3, "Really black", "Really black", "White", "Size18", "MachineGun(F)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  57. obj.AL5=add.Gui("TextLabel", obj.AL4, "Really black", "Really black", "White", "Size18", "Boost(B)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  58. obj.AL6=add.Gui("TextLabel", obj.AL5, "Really black", "Really black", "White", "Size18", "Blade(C)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  59. obj.AL7=add.Gui("TextLabel", obj.AL6, "Really black", "Really black", "White", "Size18", "Hover(X)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  60. obj.AL8=add.Gui("TextLabel", obj.AL7, "Really black", "Really black", "White", "Size18", "SelfDestruct(G)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  61. -- obj.AL9=add.Gui("TextLabel", obj.AL8, "Really black", "Really black", "White", "Size18", "MaximumArmor(Z)", 0, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  62. --#CarDesgin
  63. for i, v in pairs(model2:children()) do
  64. if i~=1 then return end
  65. end
  66. obj.Frame=add.Part(model2, false, true, "Really black", 0, Vector3.new(5, 1, 10))
  67. obj.sup=add.Part(model2, false, true, "Really black", 0, Vector3.new(1, 1, 5))
  68. obj.supW=add.Weld(obj.sup, obj.Frame, cn(-3, 0, -5))
  69. obj.Wheels=add.Cylinder(model2, false, true, "White", 0, Vector3.new(3, 1.5, 3))
  70. obj.WheelsW=add.Weld(obj.Wheels, obj.sup, cn(1.25, 0, -3)*ca(0, 0, mr(90)))
  71. obj.w=add.Wedge(model2, false, true, "Really black", 0, Vector3.new(1, 1, 1))
  72. obj.wW=add.Weld(obj.w, obj.sup, cn(0, 0, -3)*ca(0, 0, mr(90)))
  73. obj.w=add.Wedge(model2, false, true, "Really black", 0, Vector3.new(1, 1, 5))
  74. obj.wW=add.Weld(obj.w, obj.sup, cn(0, 1, 0))
  75. obj.w=add.Wedge(model2, false, true, "Really black", 0, Vector3.new(1, 1, 5))
  76. obj.wW=add.Weld(obj.w, obj.sup, cn(0, -1, 0)*ca(0, 0, pi))
  77. obj.w=add.Wedge(model2, false, true, "Really black", 0, Vector3.new(.5, 1, 2))
  78. obj.wW=add.Weld(obj.w, obj.Frame, cn(-2, 0, -6)*ca(0, 0, -mr(90)))
  79. obj.sup=add.Part(model2, false, true, "Really black", 0, Vector3.new(1, 1, 5))
  80. obj.supW=add.Weld(obj.sup, obj.Frame, cn(3, 0, -5))
  81. obj.Wheels2=add.Cylinder(model2, false, true, "White", 0, Vector3.new(3, 1.5, 3))
  82. obj.Wheels2W=add.Weld(obj.Wheels2, obj.sup, cn(-1.25, 0, -3)*ca(0, 0, mr(90)))
  83. obj.w=add.Wedge(model2, false, true, "Really black", 0, Vector3.new(1, 1, 1))
  84. obj.wW=add.Weld(obj.w, obj.sup, cn(0, 0, -3)*ca(0, 0, mr(-90)))
  85. obj.w=add.Wedge(model2, false, true, "Really black",0, Vector3.new(1, 1, 5))
  86. obj.wW=add.Weld(obj.w, obj.sup, cn(0, 1, 0))
  87. obj.w=add.Wedge(model2, false, true, "Really black", 0, Vector3.new(1, 1, 5))
  88. obj.wW=add.Weld(obj.w, obj.sup, cn(0, -1, 0)*ca(0, 0, pi))
  89. obj.w=add.Wedge(model2, false, true, "Really black", 0, Vector3.new(.5, 1, 2))
  90. obj.wW=add.Weld(obj.w, obj.Frame, cn(2, 0, -6)*ca(0, 0, mr(90)))
  91. obj.Wheel3=add.Cylinder(model2, false, true, "White", 0, Vector3.new(4.5, 2, 4.5))
  92. obj.Wheel3W=add.Weld(obj.Wheel3, obj.Frame, cn(3.5, .5, 5)*ca(0, 0, mr(90)))
  93. obj.Wheel4=add.Cylinder(model2, false, true, "White", 0, Vector3.new(4.5, 2, 4.5))
  94. obj.Wheel4W=add.Weld(obj.Wheel4, obj.Frame, cn(-3.5, .5, 5)*ca(0, 0, mr(-90)))
  95. obj.sR=add.Cylinder(model2, false, true, "Really black", 0, Vector3.new(3.5, 6, 3.5))
  96. obj.sRW=add.Weld(obj.sR, obj.Frame, cn(2.6, 0, 0)*ca(mr(90), 0, 0))
  97. obj.sL=add.Cylinder(model2, false, true, "Really black", 0, Vector3.new(3.5, 6, 3.5))
  98. obj.sLW=add.Weld(obj.sL, obj.Frame, cn(-2.6, 0, 0)*ca(mr(90), 0, 0))
  99. obj.VC=Instance.new("VehicleSeat", model2) obj.VC.HeadsUpDisplay=false obj.VC.CanCollide=false
  100. obj.VC.Size=Vector3.new(2, 1, 2)
  101. obj.VC.BottomSurface="Weld"
  102. obj.VCW=add.Weld(obj.VC, obj.Frame, cn(0, .2, 0))
  103. obj.w=add.Wedge(model2, false, true, "Really black", 0, Vector3.new(1, 1, 5))
  104. obj.wW=add.Weld(obj.w, obj.Frame, cn(0, 0, -5.5)*ca(0, pi/2, -pi/2))
  105. obj.w=add.Wedge(model2, false, true, "Really black",0, Vector3.new(1, 1, 5))
  106. obj.wW=add.Weld(obj.w, obj.Frame, cn(0, 0, -5.5)*ca(0, -pi/2, pi/2))
  107. obj.w=add.Wedge(model2, false, true, "Really black", 0, Vector3.new(1.5, 1, 3))
  108. obj.wW=add.Weld(obj.w, obj.Frame, cn(0, 0, -7)*ca(0, 0, 0))
  109. obj.p=add.Part(model2, false, true, "Really black", 0, Vector3.new(4, .5, 1))
  110. obj.pW=add.Weld(obj.p, obj.Frame, cn(0, .5, -5))
  111. obj.w=add.Wedge(model2, false, true, "Really black", 0, Vector3.new(.5, 3, 4))
  112. obj.wW=add.Weld(obj.w, obj.Frame, cn(.5, .6, -4.5)*ca(0, pi/2, -pi/2))
  113. obj.w=add.Wedge(model2, false, false, "Really black", .5, Vector3.new(1, 2, 1.5))
  114. obj.wW=add.Weld(obj.w, obj.Frame, cn(2, 1.25, -3.25)*ca(0, 0, -pi/2))
  115. obj.w=add.Wedge(model2, false, true, "Really black", 0, Vector3.new(.5, 3, 4))
  116. obj.wW=add.Weld(obj.w, obj.Frame, cn(-.5, .6, -4.5)*ca(0, -pi/2, pi/2))
  117. obj.w=add.Wedge(model2, false, false, "Really black", .5, Vector3.new(1, 2, 1.5))
  118. obj.wW=add.Weld(obj.w, obj.Frame, cn(-2, 1.25, -3.25)*ca(0, 0, pi/2))
  119. obj.w=add.Wedge(model2, false, true, "Really black", 0, Vector3.new(2, 1, 1.5))
  120. obj.wW=add.Weld(obj.w, obj.Frame, cn(0, 1.25, -4.75)*ca(0, 0, 0))
  121. obj.ps=add.Part(model2, false, false, "Really black", 0, Vector3.new(4, 1, 5))
  122. obj.psW=add.Weld(obj.ps, obj.Frame, cn(0, 2, 0))
  123. obj.w=add.Wedge(model2, false, false, "Really black", 0, Vector3.new(2, 1, 1.5))
  124. obj.wW=add.Weld(obj.w, obj.ps, cn(0, 0, -3.25)*ca(0, 0, 0))
  125. obj.w=add.Wedge(model2, false, false, "Really black", 0, Vector3.new(5, 1, 2))
  126. obj.wW=add.Weld(obj.w, obj.ps, cn(3, 0, 0)*ca(0, -pi/2, 0))
  127. obj.w=add.Wedge(model2, false, true, "Really black", 0, Vector3.new(5, 2, 1))
  128. obj.wW=add.Weld(obj.w, obj.ps, cn(3.5, -1.5, 0)*ca(pi, -pi/2, 0))
  129. obj.w=add.Wedge(model2, false, false, "Really black", 0, Vector3.new(5, 1, 2))
  130. obj.wW=add.Weld(obj.w, obj.ps, cn(-3, 0, 0)*ca(0, pi/2, 0))
  131. obj.w=add.Wedge(model2, false, true, "Really black", 0, Vector3.new(5, 2, 1))
  132. obj.wW=add.Weld(obj.w, obj.ps, cn(3.5, -1.5, 0)*ca(pi, -pi/2, 0))
  133. obj.csupt=add.Cylinder(model2, false, true, "Really black", 0, Vector3.new(1, 2.5, 1))
  134. obj.csuptW=add.Weld(obj.csupt, obj.Frame, cn(-3, 2, 2.5)*ca(mr(15), 0, 0))
  135. obj.csupt=add.Cylinder(model2, false, true, "Really black", 0, Vector3.new(1, 2.5, 1))
  136. obj.csuptW=add.Weld(obj.csupt, obj.Frame, cn(-2, 2, 2.5)*ca(mr(15), 0, 0))
  137. obj.p=add.Part(model2, false, false, "Really black", 0, Vector3.new(3.5, .2, 3))
  138. obj.pW=add.Weld(obj.p, obj.Frame, cn(-2.5, 3, 4))
  139. obj.csupt=add.Cylinder(model2, false, true, "Really black", 0, Vector3.new(1, 2.5, 1))
  140. obj.csuptW=add.Weld(obj.csupt, obj.Frame, cn(3, 2, 2.5)*ca(mr(15), 0, 0))
  141. obj.csupt=add.Cylinder(model2, false, true, "Really black", 0, Vector3.new(1, 2.5, 1))
  142. obj.csuptW=add.Weld(obj.csupt, obj.Frame, cn(2, 2, 2.5)*ca(mr(15), 0, 0))
  143. obj.p=add.Part(model2, false, false, "Really black", 0, Vector3.new(3.5, .2, 3))
  144. obj.pW=add.Weld(obj.p, obj.Frame, cn(2.5, 3, 4))
  145. obj.w=add.Wedge(model2, false, false, "Really black", 0, Vector3.new(5, 2, 2.5))
  146. obj.wW=add.Weld(obj.w, obj.ps, cn(0, -.5, 3.75)*ca(0, pi, 0))
  147. obj.c=add.Cylinder(model2, false, false, "Really black", 0, Vector3.new(3.5, 2, 3.5))
  148. obj.cW=add.Weld(obj.c, obj.Frame, cn(0, 1, 5)*ca(mr(90), 0, 0))
  149. obj.TS=add.Cylinder(model2, false, true, "Really black", 0, Vector3.new(3, 2, 3))
  150. obj.TSW=add.Weld(obj.TS, obj.c, cn(0, 1, 0)*ca(0, 0, 0))
  151. obj.TSM=add.Mesh("SpecialMesh", obj.TS, Vector3.new(.75, .1, .75), nil, "http://www.roblox.com/Asset/?id=10207677")
  152. obj.top=add.Part(model2, false, false, "Really black", 0, Vector3.new(4, 1.5, 4))
  153. obj.topW=add.Weld(obj.top, obj.ps, cn(0, .5, 0))
  154. obj.topM=add.Mesh("SpecialMesh", obj.top, Vector3.new(1, 1, 1), "Sphere")
  155. --Machine Gun
  156. obj.mr=add.Part(model2, false, false, "Really black", 0, Vector3.new(1, 1, 2))
  157. obj.mrw=add.Weld(obj.mr, obj.Frame, cn(0, 0, 0))
  158. obj.br=add.Part(model2, false, false, "Really black", 0, Vector3.new(1.5, 1.5, 2.5))
  159. obj.brw=add.Weld(obj.br, obj.mr, cn(1, 0, 0))
  160. obj.gr=add.Part(model2, false, false, "Really black", 0, Vector3.new(.5, .5, 1))
  161. obj.grw=add.Weld(obj.gr, obj.br, cn(0, 0, -1))
  162. obj.ml=add.Part(model2, false, false, "Really black", 0, Vector3.new(1, 1, 2))
  163. obj.mlw=add.Weld(obj.ml, obj.Frame, cn(0, 0, 0))
  164. obj.bl=add.Part(model2, false, false, "Really black", 0, Vector3.new(1.5, 1.5, 2.5))
  165. obj.blw=add.Weld(obj.bl, obj.ml, cn(-1, 0, 0))
  166. obj.gl=add.Part(model2, false, false, "Really black", 0, Vector3.new(.5, .5, 1))
  167. obj.glw=add.Weld(obj.gl, obj.bl, cn(0, 0, -1))
  168. --Rocket
  169. obj.rck=add.Cylinder(model2, false, false, "Really black", 0, Vector3.new(1, 4, 1))
  170. obj.rckw=add.Weld(obj.rck, obj.Frame, cn(0, 0, 0)*ca(-pi/2, 0, 0))
  171. obj.rock=add.Part(model2, false, false, "Really black", 1, Vector3.new(1, 1, 1))
  172. obj.rockw=add.Weld(obj.rock, obj.rck, cn(0, 1.5, 0)*ca(pi/2, 0, 0))
  173. --Blade
  174. obj.p1=add.Part(model2, false, false, "White", 0, Vector3.new(3, .2, 1))
  175. obj.p1w=add.Weld(obj.p1, obj.Frame, cn(0, 0, 0))
  176. obj.br=add.Wedge(model2,false, false, "White", 0, Vector3.new(.2, 2, 1))
  177. obj.brW=add.Weld(obj.br, obj.p1, cn(2.5, 0, 0)*ca(0, 0, -pi/2))
  178.  
  179. obj.p2=add.Part(model2, false, false, "White", 0, Vector3.new(3, .2, 1))
  180. obj.p2w=add.Weld(obj.p2, obj.Frame, cn(0, 0, 0))
  181. obj.bl=add.Wedge(model2,false, false, "White", 0, Vector3.new(.2, 2, 1))
  182. obj.blW=add.Weld(obj.bl, obj.p2, cn(-2.5, 0, 0)*ca(0, 0, pi/2))
  183. --Animate
  184. animate={
  185. ["Wheel"]=function(cf)
  186. obj.Wheels2W.C1=cn(-1.25, 0, -3)*ca(0, 0, mr(90))*cf
  187. end,
  188. ["Wheel2"]=function(cf)
  189. obj.WheelsW.C1=cn(1.25, 0, -3)*ca(0, 0, mr(90))*cf
  190. end,
  191. ["Wheel3"]=function(cf)
  192. obj.Wheel3W.C1=cn(3.5, .5, 5)*ca(0, 0, mr(90))*cf
  193. end,
  194. ["Wheel4"]=function(cf)
  195. obj.Wheel4W.C1=cn(-3.5, .5, 5)*ca(0, 0, mr(-90))*cf
  196. end,
  197. ["MachineGunR"]=function(cf)
  198. obj.mrw.C1=cf
  199. end,
  200. ["MachineGunL"]=function(cf)
  201. obj.mlw.C1=cf
  202. end,
  203. ["MachineGunL"]=function(cf)
  204. obj.mlw.C1=cf
  205. end,
  206. ["Rocket"]=function(cf)
  207. obj.rckw.C1=cf*ca(-pi/2, 0, 0)
  208. end,
  209. ["BladeR"]=function(cf)
  210. obj.p1w.C1=cf
  211. end,
  212. ["BladeL"]=function(cf)
  213. obj.p2w.C1=cf
  214. end,
  215. ["Booster"]=function(cf)
  216. obj.cW.C1=cn(0, 1, 5)*ca(mr(90), 0, 0)*cf
  217. end,
  218. }
  219. end
  220. function play(soundid, pitch, volume)
  221. local sound=add.Sound(workspace, soundid, pitch, volume)
  222. sound:play()
  223. c(function() wait(5) sound:remove() end)
  224. end
  225. function fade(part, incr)
  226. if part:isA("BasePart") then
  227. for i=part.Transparency, 1, incr do part.Transparency=i wait() end
  228. elseif part:isA("Model") then
  229. for i, v in pairs(part:children() or part) do
  230. if v:isA("BasePart") then
  231. c(function()for i=v.Transparency, 1, incr do v.Transparency=i wait() end end)
  232. end
  233. end
  234. end
  235. end
  236. function appear(part, incr)
  237. if part:isA("BasePart") then
  238. for i=part.Transparency, 0, -incr do v.Transparency=i wait() end
  239. elseif part:isA("Model") then
  240. for i, v in pairs(part:children() or part) do
  241. if v:isA("BasePart") then
  242. c(function()for i=v.Transparency, 0, -incr do v.Transparency=i wait() end end)
  243. end
  244. end
  245. end
  246. end
  247. function computePos(pos, pos2)
  248. local pos3=Vector3.new(pos2.x, pos.y, pos2.z)
  249. return cn(pos, pos3)
  250. end
  251. function rayCast(pos, dir, max, ingore)
  252. return workspace:findPartOnRay(Ray.new(pos, dir.unit*(max or 999)), ignore)
  253. end
  254. function nearObj(pos, dis)
  255. local temp
  256. local distance=dis
  257. for i, v in pairs(workspace:children()) do
  258. if v:isA("Model") then
  259. temp=v:findFirstChild("Torso")
  260. local humanoid=v:findFirstChild("Humanoid")
  261. if temp and humanoid and v~=char and (temp.CFrame.p-pos).magnitude<distance then
  262. distance=(temp.CFrame.p-pos).magnitude
  263. return temp.Parent
  264. end
  265. end
  266. end
  267. end
  268. function trail(prt, cf, thick, col)
  269. c(function()
  270. trails=true
  271. local old=(prt.CFrame*(cf or cn())).p
  272. local trm=Instance.new("Model", workspace)
  273. while trails do
  274. local new=(prt.CFrame*(cf or cn())).p
  275. local mag=(old-new).magnitude
  276. local dis=(old+new)/2
  277. local trail=add.Cylinder(trm, true, false, col or "White", .2, Vector3.new(1, 1, 1), cn(dis, new)*ca(pi/2, 0, 0), Vector3.new(thick, mag, thick))
  278. old=new
  279. c(function()
  280. for i=1, 0, -.1 do trail.Mesh.Scale=trail.Mesh.Scale*Vector3.new(i, 1, i) wait() end
  281. trail:remove()
  282. end)
  283. wait()
  284. end
  285. trm:remove()
  286. end)
  287. end
  288. boosts=false
  289. function boost(prt, thick, col)
  290. c(function()
  291. boosts=true
  292. local trm=Instance.new("Model", workspace)
  293. while boosts do
  294. local ef=add.Part(trm, false, false, "Bright yellow", .2, Vector3.new(1, .5, 1))
  295. local efm=add.Mesh("SpecialMesh", ef, Vector3.new(thick, thick, thick), nil, Meshes.Crown)
  296. add.Weld(ef, prt, cn(0, 4, 0)*ca(0, mr(mrand(-360, 360)), 0))
  297. game.Debris:addItem(ef, .2)
  298. local trail=add.Part(trm, true, false, col or "White", .2, Vector3.new(1, 1, 1), prt.CFrame*cn(0, 2, 0)*ca(mr(mrand(-360, 360)), mr(mrand(-360, 360)), mr(mrand(-360, 360))), Vector3.new(thick, thick, thick))
  299. c(function()
  300. for i=1, 0, -.1 do trail.Mesh.Scale=trail.Mesh.Scale*Vector3.new(i, i, i) wait() end
  301. trail:remove()
  302. end)
  303. wait()
  304. end
  305. trm:remove()
  306. end)
  307. end
  308. function stickHit(from, to)
  309. local stickW=add.Weld(from, to, to.CFrame:inverse()*from.CFrame)
  310. stickW.C0=from.CFrame:inverse()*from.CFrame
  311. return stickW
  312. end
  313. function glowMesh(prt, size, speed)
  314. local glow=prt:clone() add.Weld(prt, glow)
  315. glow.Parent=workspace
  316. glow.Anchored=false
  317. glow.CanCollide=false
  318. for i, v in pairs(glow:children()) do
  319. if v:isA("SpecialMesh") or v:isA("BlockMesh") or v:isA("CylinderMesh") then
  320. c(function()
  321. for i=0, size, speed do v.Scale=v.Scale+Vector3.new(i, i, i) wait() end
  322. end)
  323. c(function()
  324. fade(glow, .1) glow:remove()
  325. end)
  326. end
  327. end
  328. end
  329. function sliceHit(prt)
  330. prt.Touched:connect(function(h)
  331. if key==true and not hit and h.Parent~=player.Character then
  332. hit=true
  333. pcall(function()
  334. print("Slicing")
  335. local pYPos=h.Position.y-(h.Size.y/2)
  336. local sYPos=prt.Position.y
  337. if sYPos<=pYPos or sYPos>=(pYPos+h.Size.y) then return end
  338. local p=h:clone() p.Parent=workspace p.Anchored=false p.CanCollide=true
  339. local p2=h:clone() p2.Parent=workspace p2.Anchored=false p2.CanCollide=true
  340. h:remove()
  341. p.formFactor="Custom"
  342. p2.formFactor="Custom"
  343. p.TopSurface="Smooth"
  344. p.BottomSurface="Smooth"
  345. p.Friction=0
  346. p2.Friction=0
  347. p.Size=Vector3.new(h.Size.x, sYPos-pYPos, h.Size.z)
  348. p2.Size=Vector3.new(h.Size.x, p2.Size.y-(sYPos-pYPos), h.Size.z)
  349. p.CFrame=h.CFrame*CFrame.new(0, -p2.Size.y/2, 0)
  350. p2.CFrame=h.CFrame*CFrame.new(0, p.Size.y/2, 0)
  351. c(function()
  352. wait(5)
  353. p:remove() p2:remove()
  354. end)
  355. end)
  356. wait(.1)
  357. hit=false
  358. end
  359. end)
  360. end
  361. function dmgHit(prt)
  362. prt.Touched:connect(function(h)
  363. if key==true and h.Parent:findFirstChild("Humanoid") and not hit and h.Parent~=player.Character then
  364. hit=true
  365. local fakeM=Instance.new("Model", workspace)
  366. fakeM.Name=-dmg*mrand(1, 1.5)
  367. local hHuman=h.Parent:findFirstChild("Humanoid")
  368. local hTorso=h.Parent:findFirstChild("Torso")
  369. local fakeH=Instance.new("Humanoid", fakeM) fakeH.MaxHealth=0 fakeH.Health=0
  370. local label=add.Part(fakeM, false, false, "Bright red", 0, Vector3.new(.2, .2, .2), h.CFrame*cn(mrand(-2, 2), 4, mrand(-2, 2)), Vector3.new(.1, .1, .1)) label.Name="Head"
  371. c(function()
  372. local bv=Instance.new("BodyVelocity", label)
  373. bv.maxForce=Vector3.new(inf, inf, inf)
  374. bv.velocity=Vector3.new(0, 4.5, 0)
  375. Game.Debris:addItem(fakeM, 1)
  376. end)
  377. hHuman.Health=hHuman.Health-dmg
  378. wait(.1)
  379. hit=false
  380. end
  381. end)
  382. end
  383. function rockHit(prt)
  384. prt.Touched:connect(function(h)
  385. if key==true and not hit and h.Parent~=player.Character then
  386. hit=true
  387. if h.Parent:findFirstChild("Humanoid") then
  388. local fakeM=Instance.new("Model", workspace)
  389. fakeM.Name=-dmg*mrand(2, 5.5)
  390. local hHuman=h.Parent:findFirstChild("Humanoid")
  391. local hTorso=h.Parent:findFirstChild("Torso")
  392. local fakeH=Instance.new("Humanoid", fakeM) fakeH.MaxHealth=0 fakeH.Health=0
  393. local label=add.Part(fakeM, false, false, "Bright red", 0, Vector3.new(.2, .2, .2), h.CFrame*cn(mrand(-2, 2), 4, mrand(-2, 2)), Vector3.new(.1, .1, .1)) label.Name="Head"
  394. c(function()
  395. local bv=Instance.new("BodyVelocity", label)
  396. bv.maxForce=Vector3.new(inf, inf, inf)
  397. bv.velocity=Vector3.new(0, 4.5, 0)
  398. Game.Debris:addItem(fakeM, 1)
  399. end)
  400. hHuman.Health=hHuman.Health-dmg
  401. end
  402. local e=Instance.new("Explosion", workspace)
  403. e.BlastPressure=2
  404. e.BlastRadius=4
  405. e.Position=h.Position
  406. prt:remove()
  407. wait()
  408. hit=false
  409. end
  410. end)
  411. end
  412. function makeCrater(cf, size)
  413. local to=cf.p-(cf.p+Vector3.new(0, 200, 0))
  414. local hit, pos=rayCast(cf.p, to)
  415. if hit and pos then
  416. for i=1, 3 do
  417. local cr=add.Part(workspace, true, false, hit.Color or "Brown", 0, Vector3.new(1+size, size, 2+size), cn(pos+Vector3.new(mrand(-2+size/2, 2+size/2), 0, mrand(-2+size/2, 2+size/2)))*ca(mr(mrand(-4, 4)), mr(mrand(-360, 360)), mr(mrand(-35, 35))))
  418. end
  419. end
  420. end
  421. function makeLightning(from, to, thick, col)
  422. local magnitude=(from.p-to.p).magnitude
  423. local distance=(from.p+to.p)/2
  424. local pattern=add.Part(workspace, true, false, "White", 1, Vector3.new(.2, .2, magnitude), cn(distance, from.p))
  425. local fromPosProx=from.p
  426. local lim=Instance.new("Model", workspace)
  427. for i=1, 4 do
  428. local fromPosProx2=fromPosProx
  429. local random=Vector3.new(mrand(-1, 1), mrand(-1, 1), mrand(-1, 1))
  430. local findSize=pattern.Size.z/4
  431. local findOffSet=pattern.CFrame.lookVector*-1
  432. local compute=i*findSize*findOffSet
  433. local newfromPos=from.p
  434. local newEndPos=cn(random+compute+newfromPos).p
  435. local magnitude=(fromPosProx2-newEndPos).magnitude
  436. local distance=(fromPosProx2+newEndPos)/2
  437. local lightning=add.Part(lim, true, false, col or "Bright yellow", 0, Vector3.new(1, 1, 1), cn(distance, fromPosProx2), Vector3.new(thick, thick, magnitude))
  438. fromPosProx=newEndPos
  439. game.Debris:addItem(lim, 1)
  440. end
  441. pattern:remove()
  442. end
  443. function makeCircle(prt ,dis, rep, angle)
  444. local cm=Instance.new("Model", prt.Parent)
  445. for i=angle*2/rep, angle*2 do
  446. local prt2=prt:clone()
  447. prt2.Parent=cm
  448. prt2.CFrame=prt.CFrame*cn(dis*ms(i), 0, dis*mc(i))
  449. end
  450. prt:remove()
  451. return cm
  452. end
  453. local bv=Instance.new("BodyVelocity") bv.maxForce=Vector3.new(inf, 0, inf)
  454. local bav=Instance.new("BodyAngularVelocity") bav.maxTorque=Vector3.new(inf, inf, inf)
  455. function startBoost()
  456. boost(obj.TS, 3, "Bright orange")
  457. while boosts do
  458. if speed<150 then
  459. speed=speed+2
  460. bv.velocity=obj.Frame.CFrame.lookVector*speed
  461. end
  462. wait()
  463. end
  464. end
  465. local fire=false
  466. function startMG()
  467. fire=true
  468. for i=0, 1, .1 do
  469. animate.MachineGunR(cn(4.5*i, 0, 0))
  470. animate.MachineGunL(cn(-4.5*i, 0, 0))
  471. wait()
  472. end
  473. while fire do
  474. local mb=add.Part(workspace, false, false, "Bright yellow", 0, Vector3.new(.2, .2, 1), obj.gr.CFrame+obj.gr.CFrame.lookVector)
  475. dmgHit(mb)
  476. local f=Instance.new("BodyForce", mb) f.force=Vector3.new(0, mb:getMass()*196.25, 0)
  477. local v=Instance.new("BodyVelocity", mb) v.maxForce=Vector3.new(inf, inf, inf) v.velocity=mb.CFrame.lookVector*200
  478. local ef=add.Part(workspace, false, false, "Bright yellow", .2, Vector3.new(1, .5, 1))
  479. local efm=add.Mesh("SpecialMesh", ef, Vector3.new(1, 1, 1), nil, Meshes.Crown)
  480. add.Weld(ef, obj.gr, cn(0, 0, -1)*ca(-pi/2, 0, 0))
  481. game.Debris:addItem(ef, .1)
  482. game.Debris:addItem(mb, 1.5)
  483.  
  484. local mb2=add.Part(workspace, false, false, "Bright yellow", 0, Vector3.new(.2, .2, 1), obj.gl.CFrame+obj.gl.CFrame.lookVector)
  485. dmgHit(mb2)
  486. local f=Instance.new("BodyForce", mb2) f.force=Vector3.new(0, mb2:getMass()*196.25, 0)
  487. local v=Instance.new("BodyVelocity", mb2) v.maxForce=Vector3.new(inf, inf, inf) v.velocity=mb2.CFrame.lookVector*200
  488. local ef=add.Part(workspace, false, false, "Bright yellow", .2, Vector3.new(1, .5, 1))
  489. local efm=add.Mesh("SpecialMesh", ef, Vector3.new(1, 1, 1), nil, Meshes.Crown)
  490. add.Weld(ef, obj.gl, cn(0, 0, -1)*ca(-pi/2, 0, 0))
  491. game.Debris:addItem(ef, .1)
  492. game.Debris:addItem(mb2, 1.5)
  493. wait(.1)
  494. end
  495. for i=1, 0, -.1 do
  496. animate.MachineGunR(cn(4.5*i, 0, 0))
  497. animate.MachineGunL(cn(-4.5*i, 0, 0))
  498. wait()
  499. end
  500. end
  501. function startRocket()
  502. for i=0, 1, .1 do
  503. animate.Rocket(cn(0, 0, -8*i))
  504. wait()
  505. end
  506. wait(.2)
  507. local mb=add.Part(workspace, false, false, "Bright yellow", 0, Vector3.new(1, 1, 2), obj.rock.CFrame+obj.rock.CFrame.lookVector*2)
  508. rockHit(mb)
  509. local f=Instance.new("BodyForce", mb) f.force=Vector3.new(0, mb:getMass()*196.25, 0)
  510. local v=Instance.new("BodyVelocity", mb) v.maxForce=Vector3.new(inf, inf, inf) v.velocity=mb.CFrame.lookVector*300
  511. local ef=add.Part(workspace, false, false, "Bright yellow", .2, Vector3.new(1, .5, 1))
  512. local efm=add.Mesh("SpecialMesh", ef, Vector3.new(1.5, 1.5, 1.5), nil, Meshes.Crown)
  513. add.Weld(ef, obj.rock, cn(0, 0, -.5)*ca(-pi/2, 0, 0))
  514. game.Debris:addItem(ef, .1)
  515. game.Debris:addItem(mb, 1.5)
  516. wait(.2)
  517. for i=1, 0, -.1 do
  518. animate.Rocket(cn(0, 0, -8*i))
  519. wait()
  520. end
  521. end
  522. function startSelfDestruct()
  523. obj.VCW:remove()
  524. obj.VC.CanCollide=false
  525. local p=Instance.new("BodyPosition", obj.VC) p.maxForce=Vector3.new(inf, inf, inf) p.position=obj.VC.Position+Vector3.new(0, 300, 0)
  526. wait(1)
  527. local e=Instance.new("Explosion", workspace)
  528. e.BlastPressure=500
  529. e.BlastRadius=500
  530. e.Position=obj.Frame.Position
  531. wait(1)
  532. obj.VC.Anchored = false
  533. obj.VC:BreakJoints()
  534. obj.CanCollide = true
  535. end
  536. local slice=false
  537. function startSlice()
  538. slice=true
  539. for i=0, 1, .1 do
  540. animate.BladeR(cn(5.5*i, 0, 0))
  541. animate.BladeL(cn(-5.5*i, 0, 0))
  542. wait()
  543. end
  544. sliceHit(obj.p1) sliceHit(obj.p2)
  545. sliceHit(obj.br) sliceHit(obj.bl)
  546. while slice do wait() end
  547. for i=1, 0, -.1 do
  548. animate.BladeR(cn(5.5*i, 0, 0))
  549. animate.BladeL(cn(-5.5*i, 0, 0))
  550. wait()
  551. end
  552. end
  553. local hover=false
  554. function startHover()
  555. bv.maxForce=Vector3.new(inf, inf, inf)
  556. for i=0, 1, .05 do
  557. animate.Wheel(ca(0, 0, mr(90*i)))
  558. animate.Wheel2(ca(0, 0, mr(-90*i)))
  559. animate.Wheel3(ca(0, 0, mr(90*i)))
  560. animate.Wheel4(ca(0, 0, mr(-90*i)))
  561. animate.Booster(ca(mr(90*i), 0, 0))
  562. bv.velocity=bv.velocity+Vector3.new(0, 10*i, 0)
  563. wait()
  564. end
  565. boost(obj.TS, 3, "Bright orange")
  566. bv.velocity=Vector3.new(0, 0, 0)
  567. while hover do bv.velocity=bv.velocity+Vector3.new(0, 10, 0) wait(1) bv.velocity=Vector3.new(0, 0, 0) wait(.5) bv.velocity=bv.velocity-Vector3.new(0, 10, 0) wait(1) bv.velocity=Vector3.new(0, 0, 0) wait(.5) end
  568. for i=1, 0, -.05 do
  569. animate.Wheel(ca(0, 0, mr(90*i)))
  570. animate.Wheel2(ca(0, 0, mr(-90*i)))
  571. animate.Wheel3(ca(0, 0, mr(90*i)))
  572. animate.Wheel4(ca(0, 0, mr(-90*i)))
  573. animate.Booster(ca(mr(90*i), 0, 0))
  574. bv.velocity=bv.velocity-Vector3.new(0, 5-5*i, 0)
  575. wait()
  576. end
  577. bv.maxForce=Vector3.new(inf, 0, inf)
  578. boosts=false
  579. end
  580. function KeyDown(k)
  581. if k=="b" and not key and not boosts then
  582. key=true
  583. startBoost()
  584. end
  585. if k=="x" and not hover then
  586. hover=true
  587. startHover()
  588. elseif k=="x" and hover then
  589. hover=false
  590. end
  591. if k=="c" and not key and not slice then
  592. key=true
  593. startSlice()
  594. end
  595. if k=="r" and not key then
  596. key=true
  597. startRocket()
  598. key=false
  599. end
  600. if k=="g" and not key then
  601. key=true
  602. startSelfDestruct()
  603. key=false
  604. end
  605. if k=="f" and not key and not fire then
  606. key=true
  607. startMG()
  608. end
  609. if k=="v" and not key then
  610. key=true
  611. speed=0
  612. key=false
  613. end
  614. end
  615. function KeyUp(k)
  616. if k=="b" and boosts and key then
  617. key=false
  618. boosts=false
  619. end
  620. if k=="f" and fire and key then
  621. key=false
  622. fire=false
  623. end
  624. if k=="c" and slice and key then
  625. key=false
  626. slice=false
  627. end
  628. end
  629. local engine=false
  630. createParts()
  631. obj.VC.ChildAdded:connect(function(ad)
  632. if ad.Name=="SeatWeld" then
  633. torso=ad.Part1
  634. local vc=obj.VC
  635. if torso then print("Found")
  636. player=game.Players:getPlayerFromCharacter(torso.Parent)
  637. mouse=player:GetMouse()
  638. ad.C1=ad.C1*CFrame.new(0, 0, 1.5)
  639. bv.Parent=obj.Frame
  640. bav.Parent=obj.Frame
  641. gui.Parent=player.PlayerGui
  642. mouse.KeyDown:connect(KeyDown)
  643. mouse.KeyUp:connect(KeyUp)
  644. engine=true
  645. while torso and vc and engine do print("working")
  646. obj.AL.Text="Speed("..speed..")"
  647. if vc.Throttle==1 and speed<100 then
  648. speed=speed+1
  649. bv.velocity=obj.Frame.CFrame.lookVector*speed
  650. end
  651. if vc.Throttle==-1 and speed>-100 then
  652. speed=speed-1
  653. bv.velocity=obj.Frame.CFrame.lookVector*speed
  654. end
  655. if vc.Throttle==0 and speed>0 then
  656. speed=speed-1
  657. bv.velocity=obj.Frame.CFrame.lookVector*speed
  658. end
  659. if vc.Throttle==0 and speed<0 then
  660. speed=speed+1
  661. bv.velocity=obj.Frame.CFrame.lookVector*speed
  662. end
  663. if vc.Steer==1 then
  664. bav.angularvelocity=Vector3.new(0, -2, 0)
  665. if not hover then
  666. animate.Wheel2(ca(mr(-25), 0, 0))
  667. animate.Wheel(ca(mr(-25), 0, 0))
  668. end
  669. end
  670. if vc.Steer==-1 then
  671. bav.angularvelocity=Vector3.new(0, 2, 0)
  672. if not hover then
  673. animate.Wheel2(ca(mr(25), 0, 0))
  674. animate.Wheel(ca(mr(25), 0, 0))
  675. end
  676. end
  677. if vc.Steer==0 then
  678. bav.angularvelocity=Vector3.new(0, 0, 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement