Hi, I want 50% more cash on roblox for premium and gamepass. How can I do it, But it will check if it is gamepass or premium only once. In short, when the player enters the game only.
Script:
spawn(function()
while true do
wait(60)
Cash.Value = Cash.Value + 10
end
end)
Utilising the functions explained in this API, you can add some attributes to the players when they join the game which can be used to assess how much cash they get (simply adding an if statement, and if positive comparison multiply the amount by 1.5 will increase the amount by 50%).
You’re massively over complicating this request.
The code can be as simple as:
local CashReward = 10
if player.MembershipType == Enum.MembershipType.Premium or MarketplaceService:UserOwnsGamePassAsync(Player.UserId, GamepassID) then
CashReward = CashReward * 1.5
end
while wait(60) do
Cash.Value = Cash.Value + CashReward
end
Your solution checks (from the website) whether the player has premium every time the function is called, why not just do it once?
Consider the case of a Premium user who thinks they can purchase the gamepass to increase it further.
You can’t restrict who does and doesn’t purchase gamepasses, so you need to be careful about people purchasing something they don’t receive due to already having Premium.