Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- made by ihab020920077
- -- variables
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- local tool = Instance.new("Tool", player.Backpack)
- local handle = Instance.new("Part", tool)
- local shoot = Instance.new("RemoteEvent", game.ReplicatedStorage)
- shoot.Name = "shoot"
- handle.Name = "Handle"
- handle.Size = Vector3.new(1, 1, 1)
- tool.Name = "Poop gun"
- equipped = false
- -- Remote controllers
- shoot.OnClientEvent:Connect(function()
- if equipped == true then
- local poop = Instance.new("Part", game.Workspace)
- local poopsound = Instance.new("Sound", handle)
- poopsound.SoundId = "rbxassetid://357613509"
- poopsound.Playing = true
- poop.BrickColor = BrickColor.new("Brown")
- poop.Size = handle.Size
- poop.Material = Enum.Material.Concrete
- poop.Shape = "Ball"
- poop.Position = mouse.Hit.Position
- poop.Anchored = true
- if mouse.Target.Parent:FindFirstChild("Humanoid") then
- mouse.Target.Parent:FindFirstChild("Humanoid").Health = 0
- wait(1)
- poopsound:Destroy()
- poop:Destroy()
- end
- if not mouse.Target.Parent:FindFirstChild("Humanoid") then
- wait(1)
- poopsound:Destroy()
- poop:Destroy()
- end
- end
- end)
- -- events listeners
- mouse.Button1Down:connect(function()
- shoot:FireAllClients()
- end)
- tool.Equipped:connect(function()
- equipped = true
- end)
- tool.Unequipped:connect(function()
- equipped = false
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement