I have created a leaderboard that contains a "CASH" currency, basically a person gets cash per kill, but what I have failed to do is a add a K/D to the leaderboard as well and I am not very good at scripting and need help with adding that, if you could please guide me on how to do it I would appreciate it. Another thing I need help with is making a script that would announce a winner once the Team Death Match either reaches the total of 100 kills limit for the team or when the round timer expires and the team with the most kills wins, I would like for the game to reset the players K/D at the end of each round but, not their cash and have their cash saved for in-game purchases to buy weapons and other game related content.
my last post was removed I am assuming the moderators must've thought I was expecting/demanding people to do the script for me, but I would like some assistance with it instead. I need a guide to teach me how to do it. below is the leaderboard script I have learned to write and it works perfectly with the Cash currency.
game.Players.PlayerAdded:connect(function(player)
local folder = Instance.new("Folder") folder.Name = "leaderstats" folder.Parent = player
local cash = Instance.new("IntValue") cash.Name = "Cash" ----- Name of currency cash.Value = 0 cash.Parent = folder
player.CharacterAdded:Connect(function(character) character.Humanoid.Died:Connect(function() local tag = character.Humanoid:FindFirstChild("creator") if tag ~= nil then local player = tag.Value local bounty = 20
local leaderstats = player:WaitForChild("leaderstats")
leaderstats.Cash.Value = leaderstats.Cash.Value + bounty
end
end)
end) end)

1 comment
Add me on roblox, 'pw8g'. I'll help you. xD.