Advertisement
Animescapetower

Nuke Rocket

Mar 14th, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.09 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. Sound1 = Instance.new("Sound")
  21. Sound2 = Instance.new("Sound")
  22. Part3 = Instance.new("Part")
  23. SpecialMesh4 = Instance.new("SpecialMesh")
  24. LocalScript5 = Instance.new("LocalScript")
  25. Script6 = Instance.new("Script")
  26. Script7 = Instance.new("Script")
  27. Script8 = Instance.new("Script")
  28. Part9 = Instance.new("Part")
  29. SpecialMesh10 = Instance.new("SpecialMesh")
  30. Part11 = Instance.new("Part")
  31. SpecialMesh12 = Instance.new("SpecialMesh")
  32. Part13 = Instance.new("Part")
  33. SpecialMesh14 = Instance.new("SpecialMesh")
  34. Part15 = Instance.new("Part")
  35. SpecialMesh16 = Instance.new("SpecialMesh")
  36. Part17 = Instance.new("Part")
  37. SpecialMesh18 = Instance.new("SpecialMesh")
  38. Model19 = Instance.new("Model")
  39. Sound20 = Instance.new("Sound")
  40. Sound21 = Instance.new("Sound")
  41. Script22 = Instance.new("Script")
  42. ObjectValue23 = Instance.new("ObjectValue")
  43. BodyGyro24 = Instance.new("BodyGyro")
  44. Script25 = Instance.new("Script")
  45. LocalScript26 = Instance.new("LocalScript")
  46. Tool0.Name = "Nuclear Missle"
  47. Tool0.Parent = mas
  48. Tool0.GripForward = Vector3.new(-1, 0, 0)
  49. Tool0.GripPos = Vector3.new(-1.89999998, -0.5, 0)
  50. Tool0.GripRight = Vector3.new(0, 0, -1)
  51. Sound1.Name = "Explosion"
  52. Sound1.Parent = Tool0
  53. Sound1.Pitch = 0.10000000149012
  54. Sound1.SoundId = "rbxasset://sounds/collide.wav"
  55. Sound1.Volume = 10
  56. Sound2.Name = "Swoosh"
  57. Sound2.Parent = Tool0
  58. Sound2.SoundId = "rbxasset://sounds/Rocket whoosh 01.wav"
  59. Sound2.Volume = 10
  60. Sound2.Looped = true
  61. Part3.Name = "Handle"
  62. Part3.Parent = Tool0
  63. Part3.BrickColor = BrickColor.new("Dark stone grey")
  64. Part3.Reflectance = 0.40000000596046
  65. Part3.Rotation = Vector3.new(-63.1999969, -89.9799957, -63.1999969)
  66. Part3.FormFactor = Enum.FormFactor.Plate
  67. Part3.Size = Vector3.new(8, 1.60000002, 1)
  68. Part3.CFrame = CFrame.new(46.4000015, 1.11000001, -15.8500004, 3.42282149e-08, 6.77513441e-08, -0.99999994, 1.21428911e-06, 1, 6.77513441e-08, 0.99999994, -1.21428911e-06, 3.42281297e-08)
  69. Part3.BottomSurface = Enum.SurfaceType.Smooth
  70. Part3.TopSurface = Enum.SurfaceType.Smooth
  71. Part3.Color = Color3.new(0.388235, 0.372549, 0.384314)
  72. Part3.Position = Vector3.new(46.4000015, 1.11000001, -15.8500004)
  73. Part3.Orientation = Vector3.new(0, -90, 0)
  74. Part3.Color = Color3.new(0.388235, 0.372549, 0.384314)
  75. SpecialMesh4.Parent = Part3
  76. SpecialMesh4.MeshId = "http://www.roblox.com/asset/?id=1030777"
  77. SpecialMesh4.Scale = Vector3.new(1.10000002, 1.20000005, 1.10000002)
  78. SpecialMesh4.TextureId = "http://www.roblox.com/asset/?id=1030776"
  79. SpecialMesh4.MeshType = Enum.MeshType.FileMesh
  80. SpecialMesh4.Scale = Vector3.new(1.10000002, 1.20000005, 1.10000002)
  81. LocalScript5.Name = "Local Gui"
  82. LocalScript5.Parent = Tool0
  83. table.insert(cors,sandbox(LocalScript5,function()
  84. local Tool = script.Parent;
  85.  
  86. enabled = true
  87. function onButton1Down(mouse)
  88. if not enabled then
  89. return
  90. end
  91.  
  92. enabled = false
  93. mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
  94.  
  95. wait(15)
  96. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  97. enabled = true
  98.  
  99. end
  100.  
  101. function onEquippedLocal(mouse)
  102.  
  103. if mouse == nil then
  104. print("Mouse not found")
  105. return
  106. end
  107.  
  108. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  109. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  110. end
  111.  
  112.  
  113. Tool.Equipped:connect(onEquippedLocal)
  114. end))
  115. Script6.Name = "RocketScript"
  116. Script6.Parent = Tool0
  117. table.insert(cors,sandbox(Script6,function()
  118. r = game:service("RunService")
  119.  
  120. shaft = script.Parent
  121. position = shaft.Position
  122.  
  123. script.Parent.Explosion.PlayOnRemove = true -- play explosion sound when projectile removed from game
  124.  
  125. function fly()
  126. direction = shaft.CFrame.lookVector
  127. position = position + direction * 3
  128. error = position - shaft.Position
  129. shaft.Velocity = 7*error
  130.  
  131. end
  132.  
  133. function blow()
  134.  
  135. swoosh:stop()
  136. explosion = Instance.new("Explosion")
  137. explosion.Position = shaft.Position
  138. explosion.BlastRadius = 10
  139. explosion.BlastPressure = 0.1
  140.  
  141.  
  142.  
  143. -- find instigator tag
  144. local creator = script.Parent:findFirstChild("creator")
  145. if creator ~= nil then
  146. explosion.Hit:connect(function(part, distance) onPlayerBlownUp(part, distance, creator) end)
  147. end
  148.  
  149. explosion.Parent = game.Workspace
  150. connection:disconnect()
  151. wait(.1)
  152. shaft:remove()
  153. end
  154.  
  155. function onPlayerBlownUp(part, distance, creator)
  156.  
  157. if part.Name == "Head" then
  158.  
  159. local humanoid = part.Parent.Humanoid
  160. tagHumanoid(humanoid, creator)
  161. end
  162. end
  163.  
  164. function tagHumanoid(humanoid, creator)
  165. -- tag does not need to expire iff all explosions lethal
  166.  
  167. if creator ~= nil then
  168. local new_tag = creator:clone()
  169. new_tag.Parent = humanoid
  170.  
  171. end
  172. end
  173.  
  174. function untagHumanoid(humanoid)
  175. if humanoid ~= nil then
  176. local tag = humanoid:findFirstChild("creator")
  177. if tag ~= nil then
  178.  
  179. tag.Parent = nil
  180. end
  181. end
  182. end
  183.  
  184. t, s = r.Stepped:wait()
  185.  
  186. swoosh = script.Parent.Swoosh
  187. swoosh:play()
  188.  
  189. d = t + 10.0 - s
  190. connection = shaft.Touched:connect(blow)
  191.  
  192. while t < d do
  193. fly()
  194. t = r.Stepped:wait()
  195. end
  196.  
  197. -- at max range
  198. script.Parent.Explosion.PlayOnRemove = false
  199. swoosh:stop()
  200. shaft:remove()
  201.  
  202. end))
  203. Script7.Name = "Server Launcher"
  204. Script7.Parent = Tool0
  205. table.insert(cors,sandbox(Script7,function()
  206.  
  207.  
  208. local Rocket = Instance.new("Part")
  209.  
  210. local Tool = script.Parent
  211.  
  212. Rocket.Locked = true
  213. Rocket.BackSurface = 3
  214. Rocket.BottomSurface = 3
  215. Rocket.FrontSurface = 3
  216. Rocket.LeftSurface = 3
  217. Rocket.RightSurface = 3
  218. Rocket.TopSurface = 3
  219. Rocket.Size = Vector3.new(1,1,4)
  220. Rocket.BrickColor = BrickColor.Random()
  221.  
  222. Tool.RocketScript:clone().Parent = Rocket
  223. Tool.Explosion:clone().Parent = Rocket
  224. Tool.Swoosh:clone().Parent = Rocket
  225. Tool.Disco:clone().Parent = Rocket
  226.  
  227. function fire(angle)
  228.  
  229. local vCharacter = Tool.Parent;
  230.  
  231. local vHandle = Tool:findFirstChild("Handle")
  232. if vHandle == nil then
  233. print("Handle not found")
  234. return
  235. end
  236.  
  237. local y = 0
  238. local x = math.cos(angle) * 7
  239. local z = math.sin(angle) * 7
  240. local launch = Vector3.new(x, y, z)
  241. local missile = Rocket:Clone()
  242. missile.CFrame = CFrame.new(vHandle.Position + launch, vHandle.Position + launch * 2)
  243.  
  244. local creator_tag = Instance.new("ObjectValue")
  245.  
  246. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  247.  
  248. if vPlayer == nil then
  249. print("Player not found")
  250. else
  251. if (vPlayer.Neutral == false) then -- nice touch
  252. missile.BrickColor = vPlayer.TeamColor
  253. end
  254. end
  255.  
  256. creator_tag.Value =vPlayer
  257. creator_tag.Name = "creator"
  258. creator_tag.Parent = missile
  259.  
  260. missile.RocketScript.Disabled = false
  261.  
  262. missile.Parent = game.Workspace
  263. end
  264.  
  265. function computeDirection(vec)
  266. local lenSquared = vec.magnitude * vec.magnitude
  267. local invSqrt = 1 / math.sqrt(lenSquared)
  268. return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
  269. end
  270.  
  271. Tool.Enabled = true
  272. function onActivated()
  273. if not Tool.Enabled then
  274. return
  275. end
  276.  
  277. Tool.Enabled = false
  278.  
  279. local character = Tool.Parent;
  280. local humanoid = character.Humanoid
  281. if humanoid == nil then
  282. print("Humanoid not found")
  283. return
  284. end
  285.  
  286. for i=0,200,10 do
  287. fire(i)
  288. end
  289.  
  290. wait(0)
  291. Tool.Enabled = true
  292. end
  293.  
  294.  
  295. script.Parent.Activated:connect(onActivated)
  296.  
  297.  
  298. end))
  299. Script8.Name = "qPerfectionWeld"
  300. Script8.Parent = Tool0
  301. table.insert(cors,sandbox(Script8,function()
  302. -- Created by Quenty (@Quenty, follow me on twitter).
  303. -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
  304. -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
  305.  
  306. --[[ INSTRUCTIONS
  307. - Place in the model
  308. - Make sure model is anchored
  309. - That's it. It will weld the model and all children.
  310.  
  311. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  312. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  313. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  314. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  315. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  316. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  317. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  318. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  319.  
  320. This script is designed to be used is a regular script. In a local script it will weld, but it will not attempt to handle ancestory changes.
  321. ]]
  322.  
  323. --[[ DOCUMENTATION
  324. - Will work in tools. If ran more than once it will not create more than one weld. This is especially useful for tools that are dropped and then picked up again.
  325. - Will work in PBS servers
  326. - Will work as long as it starts out with the part anchored
  327. - Stores the relative CFrame as a CFrame value
  328. - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
  329. - Utilizes a recursive algorith to find all parts in the model
  330. - Will reweld on script reparent if the script is initially parented to a tool.
  331. - Welds as fast as possible
  332. ]]
  333.  
  334. -- qPerfectionWeld.lua
  335. -- Created 10/6/2014
  336. -- Author: Quenty
  337. -- Version 1.0.3
  338.  
  339. -- Updated 10/14/2014 - Updated to 1.0.1
  340. --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
  341.  
  342. -- Updated 10/14/2014 - Updated to 1.0.2
  343. --- Fixed bug fix.
  344.  
  345. -- Updated 10/14/2014 - Updated to 1.0.3
  346. --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
  347.  
  348. local NEVER_BREAK_JOINTS = false -- If you set this to true it will never break joints (this can create some welding issues, but can save stuff like hinges).
  349.  
  350.  
  351. local function CallOnChildren(Instance, FunctionToCall)
  352. -- Calls a function on each of the children of a certain object, using recursion.
  353.  
  354. FunctionToCall(Instance)
  355.  
  356. for _, Child in next, Instance:GetChildren() do
  357. CallOnChildren(Child, FunctionToCall)
  358. end
  359. end
  360.  
  361. local function GetNearestParent(Instance, ClassName)
  362. -- Returns the nearest parent of a certain class, or returns nil
  363.  
  364. local Ancestor = Instance
  365. repeat
  366. Ancestor = Ancestor.Parent
  367. if Ancestor == nil then
  368. return nil
  369. end
  370. until Ancestor:IsA(ClassName)
  371.  
  372. return Ancestor
  373. end
  374.  
  375. local function GetBricks(StartInstance)
  376. local List = {}
  377.  
  378. -- if StartInstance:IsA("BasePart") then
  379. -- List[#List+1] = StartInstance
  380. -- end
  381.  
  382. CallOnChildren(StartInstance, function(Item)
  383. if Item:IsA("BasePart") then
  384. List[#List+1] = Item;
  385. end
  386. end)
  387.  
  388. return List
  389. end
  390.  
  391. local function Modify(Instance, Values)
  392. -- Modifies an Instance by using a table.
  393.  
  394. assert(type(Values) == "table", "Values is not a table");
  395.  
  396. for Index, Value in next, Values do
  397. if type(Index) == "number" then
  398. Value.Parent = Instance
  399. else
  400. Instance[Index] = Value
  401. end
  402. end
  403. return Instance
  404. end
  405.  
  406. local function Make(ClassType, Properties)
  407. -- Using a syntax hack to create a nice way to Make new items.
  408.  
  409. return Modify(Instance.new(ClassType), Properties)
  410. end
  411.  
  412. local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
  413. local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
  414.  
  415. local function HasWheelJoint(Part)
  416. for _, SurfaceName in pairs(Surfaces) do
  417. for _, HingSurfaceName in pairs(HingSurfaces) do
  418. if Part[SurfaceName].Name == HingSurfaceName then
  419. return true
  420. end
  421. end
  422. end
  423.  
  424. return false
  425. end
  426.  
  427. local function ShouldBreakJoints(Part)
  428. --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
  429. -- definitely some edge cases.
  430.  
  431. if NEVER_BREAK_JOINTS then
  432. return false
  433. end
  434.  
  435. if HasWheelJoint(Part) then
  436. return false
  437. end
  438.  
  439. local Connected = Part:GetConnectedParts()
  440.  
  441. if #Connected == 1 then
  442. return false
  443. end
  444.  
  445. for _, Item in pairs(Connected) do
  446. if HasWheelJoint(Item) then
  447. return false
  448. elseif not Item:IsDescendantOf(script.Parent) then
  449. return false
  450. end
  451. end
  452.  
  453. return true
  454. end
  455.  
  456. local function WeldTogether(Part0, Part1, JointType, WeldParent)
  457. --- Weld's 2 parts together
  458. -- @param Part0 The first part
  459. -- @param Part1 The second part (Dependent part most of the time).
  460. -- @param [JointType] The type of joint. Defaults to weld.
  461. -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
  462. -- @return The weld created.
  463.  
  464. JointType = JointType or "Weld"
  465. local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
  466.  
  467. local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
  468. Modify(NewWeld, {
  469. Name = "qCFrameWeldThingy";
  470. Part0 = Part0;
  471. Part1 = Part1;
  472. C0 = CFrame.new();--Part0.CFrame:inverse();
  473. C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
  474. Parent = Part1;
  475. })
  476.  
  477. if not RelativeValue then
  478. RelativeValue = Make("CFrameValue", {
  479. Parent = Part1;
  480. Name = "qRelativeCFrameWeldValue";
  481. Archivable = true;
  482. Value = NewWeld.C1;
  483. })
  484. end
  485.  
  486. return NewWeld
  487. end
  488.  
  489. local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
  490. -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
  491. -- @param MainPart The part to weld the model to (can be in the model).
  492. -- @param [JointType] The type of joint. Defaults to weld.
  493. -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
  494.  
  495. for _, Part in pairs(Parts) do
  496. if ShouldBreakJoints(Part) then
  497. Part:BreakJoints()
  498. end
  499. end
  500.  
  501. for _, Part in pairs(Parts) do
  502. if Part ~= MainPart then
  503. WeldTogether(MainPart, Part, JointType, MainPart)
  504. end
  505. end
  506.  
  507. if not DoNotUnanchor then
  508. for _, Part in pairs(Parts) do
  509. Part.Anchored = false
  510. end
  511. MainPart.Anchored = false
  512. end
  513. end
  514.  
  515. local function PerfectionWeld()
  516. local Tool = GetNearestParent(script, "Tool")
  517.  
  518. local Parts = GetBricks(script.Parent)
  519. local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or script.Parent:IsA("Model") and script.Parent.PrimaryPart or Parts[1]
  520.  
  521. if PrimaryPart then
  522. WeldParts(Parts, PrimaryPart, "Weld", false)
  523. else
  524. warn("qWeld - Unable to weld part")
  525. end
  526.  
  527. return Tool
  528. end
  529.  
  530. local Tool = PerfectionWeld()
  531.  
  532.  
  533. if Tool and script.ClassName == "Script" then
  534. --- Don't bother with local scripts
  535.  
  536. script.Parent.AncestryChanged:connect(function()
  537. PerfectionWeld()
  538. end)
  539. end
  540.  
  541. -- Created by Quenty (@Quenty, follow me on twitter).
  542.  
  543. end))
  544. Part9.Parent = Tool0
  545. Part9.BrickColor = BrickColor.new("Dark stone grey")
  546. Part9.FormFactor = Enum.FormFactor.Symmetric
  547. Part9.Size = Vector3.new(1, 1, 4)
  548. Part9.CFrame = CFrame.new(45.8700027, 1.11000037, -15.8500061, 1.00000012, 6.8934213e-08, 8.19519555e-14, -7.32670458e-08, 1, -2.132698e-07, -5.96047158e-08, 2.29058813e-07, 1)
  549. Part9.BottomSurface = Enum.SurfaceType.Smooth
  550. Part9.TopSurface = Enum.SurfaceType.Smooth
  551. Part9.Color = Color3.new(0.388235, 0.372549, 0.384314)
  552. Part9.Position = Vector3.new(45.8700027, 1.11000037, -15.8500061)
  553. Part9.Color = Color3.new(0.388235, 0.372549, 0.384314)
  554. SpecialMesh10.Parent = Part9
  555. SpecialMesh10.MeshId = "http://www.roblox.com/asset/?id=2251534"
  556. SpecialMesh10.Scale = Vector3.new(0.5, 0.5, 0.25)
  557. SpecialMesh10.TextureId = "http://none"
  558. SpecialMesh10.MeshType = Enum.MeshType.FileMesh
  559. SpecialMesh10.Scale = Vector3.new(0.5, 0.5, 0.25)
  560. Part11.Parent = Tool0
  561. Part11.BrickColor = BrickColor.new("Dark stone grey")
  562. Part11.FormFactor = Enum.FormFactor.Symmetric
  563. Part11.Size = Vector3.new(1, 1, 4)
  564. Part11.CFrame = CFrame.new(46.9700127, 1.11000037, -15.8500061, 1.00000012, 6.8934213e-08, 8.19519555e-14, -7.32670458e-08, 1, -2.132698e-07, -5.96047158e-08, 2.29058813e-07, 1)
  565. Part11.BottomSurface = Enum.SurfaceType.Smooth
  566. Part11.TopSurface = Enum.SurfaceType.Smooth
  567. Part11.Color = Color3.new(0.388235, 0.372549, 0.384314)
  568. Part11.Position = Vector3.new(46.9700127, 1.11000037, -15.8500061)
  569. Part11.Color = Color3.new(0.388235, 0.372549, 0.384314)
  570. SpecialMesh12.Parent = Part11
  571. SpecialMesh12.MeshId = "http://www.roblox.com/asset/?id=2251534"
  572. SpecialMesh12.Scale = Vector3.new(0.5, 0.5, 0.25)
  573. SpecialMesh12.TextureId = "http://none"
  574. SpecialMesh12.MeshType = Enum.MeshType.FileMesh
  575. SpecialMesh12.Scale = Vector3.new(0.5, 0.5, 0.25)
  576. Part13.Parent = Tool0
  577. Part13.BrickColor = BrickColor.new("Dark stone grey")
  578. Part13.FormFactor = Enum.FormFactor.Symmetric
  579. Part13.Size = Vector3.new(1, 1, 4)
  580. Part13.CFrame = CFrame.new(45.4700089, 1.39000022, -15.8500061, 1.00000036, 6.46013731e-08, -5.96045453e-08, -7.75998856e-08, 1, -1.97480787e-07, -1.19209346e-07, 2.44847826e-07, 1)
  581. Part13.BottomSurface = Enum.SurfaceType.Smooth
  582. Part13.TopSurface = Enum.SurfaceType.Smooth
  583. Part13.Color = Color3.new(0.388235, 0.372549, 0.384314)
  584. Part13.Position = Vector3.new(45.4700089, 1.39000022, -15.8500061)
  585. Part13.Color = Color3.new(0.388235, 0.372549, 0.384314)
  586. SpecialMesh14.Parent = Part13
  587. SpecialMesh14.MeshId = "http://www.roblox.com/asset/?id=2251534"
  588. SpecialMesh14.Scale = Vector3.new(0.5, 0.5, 0.25)
  589. SpecialMesh14.TextureId = "http://none"
  590. SpecialMesh14.MeshType = Enum.MeshType.FileMesh
  591. SpecialMesh14.Scale = Vector3.new(0.5, 0.5, 0.25)
  592. Part15.Parent = Tool0
  593. Part15.BrickColor = BrickColor.new("Dark stone grey")
  594. Part15.FormFactor = Enum.FormFactor.Symmetric
  595. Part15.Size = Vector3.new(1, 1, 4)
  596. Part15.CFrame = CFrame.new(47.2500153, 1.43000019, -15.8500061, 1.00000012, 6.8934213e-08, 8.19519555e-14, -7.32670458e-08, 1, -2.132698e-07, -5.96047158e-08, 2.29058813e-07, 1)
  597. Part15.BottomSurface = Enum.SurfaceType.Smooth
  598. Part15.TopSurface = Enum.SurfaceType.Smooth
  599. Part15.Color = Color3.new(0.388235, 0.372549, 0.384314)
  600. Part15.Position = Vector3.new(47.2500153, 1.43000019, -15.8500061)
  601. Part15.Color = Color3.new(0.388235, 0.372549, 0.384314)
  602. SpecialMesh16.Parent = Part15
  603. SpecialMesh16.MeshId = "http://www.roblox.com/asset/?id=2251534"
  604. SpecialMesh16.Scale = Vector3.new(0.5, 0.5, 0.25)
  605. SpecialMesh16.TextureId = "http://none"
  606. SpecialMesh16.MeshType = Enum.MeshType.FileMesh
  607. SpecialMesh16.Scale = Vector3.new(0.5, 0.5, 0.25)
  608. Part17.Name = "MissleLaunched"
  609. Part17.Parent = Tool0
  610. Part17.BrickColor = BrickColor.new("Dark stone grey")
  611. Part17.FormFactor = Enum.FormFactor.Symmetric
  612. Part17.Size = Vector3.new(1, 1, 4)
  613. Part17.CFrame = CFrame.new(46.4000168, 1.5, -17.9800167, 1.00000012, 6.8934213e-08, 8.19519555e-14, -7.32670458e-08, 1, -2.132698e-07, -5.96047158e-08, 2.29058813e-07, 1)
  614. Part17.BottomSurface = Enum.SurfaceType.Smooth
  615. Part17.TopSurface = Enum.SurfaceType.Smooth
  616. Part17.Color = Color3.new(0.388235, 0.372549, 0.384314)
  617. Part17.Position = Vector3.new(46.4000168, 1.5, -17.9800167)
  618. Part17.Color = Color3.new(0.388235, 0.372549, 0.384314)
  619. SpecialMesh18.Parent = Part17
  620. SpecialMesh18.MeshId = "http://www.roblox.com/asset/?id=2251534"
  621. SpecialMesh18.Scale = Vector3.new(0.600000024, 0.600000024, 0.600000024)
  622. SpecialMesh18.TextureId = "http://none"
  623. SpecialMesh18.VertexColor = Vector3.new(0.600000024, 0.600000024, 0.600000024)
  624. SpecialMesh18.MeshType = Enum.MeshType.FileMesh
  625. SpecialMesh18.Scale = Vector3.new(0.600000024, 0.600000024, 0.600000024)
  626. Model19.Name = "BombScale"
  627. Model19.Parent = Tool0
  628. Sound20.Name = "Explosion"
  629. Sound20.Parent = Model19
  630. Sound20.SoundId = "rbxasset://sounds/collide.wav"
  631. Sound20.Volume = 1
  632. Sound20.PlayOnRemove = true
  633. Sound21.Name = "Swoosh"
  634. Sound21.Parent = Model19
  635. Sound21.SoundId = "rbxasset://sounds/Rocket whoosh 01.wav"
  636. Sound21.Volume = 0.69999998807907
  637. Sound21.Looped = true
  638. Script22.Name = "RocketScript"
  639. Script22.Parent = Model19
  640. table.insert(cors,sandbox(Script22,function()
  641. r = game:service("RunService")
  642.  
  643. shaft = script.Parent
  644. position = shaft.Position
  645.  
  646. script.Parent.Explosion.PlayOnRemove = true -- play explosion sound when projectile removed from game
  647.  
  648. function fly()
  649. direction = shaft.CFrame.lookVector
  650. position = position + direction * 5
  651. error = position - shaft.Position
  652. shaft.Velocity = 7*error
  653. end
  654.  
  655. function blow()
  656. swoosh:stop()
  657. explosion = Instance.new("Explosion")
  658. explosion.BlastRadius = 25
  659. explosion.BlastPressure = 10000000 -- these are really wussy units
  660. explosion.Position = shaft.Position
  661.  
  662.  
  663. -- find instigator tag
  664. local creator = script.Parent:findFirstChild("creator")
  665. if creator ~= nil then
  666. explosion.Hit:connect(function(part, distance) onPlayerBlownUp(part, distance, creator) end)
  667. end
  668.  
  669. explosion.Parent = game.Workspace
  670. connection:disconnect()
  671. wait(.1)
  672. shaft:remove()
  673. end
  674.  
  675. function onPlayerBlownUp(part, distance, creator)
  676.  
  677. if part.Name == "Head" then
  678.  
  679. local humanoid = part.Parent.Humanoid
  680. tagHumanoid(humanoid, creator)
  681. end
  682. end
  683.  
  684. function tagHumanoid(humanoid, creator)
  685. -- tag does not need to expire iff all explosions lethal
  686.  
  687. if creator ~= nil then
  688. local new_tag = creator:clone()
  689. new_tag.Parent = humanoid
  690.  
  691. end
  692. end
  693.  
  694. function untagHumanoid(humanoid)
  695. if humanoid ~= nil then
  696. local tag = humanoid:findFirstChild("creator")
  697. if tag ~= nil then
  698.  
  699. tag.Parent = nil
  700. end
  701. end
  702. end
  703.  
  704. t, s = r.Stepped:wait()
  705.  
  706. swoosh = script.Parent.Swoosh
  707. swoosh:play()
  708.  
  709. d = t + 100.0 - s
  710. connection = shaft.Touched:connect(blow)
  711.  
  712. while t < d do
  713. fly()
  714. t = r.Stepped:wait()
  715. end
  716.  
  717.  
  718.  
  719. end))
  720. ObjectValue23.Name = "creator"
  721. ObjectValue23.Parent = Model19
  722. BodyGyro24.Parent = Model19
  723. BodyGyro24.maxTorque = Vector3.new(0, 0, 0)
  724. BodyGyro24.MaxTorque = Vector3.new(0, 0, 0)
  725. Script25.Name = "Disco"
  726. Script25.Parent = Tool0
  727. table.insert(cors,sandbox(Script25,function()
  728.  
  729.  
  730. local dance = script.Parent
  731.  
  732. while true do
  733.  
  734. dance.BrickColor = BrickColor.new("Really red")
  735. wait(0.25)
  736. dance.BrickColor = BrickColor.new("New Yeller")
  737. wait(0.25)
  738. dance.BrickColor = BrickColor.new("Lime green")
  739. wait(0.25)
  740. dance.BrickColor = BrickColor.new("Toothpaste")
  741. wait(0.25)
  742. dance.BrickColor = BrickColor.new("Really blue")
  743. wait(0.25)
  744. dance.BrickColor = BrickColor.new("Royal purple")
  745. wait(0.25)
  746. dance.BrickColor = BrickColor.new("Hot pink")
  747. wait(0.25)
  748. end
  749.  
  750. end))
  751. LocalScript26.Name = "Rocket Thingy"
  752. LocalScript26.Parent = Tool0
  753. table.insert(cors,sandbox(LocalScript26,function()
  754. --Fernan, there you got, create the animation,
  755. --import it to roblox website, then remplace the ID (After ?id=) then set the key for it.
  756.  
  757. local player = game.Players.LocalPlayer
  758. local humanoid = player.Character.Humanoid
  759. local mouse = player:GetMouse()
  760.  
  761.  
  762.  
  763. mouse.KeyDown:connect(function(key)
  764. if key == "z" then
  765. script.Parent.BombScale.Explosion.Parent = script.Parent.MissleLaunched
  766. script.Parent.BombScale.Swoosh.Parent = script.Parent.MissleLaunched
  767. script.Parent.BombScale.RocketScript.Parent = script.Parent.MissleLaunched
  768. script.Parent.BombScale.creator.Parent = script.Parent.MissleLaunched
  769. script.Parent.BombScale.BodyGyro.Parent = script.Parent.MissleLaunched
  770. wait(2)
  771. script.Parent.BombScale:Destroy()
  772. end
  773. end)
  774.  
  775. --/Superstheme\--
  776. end))
  777. for i,v in pairs(mas:GetChildren()) do
  778. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  779. pcall(function() v:MakeJoints() end)
  780. end
  781. mas:Destroy()
  782. for i,v in pairs(cors) do
  783. spawn(function()
  784. pcall(v)
  785. end)
  786. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement