Ok so my shop is finally working yeah! But we have a problem with adding money to people, instead of it using leaderstats as a way (this is so hackers can't hack they stats) to change it uses a Folder in ServerScriptServices called Players and it adds new Folders with their Username with the stat inside but I have no idea how to locate that from a script so it can change. Here's the script I'm trying to change my leaderboard money with.
local time = 180
while true do
wait(1)
time = time - 1
if (time <= 0) then
time = 180
players = game.Players:GetChildren()
for i=1, #players do
if (players[i]~=nil) then
if (players[i]:findFirstChild("leaderstats")) then
if (players[i].leaderstats:findFirstChild("Credits")) then
if (players[i]:IsInGroup(234707)==true) then -- user IS in ERR
players[i].leaderstats.Credits.Value = players[i].leaderstats.Credits.Value + 50
if (players[i]:IsInGroup(234706)==true) then -- Guard
players[i].leaderstats.Credits.Value = players[i].leaderstats.Credits.Value + 30
end
else
players[i].leaderstats.Credits.Value = players[i].leaderstats.Credits.Value + 50
end
end
end
end
end
end
playersa = game.Players:GetChildren()
for i=1, #playersa do
if (playersa[i]~=nil) then
if (playersa[i]:findFirstChild("PlayerGui")) then
if (playersa[i].PlayerGui:findFirstChild("PaydayGui")) then
playersa[i].PlayerGui.PaydayGui.Label.Text = "Next payday in: " .. tostring(time) .. " seconds"
end
end
end
end
end

2 comments
Sorry, but this is really confusing. Break it up a little, and leave some code snippets for us to work off of.
I have Edited