local tool = script.Parent
tool.Activated:Connect(function()
print("Игрок атакует")
end)local debounce = false
script.Parent.Handle.Touched:Connect(function(hit)
if debounce then return end
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then
debounce = true
hum:TakeDamage(25)
wait(1)
debounce = false
end
end)local tool = script.Parent
tool.Activated:Connect(function()
local bullet = Instance.new("Part")
bullet.Size = Vector3.new(0.5,0.5,0.5)
bullet.Position = tool.Handle.Position
bullet.Velocity = tool.Handle.CFrame.LookVector * 100
bullet.Parent = workspace
bullet.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then
hum:TakeDamage(15)
bullet:Destroy()
end
end)
end)game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
hum.MaxHealth = 100
hum.Health = 100
end)
end)game.Players.PlayerAdded:Connect(function(player)
local stats = Instance.new("Folder")
stats.Name = "leaderstats"
stats.Parent = player
local kills = Instance.new("IntValue")
kills.Name = "Kills"
kills.Value = 0
kills.Parent = stats
end)game.Players.RespawnTime = 5script.Parent.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then
hum.Health = hum.MaxHealth
end
end)