e = 0 game.Players.LocalPlayer.status.Changed:connect(function() for i,v in pairs(_G.money) do e = e+1 -- to get the amount in the table. wait, i could just use #. oh well, its the same thing end local average = 0 for i,v in pairs(_G.money) do average = average + v -- v is a number, so this will get all the numbers added together. end average = average/e -- gets the average average = average* (game.Players.LocalPlayer.turn.Value/10) -- the turn value is a number, which is divided by ten. and then it gets multiplied by that print(average) -- prints here, and it prints a different number every time the status value changes game.Players.LocalPlayer.deal.Value = math.floor(average) -- math floor because deciamals average = 0 -- resets i, maybe print(average) -- prints 0, so i guess it does reset end)
this prints a different number every time my status value changes. And I'm pretty sure it's not supposed to.