Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I make a Group Rank give starter cash in game? This is my current script.

Which only says the players rank on the Leaderboard

local GroupID = 2972223 --Group ID of DarkGames™

game.Players.PlayerAdded:connect(function(player)
	local stats = Instance.new("IntValue", player)
	stats.Name = "leaderstats"
	
	local RankDisplay = Instance.new("StringValue", stats)
	RankDisplay.Name = "Ranks"
	RankDisplay.Value = player:GetRoleInGroup(GroupID)
end)

2 comments

0

Are you suggesting we add this feature for you or rather you have evidence of attempting this sort of script yourself?

0

Anyway, you would need to compare the values returned from GetRankInGroup and add the value for cash.

1 answer

✓ Accepted answer

Here is a script that depending on your rank in the group it gives you cash.

local GroupID =  2972223 --Group ID of DarkGames™

game.Players.PlayerAdded:connect(function(player)
    local stats = Instance.new("IntValue", player)
    stats.Name = "leaderstats"

    local RankDisplay = Instance.new("StringValue", stats)
    RankDisplay.Name = "Ranks"
    RankDisplay.Value = player:GetRoleInGroup(GroupID)

	local Money = Instance.new("IntValue", stats)
	Money.Name = "Money"
	Money.Value = 0

	if RankDisplay.Value == "RANK" then
		Money.Value = Money.Value + 150
	elseif RankDisplay.Value ~= "RANK" then
		Money.Value = Money.Value
	end
end)

1 comment

0

Thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.