So im making a game where we are given money every 10 seconds, and i want to add company's that players can buy and get more money from them WITHOUT droppers Here is the script for the money riser, please help me figure this out! Is there any way that I can add lines of code that check to see if the player owns the building "using a value" that gives more money upon money arrival time?
amount = 5
timedelay = 10
currencyname = "Cash"
while true do
wait(timedelay)
for i,v in pairs(game.Players:GetPlayers()) do
if v:FindFirstChild("leaderstats") and v then
v.leaderstats[currencyname].Value = v.leaderstats[currencyname].Value + amount
end
end
end

1 comment
What you are saying is confusing, just use a simple Int value for how many companies are owned and add 5 for each building.... Idk what you are doing but this is the best I can do lol