Advertisement
HenloMyDude

mini rocket launcher

Jan 4th, 2020
996
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.53 KB | None | 0 0
  1. --mini rocket launcher
  2.  
  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 = owner
  5. local Mouse = owner
  6. local mouse = owner
  7. local UserInputService = owner
  8. local ContextActionService = owner
  9. local RealPlayer = Player
  10. 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
  11.  
  12. print("found it on this paste: https://pastebin.com/u/PR0J3CT11")
  13. print("it has my scripts, idk why i care anymore cuz you guys love spreading my stuff.")
  14. print("my username is youngmacka123, i dont think ill be crowded in public but i might, i dunno.")
  15. myname = "TameDoNotClick"
  16. me = owner
  17. char = me.Character
  18. name = "MiniRocketLauncher"
  19. explodecolors = {"Really red", "Neon orange", "Bright red", "New Yeller", "Bright yellow", "Bright orange"}
  20. sm = {"Really black", "Black"}
  21. acceleratemax = 100
  22. accelerateincrease = 0.55
  23. MassDestruct = 100
  24. MaxEnergy = 160
  25. Energy = MaxEnergy
  26. EnergyCost = 0.3
  27. IncreaseEnergy = 10
  28. MaxSpeed = 120
  29. MinSpeed = MaxSpeed/4
  30. SpeedIncrease = 0.34
  31. Speed = MinSpeed
  32.  
  33. function GiveHp(mass)
  34. return (mass*(mass/9.6)/9.6) + 8
  35. end
  36.  
  37. function BrickDmg(d, part, pos)
  38. local dm = math.random(d/2.5,d/1.5)
  39. dm = (dm - (part.Position - pos.p).magnitude)
  40. if dm < 0 then dm = 0 end
  41. return dm
  42. end
  43.  
  44. function CheckEnergy()
  45. if Energy > MaxEnergy then
  46. Energy = MaxEnergy
  47. elseif Energy < 0 then Energy = 0 end
  48. end
  49.  
  50. hold = false
  51. jethold = false
  52. sel = false
  53. abletofire = true
  54. JetsOn = false
  55. Flying = false
  56. order = 1
  57. modes = {{"Normal", 6, 5400, 18, 32, 0.4, 7}, {"Accelerate", 7, 4200, 22, 5, 0.5, 9}, {"Machine gun", 4, 1400, 11, 65, 0.18, 3}, {"Blast", 11, 2000, 34, 23, 0.9, 13}}
  58. mode = modes[order]
  59. screenname = "MiniRocketGui"
  60. necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  61.  
  62. swoosh = Instance.new("Sound")
  63. swoosh.Looped = true
  64. swoosh.Volume = 0.4
  65. swoosh.Pitch = 1.9
  66. swoosh.SoundId = "rbxasset://sounds\\Rocket whoosh 01.wav"
  67.  
  68. bewm = Instance.new("Sound")
  69. bewm.Looped = false
  70. bewm.Volume = 0.7
  71. bewm.Pitch = 1.5
  72. bewm.SoundId = "http://www.roblox.com/asset/?id=2101148"
  73.  
  74. boom = Instance.new("Sound")
  75. boom.Looped = false
  76. boom.Volume = 0.5
  77. boom.Pitch = 0.55
  78. boom.SoundId = "http://www.roblox.com/asset/?id=2691586"
  79.  
  80. flys = Instance.new("Sound")
  81. flys.Looped = true
  82. flys.Volume = 0.8
  83. flys.Pitch = 0.4
  84. flys.SoundId = "rbxasset://sounds\\Rocket whoosh 01.wav"
  85.  
  86. function getnoobs(pos,dist)
  87. local stoof = {}
  88. local mods = {}
  89. for _,v in pairs(workspace:children()) do
  90. if v:IsA("BasePart") then
  91. if (v.Position - pos).magnitude < dist and v.Anchored == false then
  92. table.insert(stoof,v)
  93. end
  94. elseif v:IsA("Model") and v:findFirstChild("Humanoid") and v:findFirstChild("Torso") and v ~= char then
  95. if (v.Torso.Position - pos).magnitude < dist then
  96. table.insert(mods,v)
  97. end
  98. end
  99. for _,k in pairs(v:children()) do
  100. if k:IsA("BasePart") then
  101. if (k.Position - pos).magnitude < dist and k.Anchored == false then
  102. table.insert(stoof,k)
  103. end
  104. end
  105. for _,o in pairs(k:children()) do
  106. if o:IsA("BasePart") then
  107. if (o.Position - pos).magnitude < dist and o.Anchored == false then
  108. table.insert(stoof,o)
  109. end
  110. end
  111. end
  112. end
  113. end
  114. return stoof, mods
  115. end
  116.  
  117. for i,v in pairs(me.PlayerGui:children()) do
  118. if v.Name == screenname then v:remove() end
  119. end
  120.  
  121. screen = Instance.new("ScreenGui",me.PlayerGui)
  122. screen.Name = screenname
  123.  
  124. fra = Instance.new("Frame",screen)
  125. fra.Style = "RobloxRound"
  126. fra.Size = UDim2.new(0,120,0,25)
  127. fra.Position = UDim2.new(0.5,-60,0,0)
  128.  
  129. txt = Instance.new("TextLabel",fra)
  130. txt.BackgroundTransparency = 1
  131. txt.TextColor3 = Color3.new(1,1,1)
  132. txt.Size = UDim2.new(1,0,1,0)
  133. txt.Text = modes[order][1]
  134. txt.FontSize = "Size12"
  135.  
  136. fra2 = Instance.new("Frame",screen)
  137. fra2.BackgroundColor3 = Color3.new(0.1,0.2,0.4)
  138. fra2.Size = UDim2.new(0,240,0,19)
  139. fra2.Position = UDim2.new(0.5,-305,0,3)
  140.  
  141. energybar = Instance.new("Frame",fra2)
  142. energybar.Size = UDim2.new(Energy/MaxEnergy,0,1,0)
  143. energybar.BackgroundColor3 = Color3.new(0.1,0.3,0.9)
  144. energybar.BorderSizePixel = 0
  145.  
  146. entext = Instance.new("TextLabel",fra2)
  147. entext.BackgroundTransparency = 1
  148. entext.TextColor3 = Color3.new(1,1,1)
  149. entext.Size = UDim2.new(1,0,1,0)
  150. entext.Text = Energy.."/"..MaxEnergy
  151. entext.FontSize = "Size14"
  152.  
  153. sptext = Instance.new("TextLabel",fra)
  154. sptext.BackgroundTransparency = 1
  155. sptext.TextColor3 = Color3.new(1,1,1)
  156. sptext.Position = UDim2.new(1.1,0,0.5,0)
  157. sptext.Text = "0/0"
  158. sptext.TextXAlignment = "Left"
  159. sptext.FontSize = "Size14"
  160.  
  161. function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
  162. part.Parent = parent
  163. part.formFactor = form
  164. part.CanCollide = collide
  165. part.Transparency = tran
  166. part.Reflectance = ref
  167. part.Size = Vector3.new(x,y,z)
  168. part.BrickColor = BrickColor.new(color)
  169. part.TopSurface = 0
  170. part.BottomSurface = 0
  171. part.Anchored = anchor
  172. part.Locked = true
  173. part:BreakJoints()
  174. end
  175.  
  176. function weld(w, p, p1, a, b, c, x, y, z)
  177. w.Parent = p
  178. w.Part0 = p
  179. w.Part1 = p1
  180. w.C1 = CFrame.fromEulerAnglesXYZ(a,b,c) * CFrame.new(x,y,z)
  181. end
  182.  
  183. function GetCF(pos1, pos2)
  184. local pos4 = Vector3.new(pos2.X, pos1.Y, pos2.Z)
  185. return CFrame.new(pos1, pos4)
  186. end
  187.  
  188. rarm = char:findFirstChild("Right Arm")
  189. larm = char:findFirstChild("Left Arm")
  190. torso = char:findFirstChild("Torso")
  191. hum = char:findFirstChild("Humanoid")
  192.  
  193. coroutine.resume(coroutine.create(function()
  194. while true do
  195. if Flying == false then
  196. Energy = Energy + IncreaseEnergy
  197. end
  198. CheckEnergy()
  199. local mag = torso.Velocity.magnitude
  200. local lolmag = mag
  201. local col = nil
  202. sptext.Text = math.floor(mag).."/"..MaxSpeed
  203. if lolmag > MaxSpeed then
  204. lolmag = MaxSpeed
  205. sptext.TextColor3 = Color3.new(1, 0, 0.2)
  206. sptext.Text = sptext.Text.."!!"
  207. else
  208. sptext.TextColor3 = Color3.new(lolmag/MaxSpeed, (lolmag/MaxSpeed)/1.7, 0)
  209. end
  210. energybar.Size = UDim2.new(Energy/MaxEnergy,0,1,0)
  211. entext.Text = math.floor(Energy).."/"..math.floor(MaxEnergy)
  212. wait()
  213. end
  214. end))
  215.  
  216. flys.Parent = torso
  217.  
  218. bg = Instance.new("BodyGyro")
  219. bg.P = 18000
  220. bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  221.  
  222. bv = Instance.new("BodyVelocity")
  223. bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  224.  
  225. for i,v in pairs(char:children()) do
  226. if v.Name == name then v:remove() end
  227. end
  228.  
  229. launcher = Instance.new("Model")
  230. launcher.Name = name
  231.  
  232.  
  233. --[[LAUNCHER
  234. LAUNCHER
  235. LAUNCHER
  236. LAUNCHER
  237. LAUNCHER
  238. LAUNCHER
  239. LAUNCHER
  240. LAUNCHER
  241. ]]
  242.  
  243. main = Instance.new("Part")
  244. prop( main, launcher, false, 0, 0, 1.1, 0.6, 1.1, "Dark grey", false, "Custom" )
  245. mainmesh = Instance.new("SpecialMesh",main)
  246. mainmesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
  247. mainmesh.Scale = Vector3.new(1.2,1.2,7)
  248. weaponweld = Instance.new("Weld")
  249. weld( weaponweld, rarm, main, math.pi / 2, 0, 0, 0, -0.3, 0 )
  250.  
  251. neck = Instance.new("Part")
  252. prop( neck, launcher, false, 0, 0, 0.6, 1, 0.6, "Medium grey", false, "Custom" )
  253. Instance.new("CylinderMesh",neck)
  254. neckweld = Instance.new("Weld")
  255. weld( neckweld, main, neck, 0, 0, 0, 0, 0, 0.1 )
  256.  
  257. pew = Instance.new("Part")
  258. prop( pew, launcher, false, 0, 0, 0.9, 0.9, 1.5, "Dark grey", false, "Custom" )
  259. Instance.new("SpecialMesh",pew).MeshType = "Sphere"
  260. mehweld = Instance.new("Weld")
  261. weld( mehweld, neck, pew, 0, 0, 0, 0, 0, -0.3 )
  262.  
  263. tube = Instance.new("Part")
  264. prop( tube, launcher, false, 0, 0, 0.9, 0.9, 1.5, "Medium grey", false, "Custom" )
  265. local tubemesh = mainmesh:clone()
  266. tubemesh.Parent = tube
  267. tubemesh.Scale = Vector3.new(0.9,0.9,8)
  268. lolweld = Instance.new("Weld")
  269. weld( lolweld, pew, tube, 0, 0, 0, 0, 0, 0.7 )
  270.  
  271. bewm.Parent = tube
  272.  
  273. missile = Instance.new("Part")
  274. prop( missile, launcher, false, 0, 0, 0.1, 1.2, 0.1, "Really red", false, "Custom" )
  275. local sp = Instance.new("SpecialMesh",missile)
  276. sp.MeshType = "Sphere" sp.Scale = Vector3.new(0.6,1,0.6)
  277. missweld = Instance.new("Weld")
  278. weld( missweld, tube, missile, math.pi/2, 0, 0, 0, 0, -0.1 )
  279.  
  280. for x = -0.31, -0.15, 0.15 do
  281. for i=0,360,60 do
  282. local miss = Instance.new("Part")
  283. prop( miss, launcher, false, 0, 0, 0.1, 1.2, 0.1, "Bright red", false, "Custom" )
  284. local sp = Instance.new("SpecialMesh",miss)
  285. sp.MeshType = "Sphere" sp.Scale = Vector3.new(0.6,1,0.6)
  286. local miweld = Instance.new("Weld")
  287. miweld.C0 = CFrame.Angles(0,math.rad(i),0)
  288. weld( miweld, missile, miss, 0, 0, 0, x, 0, 0 )
  289. end
  290. end
  291.  
  292. --[[JET
  293. JET
  294. JET
  295. JET
  296. JET
  297. JET
  298. ]]
  299.  
  300. Jets = {}
  301.  
  302. for i = -0.5, 0.5, 1 do
  303. local p = Instance.new("Part")
  304. prop(p, launcher, false, 0, 0, 1.2, 2.1, 0.2, "Medium grey", false, "Custom")
  305. local wl = Instance.new("Weld")
  306. weld(wl, torso, p, 0, 0, i, -i/1.3, 0, -0.5)
  307.  
  308. local jet = Instance.new("Part")
  309. prop(jet, launcher, false, 0, 0, 0.6, 1.7, 0.6, "Dark grey", false, "Custom")
  310. Instance.new("CylinderMesh",jet)
  311. local wa = Instance.new("Weld")
  312. weld(wa, p, jet, 0, 0, -i, i*4, 1.2, -1)
  313.  
  314. local ho = Instance.new("Part")
  315. prop(ho, launcher, false, 1, 0, 0.1, 0.1, 0.1, "Medium grey", false, "Custom")
  316. local wad = Instance.new("Weld")
  317. weld(wad, jet, ho, math.pi/2, 0, 0, 0, 0.78, 0)
  318.  
  319. local jets = Instance.new("Part")
  320. prop(jets, launcher, false, 0, 0.05, 0.8, 1.4, 0.8, "Dark grey", false, "Custom")
  321. Instance.new("SpecialMesh",jets)
  322. local wa2 = Instance.new("Weld")
  323. weld(wa2, ho, jets, 0, 0, 0, 0, 0.5, 0)
  324.  
  325. local gas = Instance.new("Part")
  326. prop(gas, launcher, false, 0, 0, 1, 0.5, 1, "Medium grey", false, "Custom")
  327. Instance.new("SpecialMesh",gas)
  328. local wa3 = Instance.new("Weld")
  329. weld(wa3, jets, gas, 0, 0, 0, 0, 0.7, 0)
  330.  
  331. table.insert(Jets, {wa2, gas, jets})
  332.  
  333. for o = -0.3, 0.4, 0.6 do
  334. local p2 = Instance.new("Part")
  335. prop(p2, launcher, false, 0, 0.05, 0.8, 2.1, 0.2, "Dark grey", false, "Custom")
  336. local w2 = Instance.new("Weld")
  337. weld(w2, p, p2, -1.1, 0, o*1.6, -o*2.2, -1.26, -0.6)
  338. local p3 = Instance.new("Part")
  339. prop(p3, launcher, false, 0, 0, 1.3, 0.7, 0.4, "Bright red", false, "Custom")
  340. local w3 = Instance.new("Weld")
  341. weld(w3, p2, p3, 0, 0, 0, 0, -0.75, 0)
  342. end
  343. end
  344.  
  345. rb = Instance.new("Part")
  346. prop( rb, launcher, false, 1, 0, 0.1, 0.1, 0.1, "Bright red", false, "Custom" )
  347. rh = Instance.new("Weld")
  348. weld( rh, torso, rb, 0, 0, 0, -1.5, -0.5, 0)
  349.  
  350. lb = Instance.new("Part")
  351. prop( lb, launcher, false, 1, 0, 0.1, 0.1, 0.1, "Bright red", false, "Custom" )
  352. lh = Instance.new("Weld")
  353. weld( lh, torso, lb, 0, 0, 0, 1.5, -0.5, 0)
  354.  
  355. rw = Instance.new("Weld")
  356. weld(rw,rb,nil,0,0,0,0,0.5,0)
  357.  
  358. lw = Instance.new("Weld")
  359. weld(lw,lb,nil,0,0,0,0,0.5,0)
  360.  
  361. rightbattle = nil
  362. leftbattle = nil
  363.  
  364. launcher.Parent = char
  365.  
  366. selectmotion = function()
  367. rw.Part1 = rarm
  368. lw.Part1 = larm
  369. coroutine.resume(coroutine.create(function()
  370. for x = 0, 0.6, 0.1 do
  371. neckweld.C0 = CFrame.new(0,x*1.2,x/1.5)
  372. mehweld.C0 = CFrame.new(0,x,0)
  373. wait()
  374. end
  375. end))
  376. for i=0,90,10 do
  377. rw.C0 = CFrame.Angles(math.rad(i),0,0) * CFrame.new(math.rad(-i/3),math.rad(-i/4),0)
  378. lw.C0 = CFrame.Angles(math.rad(i),0,math.rad(i/2)) * CFrame.new(math.rad(i/3),math.rad(-i/1.7),0)
  379. wait()
  380. end
  381. if rightbattle == nil then
  382. rightbattle = rw.C0
  383. leftbattle = lw.C0
  384. end
  385. end
  386.  
  387. deselmotion = function()
  388. coroutine.resume(coroutine.create(function()
  389. for x = 0.6, 0, -0.1 do
  390. neckweld.C0 = CFrame.new(0,x*1.2,x)
  391. mehweld.C0 = CFrame.new(0,x,0)
  392. wait()
  393. end
  394. end))
  395. for i=90,0,-10 do
  396. rw.C0 = CFrame.Angles(math.rad(i),0,0) * CFrame.new(math.rad(-i/3),math.rad(-i/4),0)
  397. lw.C0 = CFrame.Angles(math.rad(i),0,math.rad(i/2)) * CFrame.new(math.rad(i/3),math.rad(-i/1.7),0)
  398. wait()
  399. end
  400. rw.Part1 = nil
  401. lw.Part1 = nil
  402. end
  403.  
  404. effect = function()
  405. local pos = tube.CFrame * CFrame.new(0,0,-0.8)
  406. local p = Instance.new("Part")
  407. prop( p, owner.Character, false, 0, 0, 1, 1, 1, "Neon orange", true, "Custom" )
  408. p.Locked = false
  409. p.CFrame = pos
  410. local pwn = Instance.new("SpecialMesh",p)
  411. pwn.Scale = Vector3.new(0.5,0.4,0.5)
  412. pwn.MeshId = "http://www.roblox.com/asset/?id=20329976"
  413. for i=0.2,1.5,0.3 do
  414. pwn.Scale = Vector3.new(i,i/1.4,i)
  415. p.CFrame = pos * CFrame.Angles(-math.pi/2,i,0)
  416. p.Transparency = (i/1.5)-0.2
  417. wait()
  418. end
  419. p:remove()
  420. end
  421.  
  422. movearm = function()
  423. bewm:play()
  424. local rp, lp = rw.C0, lw.C0
  425. for i=0,30,30/2 do
  426. rw.C0 = rp * CFrame.Angles(math.rad(i/3),0,0) * CFrame.new(0,math.rad(i/3),0)
  427. lw.C0 = lp * CFrame.Angles(math.rad(i/5),0,0) * CFrame.new(0,math.rad(i/5),0)
  428. wait()
  429. end
  430. for i=30,0,-30/3 do
  431. rw.C0 = rp * CFrame.Angles(math.rad(i/3),0,0) * CFrame.new(0,math.rad(i/3),0)
  432. lw.C0 = lp * CFrame.Angles(math.rad(i/5),0,0) * CFrame.new(0,math.rad(i/5),0)
  433. wait()
  434. end
  435. end
  436.  
  437. explode = function(p,s,mo)
  438. s:stop()
  439. local exdmg = mo[4]
  440. local exdist = mo[2]
  441. local expl = Instance.new("Model",owner.Character)
  442. expl.Name = "xS explode"
  443. local pos = CFrame.new(p.Position)
  444. local parts, hums = getnoobs(pos.p, exdist)
  445. local p = Instance.new("Part")
  446. prop(p,expl,false,1,0,1,1,1,1,true,"Brick")
  447. p.CFrame = pos
  448. local poo = boom:clone()
  449. poo.Parent = p
  450. poo:play()
  451. for i,v in pairs(parts) do
  452. local minus = BrickDmg(exdmg, v, pos)
  453. if v:GetMass() < MassDestruct and v.Parent:findFirstChild("Humanoid") == nil and v.Parent ~= launcher then
  454. local hp = v:findFirstChild("Hp")
  455. if hp ~= nil then
  456. hp.Value = hp.Value - minus
  457. if hp.Value <= 0 then
  458. v:breakJoints()
  459. end
  460. else
  461. local lol = Instance.new("IntValue")
  462. lol.Name = "Hp"
  463. lol.Value = GiveHp(v:GetMass())
  464. lol.Parent = v
  465. lol.Changed:connect(function()
  466. if lol.Value <= 0 then
  467. v:breakJoints()
  468. end
  469. end)
  470. lol.Value = lol.Value - minus
  471. end
  472. end
  473. local teehee = minus*1.2
  474. v.Velocity = CFrame.new(pos.p, v.Position).lookVector * teehee
  475. v.RotVelocity = Vector3.new(math.random(-teehee,teehee), math.random(-teehee,teehee), math.random(-teehee,teehee))
  476. end
  477. for i,v in pairs(hums) do
  478. v.Humanoid.Health = v.Humanoid.Health - math.random(exdmg/1.3,exdmg*1.3)
  479. end
  480. for i=1,math.random(7,14) do
  481. local spike = Instance.new("Part")
  482. prop( spike, owner.Character, false, 0, 0, 1, 1, 1, explodecolors[math.random(1,#explodecolors)], true, "Custom" )
  483. local a,b,c = math.random(-32,32)/10, math.random(-32,32)/10, math.random(-32,32)/10
  484. spike.CFrame = pos * CFrame.Angles(a,b,c) * CFrame.new(0,exdist/6,0)
  485. local mes = Instance.new("SpecialMesh",spike)
  486. mes.MeshId = "http://www.roblox.com/asset/?id=1033714"
  487. mes.Scale = Vector3.new(math.random(exdist*1.3,exdist*2.5)/10,math.random(exdist*5,exdist*10)/10,math.random(exdist*1.3,exdist*2.5)/10)
  488. local cf = spike.CFrame
  489. coroutine.resume(coroutine.create(function()
  490. local wah = exdist*1.2
  491. for y=0,wah,math.random(wah/12,wah/7) do
  492. wait()
  493. spike.CFrame = cf * CFrame.new(0,y,0)
  494. spike.Transparency = (y/wah) - 0.08
  495. end
  496. spike:remove()
  497. end))
  498. end
  499. coroutine.resume(coroutine.create(function()
  500. for i=1,math.random(2,6) do
  501. wait()
  502. local siz = math.random((exdist/3)*10, (exdist/1.8)*10)/10
  503. local pk = Instance.new("Part")
  504. prop(pk, workspace, false, 0.1, 0, 1, 1, 1, explodecolors[math.random(1,#explodecolors)], true, "Custom" )
  505. pk.CFrame = pos * CFrame.new(math.random(-exdist*10,exdist*10)/25, math.random(-exdist*10,exdist*10)/25, math.random(-exdist*10,exdist*10)/25)
  506. local ms = Instance.new("SpecialMesh",pk)
  507. ms.MeshType = "Sphere"
  508. ms.Scale = Vector3.new(siz,siz,siz)
  509. coroutine.resume(coroutine.create(function()
  510. for x=0.1, 1, 0.15 do
  511. wait()
  512. pk.Transparency = x
  513. end
  514. pk:remove()
  515. end))
  516. end
  517. end))
  518. coroutine.resume(coroutine.create(function()
  519. for b=1,math.random(6,13) do
  520. wait()
  521. local siz = math.random((exdist/4)*10, (exdist/2.8)*10)/10
  522. local pk = Instance.new("Part")
  523. prop(pk, workspace, false, 0.1, 0, 1, 1, 1, sm[math.random(1,#sm)], true, "Custom" )
  524. pk.CFrame = pos * CFrame.new(math.random(-exdist*10,exdist*10)/25, math.random(-exdist*10,exdist*10)/25, math.random(-exdist*10,exdist*10)/25)
  525. local ms = Instance.new("SpecialMesh",pk)
  526. ms.MeshType = "Sphere"
  527. ms.Scale = Vector3.new(siz,siz,siz)
  528. local trul = pk.CFrame
  529. coroutine.resume(coroutine.create(function()
  530. for x=0.1, 1, 0.2 do
  531. wait()
  532. pk.Transparency = x
  533. pk.CFrame = trul * CFrame.Angles(math.random(-35,35)/100,math.random(-35,35)/100,math.random(-35,35)/100) * CFrame.new(0,x*4,0)
  534. end
  535. pk:remove()
  536. end))
  537. end
  538. end))
  539. wait(1)
  540. expl:remove()
  541. end
  542.  
  543. function smoke(p)
  544. while p.Parent ~= nil do
  545. wait(0.11)
  546. local siz = math.random(4,12)/10
  547. local sp = Instance.new("Part")
  548. sp.Locked = false
  549. prop(sp,owner.Character,false,0.1,0,siz,siz,siz,sm[math.random(1,#sm)],true,"Custom")
  550. sp.CFrame = p.CFrame * CFrame.new(0,0,0.8) * CFrame.Angles(math.random(-6,6)/10, math.random(-6,6)/10, math.random(-6,6)/10)
  551. local sme = Instance.new("SpecialMesh",sp)
  552. sme.MeshType = "Sphere"
  553. local c = sp.CFrame
  554. coroutine.resume(coroutine.create(function()
  555. for i=0.1, 1, 0.2 do
  556. wait()
  557. sp.CFrame = c * CFrame.new(0,0,i*4)
  558. sp.Transparency = i
  559. sme.Scale = Vector3.new(1+i,1+i,1+i)
  560. end
  561. sp:remove()
  562. end))
  563. end
  564. end
  565.  
  566. function smokejet(p)
  567. while Flying do
  568. wait(0.06)
  569. for _,v in pairs(p) do
  570. local siz = math.random(5,15)/10
  571. local sp = Instance.new("Part")
  572. prop(sp,workspace,false,0.1,0,siz,siz,siz,sm[math.random(1,#sm)],true,"Custom")
  573. sp.CFrame = v[2].CFrame * CFrame.new(0,-0.3,0) * CFrame.Angles(math.random(-6,6)/10, math.random(-6,6)/10, math.random(-6,6)/10)
  574. local sme = Instance.new("SpecialMesh",sp)
  575. sme.MeshType = "Sphere"
  576. local fi = Instance.new("Part")
  577. prop(fi,workspace,false,0.1,0,siz,siz,siz,explodecolors[math.random(1,#explodecolors)],true,"Custom")
  578. fi.CFrame = v[2].CFrame * CFrame.new(0,-0.3,0)* CFrame.Angles(math.pi,0,0) * CFrame.Angles(math.random(-3,3)/10, math.random(-3,3)/10, math.random(-3,3)/10)
  579. local fmes = Instance.new("SpecialMesh",fi)
  580. fmes.Scale = Vector3.new(0.4,0.5,0.4)
  581. fmes.MeshId = "http://www.roblox.com/asset/?id=20329976"
  582. local c, c2 = sp.CFrame, fi.CFrame
  583. coroutine.resume(coroutine.create(function()
  584. for i=0.1, 2, 0.18 do
  585. wait()
  586. sp.CFrame = c * CFrame.new(0,-i*3,0) + Vector3.new(0,i*4,0)
  587. sp.Transparency = i/2.2
  588. fi.Transparency = i/2
  589. fi.CFrame = c2 * CFrame.new(0,i*2,0)
  590. fmes.Scale = Vector3.new(0.4+(i/1.8),0.5+(i/1.8),0.4+(i/1.8))
  591. sme.Scale = Vector3.new(1+(i/1.4),1+(i/1.4),1+(i/1.4))
  592. end
  593. sp:remove()
  594. fi:remove()
  595. end))
  596. end
  597. end
  598. end
  599.  
  600. fly = function()
  601. if Flying == false and JetsOn == false and Energy >= EnergyCost then
  602. bv.Parent = torso
  603. Flying = true
  604. coroutine.resume(coroutine.create(function()
  605. smokejet(Jets, Flying)
  606. end))
  607. flys:play()
  608. Speed = MinSpeed
  609. while jethold do
  610. if Energy <= 0 then break end
  611. if Speed < MaxSpeed then
  612. Speed = Speed + SpeedIncrease
  613. else Speed = MaxSpeed end
  614. local cf = Jets[1][3].CFrame * CFrame.Angles(math.pi/2,0,0)
  615. bv.velocity = cf.lookVector * Speed
  616. Energy = Energy - EnergyCost
  617. wait()
  618. bv.velocity = Vector3.new(0,0,0)
  619. end
  620. local ha = math.random(1,2) if ha == 1 then flys:stop() else flys:pause() end
  621. bv.Parent = nil
  622. bv.velocity = Vector3.new(0,0,0)
  623. Speed = MinSpeed
  624. wait(0.3)
  625. Flying = false
  626. end
  627. end
  628.  
  629. fire = function(mousepos, pos, target)
  630.  
  631. local moda = mode
  632.  
  633. if Energy >= moda[7] then
  634. Energy = Energy - moda[7]
  635. coroutine.resume(coroutine.create(effect))
  636. local hitable = true
  637. local pewm = Instance.new("Part")
  638. prop( pewm, nil, false, 0, 0, 0.4, 0.4, 0.7, "Medium grey", false, "Custom" )
  639. Instance.new("SpecialMesh",pewm).MeshType = "Sphere"
  640.  
  641. local projectile = Instance.new("Part")
  642. projectile.Locked = false
  643. prop( projectile, owner.Character, false, 0, 0, 0.3, 0.3, 1.3, "Bright red", false, "Custom" )
  644. Instance.new("SpecialMesh",projectile).MeshType = "Sphere"
  645.  
  646. local wi = Instance.new("Weld")
  647. weld(wi,projectile,nil,0,0,0,0,0,-0.4)
  648.  
  649. local swo = swoosh:clone()
  650. swo.Parent = projectile
  651. swo:play()
  652. local bv = nil
  653. local sped = 0
  654.  
  655. coroutine.resume(coroutine.create(function() wait(0.8) smoke(projectile) end))
  656. coroutine.resume(coroutine.create(function() wait(7) if projectile.Parent ~= nil then coroutine.resume(coroutine.create(function() explode(projectile, swo, moda) end)) projectile:remove() end end))
  657. coroutine.resume(coroutine.create(movearm))
  658. coroutine.resume(coroutine.create(function()
  659. repeat wait() until bv ~= nil
  660. if moda[1] == "Accelerate" then
  661. for i = moda[5], acceleratemax, accelerateincrease do
  662. sped = i
  663. wait()
  664. end
  665. else
  666. sped = moda[5]
  667. end
  668. end))
  669. projectile.Touched:connect(function(hit)
  670. if hit.CanCollide == true and hit:GetMass() >= 3.5 and hitable then
  671. coroutine.resume(coroutine.create(function() hitable = false explode(projectile, swo, moda) end))
  672. projectile:remove()
  673. end
  674. end)
  675. projectile.CFrame = pos * CFrame.new(0,0,-1)
  676. pewm.Parent = projectile
  677. pewm.CFrame = projectile.CFrame
  678. wi.Part1 = pewm
  679. local bg = Instance.new("BodyGyro")
  680. bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  681. bg.P = moda[3]
  682. bg.Parent = projectile
  683. bg.cframe = CFrame.new(projectile.Position, projectile.CFrame * CFrame.new(0,0,-10).p)
  684. bv = Instance.new("BodyVelocity")
  685. bv.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  686. bv.velocity = projectile.CFrame.lookVector * sped
  687. bv.Parent = projectile
  688. if target ~= nil then
  689. local lolpos = target.CFrame:pointToObjectSpace(mousepos)
  690. repeat
  691. wait()
  692. bg.cframe = CFrame.new(projectile.Position, target.CFrame * CFrame.new(lolpos).p)
  693. bv.velocity = projectile.CFrame.lookVector * sped
  694. until (projectile.Position - target.CFrame * CFrame.new(lolpos).p).magnitude < 2
  695. if hitable then
  696. hitable = false
  697. coroutine.resume(coroutine.create(function() explode(projectile, swo, moda) end))
  698. projectile:remove()
  699. end
  700. else
  701. local lolaha = mousepos
  702. projectile.CFrame = CFrame.new(pos.p, mousepos)
  703. repeat
  704. wait()
  705. bv.velocity = projectile.CFrame.lookVector * sped
  706. bg.cframe = CFrame.new(projectile.Position, lolaha)
  707. until projectile.Parent == nil
  708. end
  709. end
  710. end
  711.  
  712. if script.Parent.className ~= "HopperBin" then
  713. h = Instance.new("HopperBin",me.Backpack)
  714. h.Name = "MiniRocket"
  715. script.Parent = h
  716. end
  717.  
  718. bin = script.Parent
  719.  
  720. function select(mouse)
  721. selectmotion()
  722. mouse = owner:GetMouse()
  723. mouse.Icon = "http://www.roblox.com/asset/?id=45117007"
  724. sel = true
  725. coroutine.resume(coroutine.create(function()
  726. for i=1,4 do
  727. bg.Parent = nil
  728. wait()
  729. bg.Parent = torso
  730. end
  731. end))
  732. coroutine.resume(coroutine.create(function()
  733. while sel do
  734. local po = torso.Position+Vector3.new(0,0.85,0)
  735. local offset=(po.Y-mouse.Hit.p.Y)/60
  736. local mag=(po-mouse.Hit.p).magnitude/80
  737. offset=offset/mag
  738. torso.Neck.C0 = necko * CFrame.Angles(offset,0,0)
  739. rw.C0 = rightbattle * CFrame.Angles(-offset, 0,0)
  740. lw.C0 = leftbattle * CFrame.Angles(-offset,0,0)
  741. for i,v in pairs(Jets) do
  742. v[1].C0 = CFrame.Angles(offset,0,0)
  743. end
  744. bg.cframe = GetCF(torso.Position, mouse.Hit.p)
  745. wait()
  746. end --Fenrier was here o3o
  747. rw.C0 = rightbattle
  748. lw.C0 = leftbattle
  749. torso.Neck.C0 = necko
  750. end))
  751. mouse.Button1Down:connect(function()
  752. hold = true
  753. while hold do
  754. coroutine.resume(coroutine.create(function() fire(mouse.Hit.p, tube.CFrame, mouse.Target) end))
  755. for i=0,mode[6],0.03 do
  756. if hold == false then break end
  757. wait()
  758. end
  759. end
  760. end)
  761. mouse.Button1Up:connect(function() hold = false end)
  762. mouse.KeyDown:connect(function(key)
  763. key = key:lower()
  764. if key == "e" then
  765. order = order + 1
  766. if order > #modes then
  767. order = 1
  768. end
  769. mode = modes[order]
  770. txt.Text = mode[1]
  771. elseif key == "q" then
  772. order = order - 1
  773. if order < 1 then
  774. order = #modes
  775. end
  776. mode = modes[order]
  777. txt.Text = mode[1]
  778. elseif key == string.char(48) then
  779. jethold = true
  780. fly()
  781. end
  782. end)
  783. mouse.KeyUp:connect(function(key)
  784. key = key:lower()
  785. if key == string.char(48) then
  786. jethold = false
  787. end
  788. end)
  789. end
  790.  
  791. function desel()
  792. sel = false
  793. bg.Parent = nil
  794. deselmotion()
  795. end
  796.  
  797. bin.Selected:connect(select)
  798. bin.Deselected:connect(desel)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement