Advertisement
KINGOFCOOL

Untitled

Jan 11th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. -- Localscript, JUST RUN IT
  2. -- Say size/NUMBERHERE to change the size of the fire
  3. -- Say pressure/NUMBERHERE to change the power of the explosion, default is 5,000,000 pressure
  4.  
  5. Player = game.Players.LocalPlayer
  6. Mouse = Player:GetMouse()
  7. Character = Player.Character
  8. Prt = Instance.new("Part", Character)
  9. Prt.FormFactor = "Custom"
  10. Prt.Size = Vector3.new(2,2,2)
  11. PrtM = Instance.new("SpecialMesh", Prt)
  12. PrtM.MeshType = "Cylinder"
  13. Prt.TopSurface = "Smooth"
  14. Prt.BottomSurface = "Smooth"
  15. Prt:breakJoints()
  16. PrtW = Instance.new("ManualWeld", Character)
  17. PrtW.Part0 = Prt
  18. PrtW.Part1 = Character.Head
  19. PrtW.C0 = CFrame.new(0,-6,0)
  20. Prt.BrickColor = BrickColor.new("Bright red")
  21. wait(0.1)
  22. Prt.BrickColor = BrickColor.new("Navy blue")
  23. Prt.Transparency = 1
  24. LaserOn = false
  25. ExpSize = 2
  26. Pressure = 500000
  27. function Laserr()
  28. MousePos = Mouse.Hit.p
  29. PrtPos = Prt.Position
  30. Dis = (MousePos-PrtPos).magnitude
  31. Laser = Instance.new("Part", Workspace)
  32. Laser.BrickColor = BrickColor.new("Magenta")
  33. Laser.Anchored = true
  34. Laser.TopSurface = "Smooth"
  35. Laser.FormFactor = "Custom"
  36. Laser.Size = Vector3.new(0,0,Dis)
  37. Laser.CFrame = CFrame.new(MousePos,PrtPos)*CFrame.new(0.4,0.4,-Dis/2)
  38. Laser.BottomSurface = "Smooth"
  39. Laser.CanCollide = false
  40. while LaserOn == true do
  41. wait()
  42. if Mouse.Target ~= nil then
  43. if Mouse.Target ~= Laser and Mouse.Target.Name ~= "Base" then
  44. Mouse.Target.Anchored = false
  45. end
  46. end
  47. if Prt:findFirstChild("Weld") == false then
  48. PrtW = Instance.new("ManualWeld", Character)
  49. PrtW.Part0 = Prt
  50. PrtW.Part1 = Character.Head
  51. PrtW.C0 = CFrame.new(0,-6,0)
  52. end
  53. Prt.BrickColor = BrickColor.new("Bright red")
  54. wait(0.1)
  55. Prt.BrickColor = BrickColor.new("Navy blue")
  56. Prt.Transparency = 0
  57. MousePos = Mouse.Hit.p
  58. PrtPos = Prt.Position
  59. Dis = (MousePos-PrtPos).magnitude
  60. Laser.Size = Vector3.new(0,0,Dis)
  61. Laser.CFrame = CFrame.new(MousePos,PrtPos)*CFrame.new(0,0,-Dis/2)
  62. Blst = Instance.new("Explosion", Workspace)
  63. Blst.BlastRadius = ExpSize
  64. Blst.BlastPressure = Pressure
  65. Blst.Position = MousePos
  66. end
  67. Laser:Destroy()
  68. end
  69. Mouse.Button1Down:connect(function()
  70. LaserOn = true
  71. print("Laser on")
  72. Laserr()
  73. end)
  74. Mouse.Button1Up:connect(function()
  75. print("Laser off")
  76. LaserOn = false
  77. wait()
  78. Prt.Transparency = 1
  79. end)
  80. Player.Chatted:connect(function(chat)
  81. if (string.sub(chat,1,5) == "size/") then
  82. ExpSize = (string.sub(chat,6))
  83. end
  84. if (string.sub(chat,1,9) == "pressure/") then
  85. Pressure = (string.sub(chat,10))
  86. end
  87. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement