I've tried this code before, not sure if it gave an output error, because when I played solo, the output gave tons of things not related to this script AND, it's not working giving the 10K Cash:
This is in a LocalScript in StarterPack
id = 103728213 access = {"name1","name2"} game.Players.PlayerAdded:connect(function(player) if Game:GetService("GamePassService"):PlayerHasPass(player, id) or game.Players.LocalPlayer.Name == #access then -- Did I use the # correctly? Or should I use something else? while true do game.Players.LocalPlayer.leaderstats.Cash.Value = game.Players.LocalPlayer.leaderstats.Cash.Value + 10000 --Did I find the leaderstats correctly? wait(1) end end end)
What I want it to do is that if a player has a specific Game Pass, or their name is in the access table, they will be entitled with 10KCash per second
Where is the LocalScript exactly? Workspace?
id = 103728213 access = {name1=true,name2=true} local player = script.Parent repeat player = player.Parent until player:IsA"Player" if Game:GetService("GamePassService"):PlayerHasPass(player, id) or access[player.Name] then while true do player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 10000 --Did I find the leaderstats correctly? wait(1) end end
Edited