Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

GUI points system?

Asked by 10 years ago

So for a GUI there is a text that says the cash and everyone spawns with 0 cash "$0" so for that cash can I make it link to a leaderboard so once you earn a point on the leaderboard it also shows on the gui so you get like 5 points the gui will say "$5" and it updates to the players leaderstat

-- The cash is named "Points"

1add.Value  +1
2script.Parent.Text = "$"
0
Are you using Int Value? iNicklas 215 — 10y
0
Yes DiamondCookie2 0 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

Do you know how to make a leaderboard? If not, put this script into workspace:

1function playeradded(player)
2Leader=Instance.new("IntValue")
3Leader.Parent=player
4Leader.Name="leaderstats"
5P=Instance.new("IntValue")
6P.Parent=Leader
7P.Name="Points"
8end
9game.Players.PlayerAdded:connect(playeradded)

I'll leave you with an on touch script. Put it into a part.

1function T(hit)
2player=game.Players:findFirstChild(hit.Parent.Name)
3if player~=nil then
4player.leaderstats.Points.Value=player.leaderstats.Points.Value+10
5end
6           end
7script.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.

1while wait() do
2script.Parent.Text=script.Parent.Parent.Parent.Parent.leader stats.Points.Value.."$"
3end

Hope this helped!

-ds

Ad

Answer this question