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

How To Make A 1 Day Product Gamepass?

Asked by 4 years ago

How do i make a product, that gives the player vip for a day, i reaseached a little bit, but, i cant seem to figure out how to make i from scratch.

https://devforum.roblox.com/t/how-to-make-time-based-developer-products/338387

0
I understand if you cant help me because i dont have a script, But, I Really Need Help TheEmeraIdDev 22 — 4y
0
I'm no expert, but I'd do two things if I were you. sepro1144 0 — 4y
0
The devforum post that you posted has an answer that shows how it do it. moo1210 587 — 4y

3 answers

Log in to vote
0
Answered by 4 years ago

Possibly write a block of code like this? Have you dev product made and scripted, then possibly put something like this into it somewhere. I'm a beginner, but I hope this helps at least a little bit!

local devProductTime = --put something here to figure out when a player buys the product--

--make it so when devproduct is bought, it starts a timer for however many seconds are in a day or whatever time you're using--

    when devProductTime == 0,
    end
end

Again, I'm a beginner, so I really don't know, but this is possibly something that can help. Let me know if it does!

0
Basically, I Find The Time It Was Purchased, Minus It By 1 Day, If It Is 0 Or Below, Then I Remove The VIP? TheEmeraIdDev 22 — 4y
Ad
Log in to vote
0
Answered by
JPT79 92
4 years ago

I'm no professional but I'll help you the best I can, first off I don't think you can us gamepasses, as I'm pretty certain you cannot take a gamepass from a player. Instead of trying to research your specific problem try to break it down. You'll need to assign the player a value and you need to remember what that value is even if the player leaves. Then you need to periodically lower that value and do so even if the player is offline (This is for how long you want the vip to last) if their value is 0 or below, then remove their vip status I'll leave the research up to you, as like I said before I'm no scripting professional, but I hope this helps you get on the right track

Log in to vote
0
Answered by 4 years ago

You can use DataStoreService, and tick().

After the player buys the product, you can set the tick(), like this.

local timeBought = tick()

And then you can use DataStoreService and save that time and check how long it's been since their last join.

Hopefully this gave you somewhat of an idea.

Answer this question