Do you know how to make a leaderboard? If not, put this script into workspace:
function playeradded(player)
Leader=Instance.new("IntValue")
Leader.Parent=player
Leader.Name="leaderstats"
P=Instance.new("IntValue")
P.Parent=Leader
P.Name="Points"
end
game.Players.PlayerAdded:connect(playeradded)
I'll leave you with an on touch script. Put it into a part.
function T(hit)
player=game.Players:findFirstChild(hit.Parent.Name)
if player~=nil then
player.leaderstats.Points.Value=player.leaderstats.Points.Value+10
end
end
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.
while wait() do
script.Parent.Text=script.Parent.Parent.Parent.Parent.leader stats.Points.Value.."$"
end
Hope this helped!
-ds
2 comments
Are you using Int Value?
Yes