George148

Rokitakis

Jul 7th, 2015
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.26 KB | None | 0 0
  1. normaldmg = 4
  2. distpower = 64
  3. speedz = 12
  4. explodist = 14
  5. explodist = explodist/3
  6. resttime = 0.02
  7. sitting = true
  8.  
  9. local MaxMP = 1000
  10. local CurrentMP = Instance.new("NumberValue")
  11. CurrentMP.Parent = bin
  12. CurrentMP.Name = "CurrentMP"
  13. CurrentMP.Value = MaxMP
  14. local TehTableOfPartz
  15.  
  16. local S1 = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  17. S1.SoundId = "http://www.roblox.com/asset/?id=48579638"
  18. S1.Pitch = 2.3
  19. S1.Volume = 0.5
  20. S1.Looped = false
  21. local S2 = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  22. S2.SoundId = "http://www.roblox.com/asset?id=3087031"
  23. S2.Pitch = 3.25
  24. S2.Volume = 0.16
  25. S2.Looped = false
  26. local S3 = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  27. S3.SoundId = "http://www.roblox.com/asset/?id=48579482"
  28. S3.Pitch = 2.1
  29. S3.Volume = 0.75
  30. S3.Looped = false
  31. local S4 = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  32. S4.SoundId = "http://www.roblox.com/asset/?id=48579482"
  33. S4.Pitch = 1.9
  34. S4.Volume = 0.6
  35. S4.Looped = false
  36.  
  37. hop = Instance.new("HopperBin")
  38. hop.Parent = nil
  39. script.Parent = hop
  40.  
  41. bin = Instance.new("HopperBin")
  42. bin.Name = "Rokit"
  43. bin.Parent = game.Players.LocalPlayer.Backpack
  44. local mo = Instance.new("Model")
  45. mo.Name = "Rokitz"
  46. mo.Parent = bin.Parent.Parent.Character
  47.  
  48. local Joint1
  49. local Joint2
  50. local LeftJoint = bin.Parent.Parent.Character.Torso:findFirstChild("Left Shoulder")
  51. local RightJoint = bin.Parent.Parent.Character.Torso:findFirstChild("Right Shoulder")
  52. local han
  53.  
  54. part = Instance.new("Part")
  55. part.formFactor = ("Custom")
  56. part.Size = Vector3.new(0.5,0.5,0.5)
  57. part.Locked = true
  58. part.CanCollide = false
  59. part.Anchored = true
  60. part.BrickColor = BrickColor.new("Really black")
  61. part.TopSurface = 0
  62. part.BottomSurface = 0
  63.  
  64. -------------------------------------------------------------------- GUI -----------------------
  65. gui = Instance.new("ScreenGui", bin.Parent.Parent.PlayerGui)
  66. gui.Name = "Mp Gui For Rokit"
  67. Fr = Instance.new("ImageLabel", gui)
  68. Fr.Name = "Main"
  69. Fr.Size = UDim2.new(0.2,0,0.1,0)
  70. Fr.Position = UDim2.new(0.4,0,0,0)
  71. Fr.BackgroundColor = BrickColor.new("Black")
  72. Fr.BorderColor = BrickColor.new("Bright red")
  73. Fr.Image = "http://www.roblox.com/asset/?id=48965808"
  74. Fr.Visible = false
  75. mpt = Instance.new("TextLabel", Fr)
  76. mpt.Name = "MP Title"
  77. mpt.Position = UDim2.new(0.5,0,0.2,0)
  78. mpt.FontSize = 6
  79. mpt.Text = "Rocket MP"
  80. mpt.TextColor = BrickColor.new("Really blue")
  81. mpt.ZIndex = 3
  82. coroutine.resume(coroutine.create(function(obzs) while true do wait(0.33) obzs.TextColor = BrickColor.new("Cyan") wait(0.33) obzs.TextColor = BrickColor.new("Really blue") end end), mpt)
  83. mpts = mpt:Clone()
  84. mpts.Parent = mpt
  85. mpts.Name = "Shadow"
  86. mpts.Position = UDim2.new(0,2,0,2)
  87. mpts.Transparency = 0.3
  88. mpts.TextColor = BrickColor.new("Dark stone grey")
  89. mpts.ZIndex = 1
  90.  
  91. Fr2 = Instance.new("ImageLabel")
  92. Fr2.Parent = Fr
  93. Fr2.Size = UDim2.new(1,0,0.25,0)
  94. Fr2.Name = "MadeByGeorge148"
  95. Fr2.Position = UDim2.new(0,0,1,0)
  96. Fr2.BackgroundColor = BrickColor.new("Really black")
  97. Fr2.BorderColor = BrickColor.new("Bright red")
  98. Fr2.Image = "http://www.roblox.com/asset/?id=48965808"
  99. Mab = Instance.new("TextLabel", Fr2)
  100. Mab.Name = "Namez"
  101. Mab.Position = UDim2.new(0.5,-1,0.5,-1)
  102. Mab.FontSize = 3
  103. Mab.Text = "Made By: DoogleFox"
  104. Mab.TextColor = BrickColor.new("White")
  105. Mab.ZIndex = 3
  106. Mabs = Mab:Clone()
  107. Mabs.Parent = Mab
  108. Mabs.ZIndex = 2
  109. Mabs.TextColor = BrickColor.new("Dark stone grey")
  110. Mabs.Position = UDim2.new(0,2,0,2)
  111. local thetext = "100% Made By: George148"
  112. coroutine.resume(coroutine.create(function()
  113. while true do
  114. Mab.Text = ">>" .. thetext .. "<<"
  115. Mabs.Text = Mab.Text
  116. wait(0.08)
  117. Mab.Text = ">> " .. thetext .. " <<"
  118. Mabs.Text = Mab.Text
  119. wait(0.08)
  120. Mab.Text = ">> " .. thetext .. " <<"
  121. Mabs.Text = Mab.Text
  122. wait(0.08)
  123. Mab.Text = ">> " .. thetext .. " <<"
  124. Mabs.Text = Mab.Text
  125. wait(0.08)
  126. Mab.Text = ">> " .. thetext .. " <<"
  127. Mabs.Text = Mab.Text
  128. wait(0.08)
  129. Mab.Text = ">> " .. thetext .. " <<"
  130. Mabs.Text = Mab.Text
  131. wait(0.08)
  132. Mab.Text = ">> " .. thetext .. " <<"
  133. Mabs.Text = Mab.Text
  134. wait(0.08)
  135. Mab.Text = ">> " .. thetext .. " <<"
  136. Mabs.Text = Mab.Text
  137. wait(0.08)
  138. end
  139. end))
  140.  
  141. mpfb = Instance.new("ImageLabel", Fr)
  142. mpfb.Name = "MP Frame"
  143. mpfb.Size = UDim2.new(0.9,0,0.4,0)
  144. mpfb.Position = UDim2.new(0.05,0,0.5,0)
  145. mpfb.BackgroundColor = BrickColor.new("Really black")
  146. mpfb.BorderColor = BrickColor.new("Cyan")
  147. mpfb.Image = "http://www.roblox.com/asset/?id=53084230"
  148. local mpf = mpfb:Clone()
  149. mpf.Parent = mpfb
  150. mpf.Size = UDim2.new(1,0,1,0)
  151. mpf.Position = UDim2.new(0,0,0,0)
  152. mpf.BackgroundColor = BrickColor.new("Deep blue")
  153. mpf.ZIndex = 2
  154. mpf.Position = UDim2.new(0,0,0,0)
  155. local mpft = Instance.new("TextLabel")
  156. mpft.Parent = mpfb
  157. mpft.TextColor = BrickColor.new("White")
  158. mpft.Text = math.ceil(CurrentMP.Value) .. " / " .. math.ceil(MaxMP)
  159. mpft.Position = UDim2.new(0.5,0,0.5,0)
  160. mpft.FontSize = 4
  161. mpft.ZIndex = 8
  162.  
  163. coroutine.resume(coroutine.create(function()
  164. CurrentMP.Changed:connect(function()
  165. if CurrentMP.Value > MaxMP then
  166. CurrentMP.Value = MaxMP
  167. end
  168. if CurrentMP.Value < 0 then
  169. CurrentMP.Value = 0
  170. end
  171. sizezzzz = CurrentMP.Value / MaxMP
  172. mpft.Text = math.ceil(CurrentMP.Value) .. " / " .. math.ceil(MaxMP)
  173. mpf.Size = UDim2.new(sizezzzz,0,1,0)
  174. end)
  175. end))
  176. --------------------------------------------------------------------------------------------
  177.  
  178. function PlaySound(Pi, Vol, ID)
  179. so = Instance.new("Sound")
  180. so.Looped = false
  181. so.Volume = Vol
  182. so.Pitch = Pi
  183. so.SoundId = ID
  184. ssss = so:Clone()
  185. ssss.PlayOnRemove = true
  186. ssss.Parent = han
  187. coroutine.resume(coroutine.create(function(tehsound) wait() tehsound:remove() end), ssss)
  188. end
  189.  
  190. function ShootEffect(ob2, sizezor2)
  191. local ob = ob2:Clone()
  192. local cf = ob.CFrame
  193. ob.Size = Vector3.new(ob2.Size.x, ob2.Size.y, speedz)
  194. ob.Parent = mo
  195. ob.Transparency = 0.2
  196. ob.Firez:remove()
  197. for _ = 1, 12 do
  198. ob.Transparency = ob.Transparency + 0.08
  199. ob.Size = ob.Size + Vector3.new(-(sizezor2/16),-(sizezor2/16),0)
  200. ob.CFrame = cf
  201. wait(0.025)
  202. end
  203. game:service("Debris"):AddItem(ob, 0)
  204. end
  205.  
  206. function Explodez(pos, dmgz, sizezor, pitchz)
  207. local e = part:Clone()
  208. local mesh = Instance.new("SpecialMesh", e)
  209. mesh.MeshType = "Sphere"
  210. e.CFrame = CFrame.new(pos)
  211. e.Parent = mo
  212. local e2 = part:Clone()
  213. local mesh2 = Instance.new("SpecialMesh", e2)
  214. mesh2.MeshType = "Sphere"
  215. e2.CFrame = CFrame.new(pos)
  216. e2.Parent = mo
  217. e2.BrickColor = BrickColor.new("Royal purple")
  218.  
  219. local d = ((explodist*3)+sizezor)/2
  220. r1 = pos + Vector3.new(-d,-d,-d)
  221. r2 = pos + Vector3.new(d,d,d)
  222. region = Region3.new(r1, r2)
  223. local partz = workspace:FindPartsInRegion3(region, bin.Parent.Parent.Character, 220)
  224. tehvol = 0.19
  225. S2:Play()
  226. game:service("Debris"):AddItem(e, 0.5)
  227. game:service("Debris"):AddItem(e2, 0.5)
  228. for _ = 1, 3 do
  229. local edist = (explodist+sizezor)*2
  230. mesh.Scale = mesh.Scale + Vector3.new(edist,edist,edist)
  231. e.Transparency = e.Transparency + 0.22
  232. mesh2.Scale = mesh2.Scale + Vector3.new(edist/1.5,edist/1.5,edist/1.5)
  233. e2.Transparency = e2.Transparency + 0.22
  234. wait(0.05)
  235. end
  236. for __, vv in pairs(partz) do
  237. if vv.Parent.className == "Model" and vv.Parent:findFirstChild("Humanoid") ~= nil then
  238. if sitting == true then
  239. vv.Parent.Humanoid.Sit = true
  240. end
  241. vv.Parent.Humanoid.Health = vv.Parent.Humanoid.Health - dmgz
  242. end
  243. if vv.Anchored == false then
  244. vv.Velocity = CFrame.new(pos, vv.Position).lookVector*distpower
  245. end
  246. end
  247. wait()
  248. for _ = 1, 3 do
  249. local edist = (explodist+sizezor) * 2
  250. mesh.Scale = mesh.Scale + Vector3.new(-edist,-edist,-edist)
  251. e.Transparency = e.Transparency + 0.1
  252. mesh2.Scale = mesh2.Scale + Vector3.new(-(edist/1.5),-(edist/1.5),-(edist/1.5))
  253. e2.Transparency = e2.Transparency + 0.1
  254. wait(0.05)
  255. end
  256. end
  257.  
  258. distz = speedz
  259. function Shoot(mouse, dmgz, sizezor, sizezor2, pitchz)
  260. local p = part:Clone()
  261. p.Size = Vector3.new(sizezor2,sizezor2,1.5)
  262. p.CFrame = CFrame.new(han.Position, mouse.Hit.p)
  263. p.Parent = mo
  264. local f = Instance.new("Fire", p)
  265. f.Size = 3
  266. f.Heat = 3
  267. f.Name = "Firez"
  268. f.Color = Color3.new(0.4,0.15,0.6)
  269. local tuch = false
  270. local num = 0
  271. game:GetService("Debris"):AddItem(p, 2)
  272. while tuch == false do
  273.  
  274. if num ~= 0 then
  275. coroutine.resume(coroutine.create(ShootEffect), p, sizezor2)
  276. end
  277. p1 = p.Position
  278. p2 = p.Position + (p.CFrame.lookVector*2)
  279. local ray = Ray.new(p1, (p1 - p2).unit*-distz)
  280. hit, enz = workspace:findPartOnRay(ray, bin.Parent.Parent.Character)
  281. if hit ~= nil then
  282. tuch = true
  283. coroutine.resume(coroutine.create(Explodez), enz, dmgz, sizezor, pitchz)
  284. game:service("Debris"):AddItem(p, 0)
  285. end
  286. p.CFrame = p.CFrame + (p.CFrame.lookVector * speedz)
  287.  
  288. num = num + 1
  289. if num == 100 then
  290. game:service("Debris"):AddItem(p, 0)
  291. break
  292. end
  293. wait()
  294. end
  295. end
  296.  
  297. local regenerating = false
  298. local readytoshoot = true
  299. function onButton1Down(mouse)
  300. mo.Parent = bin.Parent.Parent.Character
  301. if readytoshoot == true and regenerating == false then
  302. if CurrentMP.Value >= 5 then
  303. readytoshoot = false
  304. coroutine.resume(coroutine.create(Shoot), mouse, normaldmg, 0, 0.4, 3.25)
  305. CurrentMP.Value = CurrentMP.Value - 5
  306. S3:Play()
  307. ----- Fire Anim -----
  308. Joint1.C0 = Joint1.C0 * CFrame.Angles(0.35,0,0)
  309. Joint2.C0 = Joint2.C0 * CFrame.Angles(0.35,0,0)
  310. wait(0.2)
  311. Joint1.C0 = CFrame.new(-0.55,0.5,-0.8) * CFrame.Angles(math.pi/2,0,math.pi/5)
  312. Joint2.C0 = CFrame.new(1,0.5,-0.75) * CFrame.Angles(math.pi/2,0,-math.pi/12)
  313.  
  314.  
  315. wait(resttime-0.2)
  316. readytoshoot = true
  317. end
  318. end
  319. end
  320.  
  321. function MPRegenLine()
  322. local line = part:Clone()
  323. local mes = Instance.new("SpecialMesh", line)
  324. mes.MeshType = "Sphere"
  325. mes.Scale = Vector3.new(2.5,3.5,2.5)
  326. line.BrickColor = BrickColor.new("Royal purple")
  327. line.Transparency = math.random(2, 8)/10
  328. line.Parent = mo
  329. line.Name = "RegenLine"
  330. line.CFrame = bin.Parent.Parent.Character.Torso.CFrame + Vector3.new(math.random(-4,4), -4.5,math.random(-4,4))
  331. for _ = 1, 20 do
  332. line.CFrame = line.CFrame + Vector3.new(0,0.35,0)
  333. line.Transparency = line.Transparency + 0.01
  334. mes.Scale = mes.Scale + Vector3.new(-0.09,0.1,-0.09)
  335. wait()
  336. end
  337. game:service("Debris"):AddItem(line, 0)
  338. end
  339. function MPRegenLine2()
  340. local line = part:Clone()
  341. local mes = Instance.new("SpecialMesh", line)
  342. mes.MeshId = "http://www.roblox.com/asset/?id=20329976"
  343. mes.Scale = Vector3.new(5,0.1,5)
  344. line.BrickColor = BrickColor.new("Royal purple")
  345. line.Transparency = 0.2
  346. line.Parent = mo
  347. line.Name = "RegenLine"
  348. line.CFrame = bin.Parent.Parent.Character.Torso.CFrame + Vector3.new(0,-3.1,0)
  349. for _ = 1, 20 do
  350. line.CFrame = line.CFrame + Vector3.new(0,0.04,0)
  351. line.Transparency = line.Transparency + 0.0425
  352. mes.Scale = mes.Scale + Vector3.new(-0.1,0.14,-0.1)
  353. wait()
  354. end
  355. game:service("Debris"):AddItem(line, 0)
  356. end
  357.  
  358.  
  359. local down = Instance.new("NumberValue")
  360. down.Parent = bin
  361. down.Name = "MPRegen"
  362. function RegenMP()
  363. regenerating = true
  364. bin.Parent.Parent.Character.Humanoid.WalkSpeed = 0
  365. local theval = down.Value
  366. local dir = "Down"
  367. while down.Value == theval do
  368. -- coroutine.resume(coroutine.create(MPRegenLine))
  369. coroutine.resume(coroutine.create(MPRegenLine2))
  370. CurrentMP.Value = CurrentMP.Value + 1
  371. for _, vs in pairs(TehTableOfPartz) do
  372. vs.BrickColor = BrickColor.new("Royal purple")
  373. if vs.Transparency < 0.55 then
  374. dir = "Up"
  375. end
  376. if vs.Transparency > 0.8 then
  377. dir = "Down"
  378. end
  379. if dir == "Up" then
  380. vs.Transparency = vs.Transparency + 0.1
  381. elseif dir == "Down" then
  382. vs.Transparency = vs.Transparency - 0.1
  383. end
  384. end
  385. wait(0.09)
  386. end
  387. end
  388.  
  389.  
  390. function onKeyDown(key, mouse)
  391. if key ~= nil then
  392. key:lower()
  393. if key == "r" then
  394. down.Value = math.random(0, 32000)
  395. coroutine.resume(coroutine.create(RegenMP))
  396. elseif key == "e" then
  397. mo.Parent = bin.Parent.Parent.Character
  398. if readytoshoot == true and regenerating == false then
  399. if CurrentMP.Value >= 9 then
  400. readytoshoot = false
  401. coroutine.resume(coroutine.create(Shoot), mouse, (normaldmg*1.4), 3.5, 0.75, 2.75)
  402. CurrentMP.Value = CurrentMP.Value - 9
  403. S4:Play()
  404. ----- Fire Anim -----
  405. Joint1.C0 = Joint1.C0 * CFrame.Angles(0.35,0,0)
  406. Joint2.C0 = Joint2.C0 * CFrame.Angles(0.35,0,0)
  407. wait(0.2)
  408. Joint1.C0 = CFrame.new(-0.55,0.5,-0.8) * CFrame.Angles(math.pi/2,0,math.pi/5)
  409. Joint2.C0 = CFrame.new(1,0.5,-0.75) * CFrame.Angles(math.pi/2,0,-math.pi/12)
  410.  
  411.  
  412. wait(resttime-0.2)
  413. readytoshoot = true
  414. end
  415. end
  416. end
  417. end
  418. end
  419. function onKeyUp(key)
  420. if key == "r" then
  421. down.Value = math.random(0, 32000)
  422. bin.Parent.Parent.Character.Humanoid.WalkSpeed = 16
  423. for _, vs in pairs(TehTableOfPartz) do
  424. vs.Transparency = 0.98
  425. vs.BrickColor = BrickColor.new("Light stone grey")
  426. end
  427. regenerating = false
  428. end
  429. end
  430.  
  431. function BuildRocket()
  432. LeftJoint.Part0 = nil
  433. RightJoint.Part0 = nil
  434. Joint1 = Instance.new("Motor", bin.Parent.Parent.Character.Torso)
  435. Joint2 = Instance.new("Motor", Joint1.Parent)
  436. Joint1.Part0 = Joint1.Parent
  437. Joint2.Part0 = Joint1.Parent
  438. Joint1.Part1 = bin.Parent.Parent.Character:findFirstChild("Left Arm")
  439. Joint2.Part1 = bin.Parent.Parent.Character:findFirstChild("Right Arm")
  440. Joint1.C0 = CFrame.new(-0.55,0.5,-0.8) * CFrame.Angles(math.pi/2,0,math.pi/5)
  441. Joint2.C0 = CFrame.new(1,0.5,-0.75) * CFrame.Angles(math.pi/2,0,-math.pi/12)
  442. mod = Instance.new("Model")
  443. mod.Parent = bin.Parent.Parent.Character
  444. mod.Name = "RocketDesign"
  445. mo.Parent = bin.Parent.Parent.Character
  446. hanz = part:Clone()
  447. hanz.Anchored = false
  448. hanz.Parent = mod
  449. mes = Instance.new("SpecialMesh", hanz)
  450. mes.MeshId = "rbxasset://fonts/rocketlauncher.mesh"
  451. mes.TextureId = "rbxasset://textures/rocketlaunchertex.png"
  452. mes.Scale = Vector3.new(0.7,0.9,0.9)
  453. hanz.Transparency = 1
  454. w = Instance.new("Weld", hanz)
  455. w.Name = "HandleToArmWeld"
  456. w.Part0 = bin.Parent.Parent.Character:findFirstChild("Right Arm")
  457. w.Part1 = hanz
  458. w.C0 = CFrame.new(-0.2,0,-0.6) * CFrame.Angles(0,math.pi,math.pi/2)
  459. main = part:Clone()
  460. main.Name = "MainDesignHandle"
  461. main.Anchored = false
  462. main.Parent = mod
  463. main.Position = bin.Parent.Parent.Character.Torso.Position
  464. mesh = Instance.new("CylinderMesh", main)
  465. mesh.Scale = Vector3.new(1.5,5.5,1.5)
  466. w = Instance.new("Weld", main)
  467. w.Part0 = hanz
  468. w.Part1 = main
  469. w.C0 = CFrame.new(0,0,0) * CFrame.Angles(0,0,math.pi/2)
  470. e = part:Clone()
  471. e.Name = "Weld Block"
  472. e.Anchored = false
  473. e.Parent = mod
  474. e.Size = Vector3.new(0.5,0.5,0.5)
  475. e.Position = bin.Parent.Parent.Character.Torso.Position
  476. e.Transparency = 1
  477. w = Instance.new("Weld", e)
  478. w.Part0 = main
  479. w.Part1 = e
  480. w.C0 = CFrame.new(0,0,0) * CFrame.Angles(math.pi/2,0,0)
  481.  
  482. et = part:Clone()
  483. et.Name = "End Tip"
  484. et.Anchored = false
  485. et.Parent = mod
  486. et.Position = bin.Parent.Parent.Character.Torso.Position
  487. mesh = Instance.new("SpecialMesh", et)
  488. mesh.MeshId = "http://www.roblox.com/asset/?id=1033714"
  489. mesh.Scale = Vector3.new(0.6,1.8,0.6)
  490. w = Instance.new("Weld", et)
  491. w.Part0 = e
  492. w.Part1 = et
  493. w.C0 = CFrame.new(0,0,1.25) * CFrame.Angles(-math.pi/2,0,0)
  494. ft = part:Clone()
  495. ft.Name = "Front Tip"
  496. ft.Anchored = false
  497. ft.Parent = mod
  498. ft.Position = bin.Parent.Parent.Character.Torso.Position
  499. ft.BrickColor = BrickColor.new("Dark stone grey")
  500. mesh = Instance.new("SpecialMesh", ft)
  501. mesh.MeshId = "http://www.roblox.com/asset/?id=1033714"
  502. mesh.Scale = Vector3.new(0.325,0.6,0.325)
  503. w = Instance.new("Weld", ft)
  504. w.Part0 = e
  505. w.Part1 = ft
  506. w.C0 = CFrame.new(0,0,-1.4) * CFrame.Angles(-math.pi/2,0,0)
  507. ft2 = part:Clone()
  508. ft2.Name = "Front Tip 2"
  509. ft2.Anchored = false
  510. ft2.Parent = mod
  511. ft2.Position = bin.Parent.Parent.Character.Torso.Position
  512. mesh = Instance.new("SpecialMesh", ft2)
  513. mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
  514. mesh.Scale = Vector3.new(0.6,0.6,0.6)
  515. w = Instance.new("Weld", ft2)
  516. w.Part0 = e
  517. w.Part1 = ft2
  518. w.C0 = CFrame.new(0,-0.065,-1.7) * CFrame.Angles(-math.pi/2,0,0)
  519. han = part:Clone()
  520. han.Name = "Handle"
  521. han.Anchored = false
  522. han.Parent = mod
  523. han.Size = Vector3.new(0.02,0.02,0.02)
  524. han.Transparency = 0.9
  525. f = Instance.new("Fire", han)
  526. f.Size = 1
  527. f.Heat = 0
  528. f.Color = Color3.new(0.05,0.05,0.1)
  529. f.SecondaryColor = Color3.new(0.2,0.1,0.1)
  530. w = Instance.new("Weld", han)
  531. w.Part0 = e
  532. w.Part1 = han
  533. w.C0 = CFrame.new(0,0,-2)
  534.  
  535. TehTableOfPartz = {}
  536. for i = 1, 8 do
  537. c = part:Clone()
  538. c.Parent = mod
  539. c.Anchored = false
  540. c.Position = main.Position
  541. c.BrickColor = BrickColor.new("Light stone grey")
  542. c.Transparency = 0.98
  543. mesh = Instance.new("CylinderMesh", c)
  544. mesh.Scale = Vector3.new(1.51,0.25,1.51)
  545. w = Instance.new("Weld", c)
  546. w.Part0 = main
  547. w.Part1 = c
  548. w.C0 = CFrame.new(0,1.5,0) * CFrame.new(0,-(i/3),0)
  549. table.insert(TehTableOfPartz, c)
  550. end
  551.  
  552. end
  553.  
  554. equiped = false
  555. function FaceTarget(mouse)
  556. wait()
  557. local bg = Instance.new("BodyGyro")
  558. bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  559. bg.D = 100
  560. bg.Parent = bin.Parent.Parent.Character.Torso
  561. local pos1 = bin.Parent.Parent.Character.Torso.Position
  562. local pos2 = Vector3.new(mouse.Hit.x, pos1.y,mouse.Hit.z)
  563. bg.cframe = CFrame.new(pos1, pos2)
  564. equiped = true
  565. while equiped == true do
  566. pos1 = bin.Parent.Parent.Character.Torso.Position
  567. pos2 = Vector3.new(mouse.Hit.x, pos1.y,mouse.Hit.z)
  568. bg.cframe = CFrame.new(pos1, pos2)
  569. wait()
  570. end
  571. game:service("Debris"):AddItem(bg, 0)
  572. end
  573.  
  574. bin.Selected:connect(function(mouse)
  575. BuildRocket()
  576. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  577. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  578. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  579. mouse.KeyUp:connect(function(key) onKeyUp(key) end)
  580. coroutine.resume(coroutine.create(FaceTarget), mouse)
  581. S1:Play()
  582. Fr.Visible = true
  583. end)
  584. bin.Deselected:connect(function()
  585. equiped = false
  586. Joint1:remove()
  587. Joint2:remove()
  588. LeftJoint.Part0 = bin.Parent.Parent.Character.Torso
  589. RightJoint.Part0 = bin.Parent.Parent.Character.Torso
  590. if bin.Parent.Parent.Character:findFirstChild("Left Arm") ~= nil then
  591. LeftJoint.Part1 = bin.Parent.Parent.Character:findFirstChild("Left Arm")
  592. end
  593. if bin.Parent.Parent.Character:findFirstChild("Right Arm") ~= nil then
  594. RightJoint.Part1 = bin.Parent.Parent.Character:findFirstChild("Right Arm")
  595. end
  596. for _, ooo in pairs(bin.Parent.Parent.Character:children()) do
  597. if ooo.className == "Model" and ooo.Name == "RocketDesign" then
  598. ooo:remove()
  599. end
  600. end
  601. Fr.Visible = false
  602. end)
Advertisement
Add Comment
Please, Sign In to add comment