Advertisement
voidman

Untitled

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