Advertisement
KINGOFCOOL

Untitled

Jan 11th, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 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 = "Sphere"
  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("Navy blue")
  21. Prt.Transparency = 1
  22. LaserOn = false
  23. ExpSize = 2
  24. Pressure = 500000
  25. function Laserr()
  26. MousePos = Mouse.Hit.p
  27. PrtPos = Prt.Position
  28. Dis = (MousePos-PrtPos).magnitude
  29. Laser = Instance.new("Part", Workspace)
  30. Laser.BrickColor = BrickColor.new("Navy blue")
  31. Laser.Anchored = true
  32. Laser.TopSurface = "Smooth"
  33. Laser.FormFactor = "Custom"
  34. Laser.Size = Vector3.new(0,0,Dis)
  35. Laser.CFrame = CFrame.new(MousePos,PrtPos)*CFrame.new(0.4,0.4,-Dis/2)
  36. Laser.BottomSurface = "Smooth"
  37. Laser.CanCollide = false
  38. while LaserOn == true do
  39. wait()
  40. if Mouse.Target ~= nil then
  41. if Mouse.Target ~= Laser and Mouse.Target.Name ~= "Base" then
  42. Mouse.Target.Anchored = false
  43. end
  44. end
  45. if Prt:findFirstChild("Weld") == false then
  46. PrtW = Instance.new("ManualWeld", Character)
  47. PrtW.Part0 = Prt
  48. PrtW.Part1 = Character.Head
  49. PrtW.C0 = CFrame.new(0,-6,0)
  50. end
  51. Prt.BrickColor = BrickColor.new("Navy blue")
  52. Prt.Transparency = 0
  53. MousePos = Mouse.Hit.p
  54. PrtPos = Prt.Position
  55. Dis = (MousePos-PrtPos).magnitude
  56. Laser.Size = Vector3.new(0,0,Dis)
  57. Laser.CFrame = CFrame.new(MousePos,PrtPos)*CFrame.new(0,0,-Dis/2)
  58. Blst = Instance.new("Explosion", Workspace)
  59. Blst.BlastRadius = ExpSize
  60. Blst.BlastPressure = Pressure
  61. Blst.Position = MousePos
  62. end
  63. Laser:Destroy()
  64. end
  65. Mouse.Button1Down:connect(function()
  66. LaserOn = true
  67. print("Laser on")
  68. Laserr()
  69. end)
  70. Mouse.Button1Up:connect(function()
  71. print("Laser off")
  72. LaserOn = false
  73. wait()
  74. Prt.Transparency = 1
  75. end)
  76. Player.Chatted:connect(function(chat)
  77. if (string.sub(chat,1,5) == "size/") then
  78. ExpSize = (string.sub(chat,6))
  79. end
  80. if (string.sub(chat,1,9) == "pressure/") then
  81. Pressure = (string.sub(chat,10))
  82. end
  83. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement