if players[1]:IsInGroup(5732076) then
print("group player")
-- group player
players[1].leaderstats.Cash.Value = players[1].leaderstats.Cash.Value + 75
players[1].leaderstats.Wins.Value = players[1].leaderstats.Wins.Value + 1
elseif players[1].MembershipType == Enum.MembershipType.Premium then
print("premium player")
-- premium player
players[1].leaderstats.Cash.Value = players[1].leaderstats.Cash.Value + 100
players[1].leaderstats.Wins.Value = players[1].leaderstats.Wins.Value + 1
else
-- normal player
players[1].leaderstats.Cash.Value = players[1].leaderstats.Cash.Value + Reward
players[1].leaderstats.Wins.Value = players[1].leaderstats.Wins.Value + 1
end
COMMUNITY QUESTION
Why is my script not detecting if its a premium player or not?
1 answer
If they are in the group, it won't detect if they have premium too. Realistically you should be putting two if statements to detect if a player is in both.
if players[1]:IsInGroup(5732076) then
-- do stuff here
end
if players[1].membershipType == Enum.MembershipType == Enum.MembershipType.Premium then
-- do stuff here
end
The way you've coded it is telling the script if they're in the group, ignore the bonus for premium. Hence the 'elseif'.
This discussion is preserved as it was. New answers, comments, and votes are closed.
