i want to make a game pass currency so when they bye more cash with robux it add it on ther cash in game so like if i have 250 and i bought 200 cash for 50 robux i would have 450?
COMMUNITY QUESTION
hey guys i have been working on this all day my head hurts?
2 answers
If you have a Value Called "Cash" then simply do
Player.leaderstats.Cash.Value = Player.leaderstats.Cash.Value + 200
or
Cash = Player.leaderstats.Cash
Amount = 200
Cash.Value = Cash.Value + Amount
3 comments
0
it aint a leaderstat tho so i think it would be Cash = game.player.localplayer.Cash.Value
0
Well if it isn't a leaderstat then just (Cash = Cash + 200) is what you want, and it will add 200 to any previous amount
0
os i i am using Developer Products but when i try to buy them it says couldent buy the your account was not charged
Hello WaifulSbae, this is fairly simple. It would look something like this.
local GamePassService = Game:GetService("GamePassService")
local GamePassId = 0 -- YOUR GAMEPASS ID
local player = game.Players.LocalPlayer
if GamePassService:PlayerHasPass(player, GamePassId) then
Player.leaderstats.Money.Value = Player.leaderstats.Money.Value + 200
end
2 comments
0
thanks ill try it but it aint i leadersats
0
where do i put the script
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
im confused by your question...i can awnser thou..thats why im in the section called today's top users
ok so i have a money currency in my game i want to make a money game pass so when they buy the money pass for robux it will be added to there ingame currency