Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local CanShoot = nil
- local DamagePlayerInShoot = nil
- local CanStart = nil
- local Reload = false
- local Ammo = script.Parent:WaitForChild("Ammo")
- local MaxAmmo = script.Parent:WaitForChild("MaxAmmo")
- local FirePart = script.Parent.Parent.FirePart
- local Damage = script.Parent.Damage
- local ShootEvent = script.Parent.Shoot
- local Character = game.Players.LocalPlayer.Character
- print("Client Loaded")
- function ReloadFunc()
- Reload = true
- wait(1)
- MaxAmmo = script.Parent.MaxAmmo
- Reload = false
- end
- function Shoot()
- CanStart = true
- DamagePlayerInShoot = true
- if CanStart then
- wait()
- Ammo = script.Parent.Ammo.Value * -1
- end
- if CanStart and DamagePlayerInShoot then
- ShootEvent:FireServer()
- wait()
- Damage:FireServer(10,Character.Humanoid)
- end
- end
- script.Parent.Parent.Equipped:Connect(function(Mouse)
- script.Parent.Parent.Activated:Connect(function()
- Mouse.Button1Down:Connect(function()
- Shoot()
- end)
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment