โ† Back to all scripts

Give Cash on Kill

Award the killer cash when they eliminate another player.

EconomyBeginnerServerScriptService
give-cash-on-kill.lua
-- Give Cash on Kill
local CASH_REWARD = 10

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        local humanoid = character:WaitForChild("Humanoid")
        humanoid.Died:Connect(function()
            local tag = humanoid:FindFirstChild("creator")
            if not tag or not tag.Value or tag.Value == player then return end
            local cash = tag.Value.leaderstats and tag.Value.leaderstats:FindFirstChild("Cash")
            if cash then cash.Value += CASH_REWARD end
        end)
    end)
end)
Related scripts in Economy
Shop SystemIntermediate โ†’Inventory SystemIntermediate โ†’
Something broken or not working?
๐Ÿ”ง Try the AI Script Fixer โ†’