Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player = game.Players.LocalPlayer
- repeat wait() until player.Character
- local tool = script.Parent
- local myhumanoid = player.Character.Humanoid
- local gaster = script.Parent.handle
- local aim = script.Parent.shoot
- enable = true
- cooldown = 1
- function fire(pos)
- local beam = game.Lighting.beam:Clone()
- beam.Anchored = true
- beam.Parent = game.Workspace
- beam.CanCollide = false
- beam.CFrame = aim.CFrame
- local s = Instance.new("Sound")
- s.Name = "Blast"
- s.SoundId = "http://www.roblox.com/asset/?id=340722848"
- s.Volume = 1
- s.Pitch = 3
- s.Looped = false
- s.Parent = gaster
- s:Play()
- beam.Touched:connect(function(hit)
- if hit.Parent:FindFirstChild("Humanoid") and hit.Parent:FindFirstChild("Humanoid") ~= myhumanoid then
- hit.Parent.TakeDamage(1)
- wait(0.1)
- hit.Parent.TakeDamage(1)
- wait(0.1)
- hit.Parent.TakeDamage(1)
- wait(0.1)
- hit.Parent.TakeDamage(1)
- wait(0.1)
- hit.Parent.TakeDamage(1)
- wait(0.1)
- hit.Parent.TakeDamage(1)
- wait(0.1)
- hit.Parent.TakeDamage(1)
- fire:Destroy()
- end
- spawn(function()
- wait(2)
- fire:Destroy()
- end)
- tool.Equipped:connect(function(mouse)
- mouse.Button1Down:connect(function()
- if enable then
- enable = false
- fire(mouse.Hit.p)
- wait(0.2)
- enable = true
- end
- end)
- end)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement