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

hey guys i have been working on this all day my head hurts?

Asked by 6 years ago

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?

0
im confused by your question...i can awnser thou..thats why im in the section called today's top users User#20192 0 — 6y
0
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 WaifulSbae 0 — 6y

2 answers

Log in to vote
0
Answered by
NexeusX 137
6 years ago

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
0
it aint a leaderstat tho so i think it would be Cash = game.player.localplayer.Cash.Value WaifulSbae 0 — 6y
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 NexeusX 137 — 6y
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 WaifulSbae 0 — 6y
Ad
Log in to vote
0
Answered by
Kblow1 53
6 years ago

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
0
thanks ill try it but it aint i leadersats WaifulSbae 0 — 6y
0
where do i put the script WaifulSbae 0 — 6y

Answer this question