How to give admin to premium users

I’m trying to earn more with premium payouts by giving admin to premium users and I was wondering how I script that into hd admin or any other admin systems

I would personally highly recommend you do not give admin to people just due to them having premium however if you really wanted to you could do plr.MembershipType to see if they have premium or not.

https://developer.roblox.com/en-us/api-reference/property/Player/MembershipType

if <Player>.MembershipType == Enum.MembershipType.Premium then
-- Whatever you want to do
end
local success,result = pcall(function()
    return Player.MembershipType
end)

if success then
   if result == Enum.MembershipType.Premium then
     --give admin
   end
end

No reason to use pcall here. The previous reply says it all.

1 Like

https://developer.roblox.com/en-us/api-reference/event/Players/PlayerMembershipChanged
Could also incorporate this event/signal to dynamically reward users that purchase a premium membership while in the experience.

1 Like

I know there is a way to award users with an Admin rank in HD Admin via a pad you step on - I’ve seen it be done before in several games. Maybe you could clone the pad (make it transparent) and parent it to the player so they will touch it and receive admin then remove it to prevent others from getting it?

Edit: Don’t parent the block - instead, use PivotTo to teleport the pad to them