Do you know how to make a leaderboard? If not, put this script into workspace:
1 | function playeradded(player) |
2 | Leader = Instance.new( "IntValue" ) |
4 | Leader.Name = "leaderstats" |
5 | P = Instance.new( "IntValue" ) |
9 | game.Players.PlayerAdded:connect(playeradded) |
I'll leave you with an on touch script. Put it into a part.
2 | player = game.Players:findFirstChild(hit.Parent.Name) |
4 | player.leaderstats.Points.Value = player.leaderstats.Points.Value+ 10 |
7 | script.Parent.Touched:connect(T) |
Also, for a cash GUI, put this script into a text label that's in a GUI that's in startergui.
2 | script.Parent.Text = script.Parent.Parent.Parent.Parent.leader stats.Points.Value.. "$" |
Hope this helped!
-ds