masta789
|
  |
| Joined: 13 Mar 2012 |
| Total Posts: 181 |
|
|
| 20 Jul 2013 11:30 PM |
game.Players.PlayerAdded:connect(function(p) -- what does the (function(p) do? Stat1 = Instance.new("IntValue",p) -- again something to do with ^^ Stat1.Name = "TimerS" Stat1.Value = 0 Stat4 = Instance.new("IntValue",p) Stat4.Name = "TimerM" Stat4.Value = 0 Stat5 = Instance.new("IntValue",p) Stat5.Name = "TimerH" Stat5.Value = 0 Stat2 = Instance.new("IntValue",p) Stat2.Name = "WOs" Stat2.Value = 0 Stat3 = Instance.new("IntValue",p) Stat3.Name = "Played" Stat3.Value = 0 repeat wait() until p.DataReady == true -- What does this do? Stat1.Value = p:LoadNumber("Timer") Stat2.Value = p:LoadNumber("WOs") Stat3.Value = p:LoadNumber("Played") Stat3.Value = Stat3.Value +1 --What? p.CharacterAdded:connect(function(char) char.Humanoid.Died:connect(function() p.WOs.Value = p.WOs.Value +1 -- Again what? end) end) while true do wait(1) if Stat1.Value == 59 then --Whats this down to the ^^ Stat4.Value = Stat4.Value +1 if Stat4.Value == 60 then Stat4.Value = 0 Stat5.Value = Stat5.Value +1 end Stat1.Value = 0 elseif Stat1.Value ~= 59 then Stat1.Value = Stat1.Value +1 end end end) --^^
game.Players.PlayerRemoving:connect(function(p) p:SaveNumber("Timer",p.Timer.Value) p:SaveNumber("WOs",p.WOs.Value) p:SaveNumber("Played",p.Played.Value) end)
Also not sure if the Script/code work but i believe the meaning is the same. Please help... |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2013 11:36 PM |
Okay here it goes.
game.Players.PlayerAdded:connect(function(p) -- function p is something that is triggered by an event like Stat1 = Instance.new("IntValue",p) -- making an IntValue --Touch^ Stat1.Name = "TimerS" Stat1.Value = 0 Stat4 = Instance.new("IntValue",p) Stat4.Name = "TimerM" Stat4.Value = 0 Stat5 = Instance.new("IntValue",p) Stat5.Name = "TimerH" Stat5.Value = 0 Stat2 = Instance.new("IntValue",p) Stat2.Name = "WOs" Stat2.Value = 0 Stat3 = Instance.new("IntValue",p) Stat3.Name = "Played" Stat3.Value = 0 repeat wait() until p.DataReady == true -- Wait for the players data to be loaded (ready). Stat1.Value = p:LoadNumber("Timer") Stat2.Value = p:LoadNumber("WOs") Stat3.Value = p:LoadNumber("Played") Stat3.Value = Stat3.Value +1 --Ads 1 more point to Stat3's value. p.CharacterAdded:connect(function(char) char.Humanoid.Died:connect(function() p.WOs.Value = p.WOs.Value +1 -- This ads 1 more point to WOs when a player dies. end) end) while true do wait(1) if Stat1.Value == 59 then --If a player stat1's value is equal to 59 then. end) --^^ ends the function
game.Players.PlayerRemoving:connect(function(p) p:SaveNumber("Timer",p.Timer.Value) p:SaveNumber("WOs",p.WOs.Value) p:SaveNumber("Played",p.Played.Value) end)
Anymore questions? |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2013 11:38 PM |
| I could write that script half as big as tht one (>_<) |
|
|
| Report Abuse |
|
|
masta789
|
  |
| Joined: 13 Mar 2012 |
| Total Posts: 181 |
|
|
| 20 Jul 2013 11:57 PM |
| That's nice, I'm just a novice. |
|
|
| Report Abuse |
|
|