#Can someone help me with my script
45 messages · Page 1 of 1 (latest)
whats the problem?
cuz they are all wrong
im trying to make a script that gives 5k for premuim members every 3 mins
how i would do it
is that I would add the player to an array when they join
and remove them when they leave
anyways I did this exact thing just a few days ago give me a minute
oh okie dokie
okay so you can use playerservice:getallplayers() to get all of the players every 3 minutes and give them the points that way
but i need only the premuim
you can check if they are premium
play.PlayerAdded:Connect(function(player)
local premiumMembers = {}
for i, v in ipairs(players) do
if v.MembershipType == Enum.MembershipType.Premium then
table.insert(v, premiumMembers)
end
end
end)
premium member table
i guess
that resets it every time someone joins
but how do i make it so they earn cash evety 3 mins
gimme a minute
local Players=game:GetService("Players")
local leaderstats = -- forgor how to do this so do it yourself
while true do
for _, i in Players:getPlayers() do
if i.MembershipType == Enum.MembershipType.Premium then
local cash = leaderstats:waitforchilds("Cash")
cash.Value = cash.Value + 5000
end
end
wait(180)
end```
every 3 minutes it goes through all the players, and checks if they are premium, then gives them the cash
you can give it to yourself in studio I think
wdym
huh
nah dont worry ill prb find some one kind in jailbreak
and if it works fine put it back and hope and pray
lol
Did you change the leaderstats part
** You are now Level 6! **