Lowcart
|
  |
| Joined: 12 Sep 2011 |
| Total Posts: 1323 |
|
| |
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 14 Sep 2011 08:47 PM |
stats = {"Money","num","wait"}
game.Players.PlayerAdded:connect(function(p) coroutine.resume(coroutine.create(function() for i = 1, #stats do local a = Instance.new("IntValue",p) a.Name = stats[i] end if p:FindFirstChild("num") then p.num.Value = 10 end if p:FindFirstChild("wait") then p.wait.Value = 5 end local b = Instance.new("BoolValue",p) b.Value = false b.Name = "Owned" while true do -- Probably around here. That's a loop occuring 30 times per second PER PLAYER. There must be a better way to do that. wait() if game.Players:FindFirstChild(p.Name)then wait(p.Wait.Value) p.cash.Value = p.cash.Value + p.num.Value end end end)) end)
|
|
|
| Report Abuse |
|
|
Lowcart
|
  |
| Joined: 12 Sep 2011 |
| Total Posts: 1323 |
|
| |
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 14 Sep 2011 08:51 PM |
| Because wait() waits a frame, around .03 seconds, so 1 / .03 = around 30. |
|
|
| Report Abuse |
|
|
Lowcart
|
  |
| Joined: 12 Sep 2011 |
| Total Posts: 1323 |
|
| |
|
nPwn
|
  |
| Joined: 17 Sep 2010 |
| Total Posts: 3197 |
|
|
| 14 Sep 2011 10:50 PM |
| Imagine a mega place with that scripting rubbing that often. Make it a function or something. You also have 2 extra ends :P |
|
|
| Report Abuse |
|
|
nPwn
|
  |
| Joined: 17 Sep 2010 |
| Total Posts: 3197 |
|
|
| 14 Sep 2011 10:50 PM |
| Running* stupid flood check |
|
|
| Report Abuse |
|
|