So i am trying to make gamepass for my game but i dont know how i am trying to make when they click gui that says click if they have gamepass they get x2 click plis help?????
Make variables called clicknumber and clickcount Also, put this script inside the click button
01 | local clicknum = 1 |
02 | local clickcount = 0 (unless you have datastore) |
03 |
04 |
05 | script.Parent.MouseButton 1 Click:Connect( function () |
06 | clickcount = clickcount+clicknum |
07 | end ) |
08 |
09 | if [ insert if you have gamepass here script ] then |
10 | clicknum = 2 |
11 | end |
So in my gui i have text button that have localscript
1 | local Player = game.Players.LocalPlayer |
2 | local PlayersClicks = Player:WaitForChild( 'leaderstats' ):WaitForChild( 'Clicks' ) |
3 |
4 | script.Parent.MouseButton 1 Click:Connect( function () |
5 | PlayersClicks.Value = PlayersClicks.Value + 1 |
6 | end ) |
So how can i make gamepass i am not good at scripting