I'm new to scripting and I was wondering how I would script a badge to award players when they acquired a certain amount of cash in the game. I know it should use an If statement but I'm not sure how. I was thinking on the lines of
local badgeID = 111111
if player.leaderstats.cash = 100000 do
badgeservice:Awardbadge(p.userid, badgeID)
endend
If someone could lead me in the right direction that would be great.
