Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago
Edited by Leamir 4 years ago

Please encode Lua code in the Lua block code tag (look for the Lua icon in the editor).

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)
0
why does my script look so messed up? rainbowslime242 12 — 4y
0
You need to use code blocks Leamir 3138 — 4y
0
how do i change it rainbowslime242 12 — 4y
0
I'll edit it for you Leamir 3138 — 4y
View all comments (4 more)
0
thx rainbowslime242 12 — 4y
0
So, what's wrong with your script? cucucu0001 35 — 4y
0
Can you tell me if this helps? https://anotepad.com/notes/kykg6b4t TheWaildug 55 — 4y
0
ok thx ill try it soon rainbowslime242 12 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
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.

Ad

Answer this question