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

How do i make a script so that if you buy a gamepass you get infinate coins?

i was messing around with scripting and i just made this for fun!

--me attempting to add a infinite money gamepass
local id = PUT_GAMEPASS_ID
 
game.Players.PlayerAdded:Connect(function(player)
    if game:GetService("GamePassService"):PlayerHasPass(player, id) then 
    Coin.Value = 1234565432123456654321345662345653234543234123456789476544567656783456787654345666
    else
       Coin.NilValue = 0 + 25
       wait(86400)
       Coin.Value + 25
       print(Thanks Player.Name for playing the beta!)
    end
end)

8 comments

0

why does my script look so messed up?

0

You need to use code blocks

0

how do i change it

0

I'll edit it for you

0

thx

0

So, what's wrong with your script?

0

Can you tell me if this helps? https://anotepad.com/notes/kykg6b4t

0

ok thx ill try it soon

1 answer

✓ Accepted answer
local id = -- Put your gamePassId here..

local infiniteCash = 99999999*99999999

game.Players.PlayerAdded:Connect(function(player)
    if game:GetService("GamePassService"):PlayerHasPass(player, id) then 
    Coin.Value = infiniteCash
    else
       Coin.NilValue = 0 + 25
       wait(86400)
       Coin.Value + 25
       print("Thanks "..player.Name.." for playing the beta!")
    end
end)

Also, your wait(86400) which is 24 hours, won't work unless the player stays the whole 24 hours in-game which of course, will never happen.You need to use os. time and your string concatenation was completely wrong but I fixed it for you.

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