Leaderboards
https://www.lukeko.com/33/leaderboards 0ServerScriptService/PlayerSetup
local function onPlayerJoin(player)
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"
local gold = Instance.new("IntValue", leaderstats)
gold.Name = "Gold"
gold.Value = 0
local kills = Instance.new("IntValue", leaderstats)
kills.Name = "Kills"
kills.Value = 0
end
game.Players.PlayerAdded:Connect(onPlayerJoin)
- Add a part
- Rename it to "Gold"
- add a ClickDetector
- add the following Script
Workspace/Gold/Script
local Part = script.Parent
local function onClick(player)
local playerGold = player.leaderstats.Gold
playerGold.Value = playerGold.Value + 1
end
Part.ClickDetector.MouseClick:Connect(onClick)