This is compressed from a larger script I made a while ago, but I think it works.
game.Players.ChildAdded:connect(function(player)
local streak = Instance.new("IntValue", player)
streak.Name = "streak"
streak.Value = 0
local deathStreak = Instance.new("IntValue", player)
deathStreak.Name = "DeathStreak"
deathStreak.Value = 0
kills.Changed:connect(function()
player.streak.Value = player.streak.Value + 1
player.DeathStreak.Value = 0
killDeathStreak(player, streak.Value)
end)
while true do
if player.Character ~= nil then break end
wait(1)
end
player.Character.Humanoid.Died:connect(function()
player.DeathStreak.Value = player.DeathStreak.Value + 1
player.streak.Value = 0
end)
player.CharacterAdded:connect(function(character)
-- need to wait for character so that the bonus actually does something
killDeathStreak(player, player.DeathStreak.Value)
end)
end)
function killDeathStreak(player, streak)
-- put in whatever you want as the bonus
if streak == 3 then
elseif streak == 5 then
elseif streak == 7 then
elseif streak == 10 then
streak = 0
end
end