Advertisement
Guest User

Jetpack

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