|
| 13 Jul 2011 12:00 AM |
print("Best Ever Leaderboard by stickmasterluke") --made by Stickmasterluke
--Thanks to who ever made or helped make Leaderboard 5.0 because i based this leaderboard off of 5.0 --so i guess this is 6.0? stands = {} CTF_mode = false
function onHumanoidDied(humanoid, player) local stats = player:findFirstChild("leaderstats") if stats ~= nil then local deaths = stats:findFirstChild("Spree") deaths.Value=0 local deaths2 = player:findFirstChild("ss") deaths2.Value=0 local deaths3 = stats:findFirstChild("Resources") deaths3.Value=deaths3.Value-1 if deaths3.Value<0 then deaths3.Value=0 end local msg=player:findFirstChild("Speed Spree") if msg~=nil then msg:remove() end
local killer = getKillerOfHumanoidIfStillInGame(humanoid)
handleKillCount(humanoid, player) end end
function onPlayerRespawn(property, player) if property == "Character" and player.Character ~= nil then local humanoid = player.Character.Humanoid local p = player local h = humanoid humanoid.Died:connect(function() onHumanoidDied(h, p) end ) end end
function getKillerOfHumanoidIfStillInGame(humanoid)
local tag = humanoid:findFirstChild("creator")
if tag ~= nil then local killer = tag.Value if killer.Parent ~= nil then return killer end end
return nil end
function handleKillCount(humanoid, player) local killer = getKillerOfHumanoidIfStillInGame(humanoid) if killer ~= nil then if killer ~= player then local stats = killer:findFirstChild("leaderstats") local stats2 = killer:findFirstChild("ss") if stats ~= nil and stats2 ~= nil then if killer.TeamColor == player.TeamColor and killer.Neutral==false then stats2.Value=0 local kills = stats:findFirstChild("Resources") kills.Value = kills.Value - 2 local kills2 = stats:findFirstChild("Spree") kills2.Value = kills2.Value - 1 if kills.Value<0 then kills.Value=0 end if kills2.Value<0 then kills2.Value=0 end else stats2.Value=stats2.Value+1 local kills = stats:findFirstChild("Resources") kills.Value = kills.Value + 2 local kills2 = stats:findFirstChild("Spree") kills2.Value = kills2.Value + 1 end end end end end
function findAllFlagStands(root) local c = root:children() for i=1,#c do if (c[i].className == "Model" or c[i].className == "Part") then findAllFlagStands(c[i]) end if (c[i].className == "FlagStand") then table.insert(stands, c[i]) end end end
function hookUpListeners() for i=1,#stands do stands[i].FlagCaptured:connect(onCaptureScored) end end
function onPlayerEntered(newPlayer)
local spco=script.spreecounter:clone()
local val=Instance.new("IntValue") val.Name="ss" val.Value=0 val.Parent=newPlayer local stats3 = Instance.new("IntValue") stats2.Name = "Tycoon"
local stats = Instance.new("IntValue") cash.Name = "Money" cash.Value = 0
local kills = Instance.new("IntValue") kills.Name = "Resources" kills.Value = 2
local deaths = Instance.new("IntValue") deaths.Name = "Spree" deaths.Value = 0
kills.Parent = stats deaths.Parent = stats stats3.Parent = newPlayer stats.Parent = newPlayer
while true do if newPlayer.Character ~= nil then break end wait(5) end
local humanoid = newPlayer.Character.Humanoid
humanoid.Died:connect(function() onHumanoidDied(humanoid, newPlayer) end )
newPlayer.Changed:connect(function(property) onPlayerRespawn(property, newPlayer) end )
stats.Parent = newPlayer
local val2=Instance.new("ObjectValue") val2.Name="playah" val2.Value=stats.Parent val2.Parent=spco print("a " .. val2.className .. " has been added to " .. newPlayer.Name) print(val2.className .. "'s value is " .. val2.Value.Name)
spco.Disabled=false spco.Parent=game.Workspace
end
function onCaptureScored(player) local ls = player:findFirstChild("leaderstats") if ls == nil then return end local caps = ls:findFirstChild("Resources") if caps == nil then return end caps.Value = caps.Value + 20 end
findAllFlagStands(game.Workspace) hookUpListeners() if (#stands > 0) then CTF_mode = true end game.Players.ChildAdded:connect(onPlayerEntered)
Can someone heelp? i want money to be the 3rd stat,s and let it be a tycoon stats |
|
|
| Report Abuse |
|
|
Pichu7245
|
  |
| Joined: 17 May 2009 |
| Total Posts: 16489 |
|
|
| 13 Jul 2011 12:10 AM |
I just shoved a man-eating hamster in my face because this is so dumb.
First of all, this is a free model. It says "stickmasterluke" at the top. Secondly, no requests. Third, this is COMPLETELY inefficient. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 12:12 AM |
| This forum is for help only please do not post off topic forums. |
|
|
| Report Abuse |
|
|
Pichu7245
|
  |
| Joined: 17 May 2009 |
| Total Posts: 16489 |
|
|
| 13 Jul 2011 12:18 AM |
Show me where I posted the link to an off topic forum. You're not asking for help. You're trying to manipulate others to fix your free model script. You will not learn anything unless you try and fix it yourself. |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Jul 2011 12:21 AM |
It says it was made by stickmasterluke at the top... -_-' |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 12:22 AM |
| Fail, the top says made by SML. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 12:23 AM |
| I can't help if you wont explain the problem. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 12:23 AM |
Oh, a request.
Requests aren't allowed on this forum. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 12:26 AM |
| This is just plain stupid.. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 02:23 AM |
I Wonder if jared is finally making his own games now...
dannyman987: Jared, you making your own games now?
jaredvaldez2: Y...Ummmm.......*Runs Off Crying To Mum.* |
|
|
| Report Abuse |
|
|
Koloss
|
  |
| Joined: 14 Jul 2006 |
| Total Posts: 202 |
|
|
| 13 Jul 2011 02:33 AM |
| Jared... you're freakin stupid. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 09:54 AM |
Lolyoufailed. So are you actually making a new game? |
|
|
| Report Abuse |
|
|
juriaan
|
  |
| Joined: 25 Nov 2008 |
| Total Posts: 939 |
|
|
| 13 Jul 2011 10:14 AM |
--[[Tycoon Stats by Juriaan]]
function Playerl(newplayer) local leaderstats = Instance.new("IntValue", newplayer) leaderstats.Name = "leaderstats" --[[ Change this in too Setup if you wish to NOT show it on the player list]] local Tycoon = Instance.new("IntValue", newplayer.leaderstats) Tycoon.Name = "Tycoon" local Resources = Instance.new("IntValue", newplayer.leaderstats) Resources.Name = "Resources" local Money = Instance.new("NumberValue", newplayer.leaderstats) Money.Name = "Money" end
--[[ Note : To let this Script work you would need the next: - Change all the leaderstats too the Name that you give to the next line : leaderstats.Name - Too Tagg a Value inside this you would do the next newplayer.THENAMEOFLEADERSTATSHERE.WHATYOUWISHTOTAGG or just if you are inside the Player Folder then THENAMEOFLEADERSTATSHERE.WHATYOUWISHTOTAGG - To make a Value inside the Value do the next For Example: Money.Value = 20 ]]
Juriaan
Game.Players.ChildAdded:connect(Playerl |
|
|
| Report Abuse |
|
|
Fl0x
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 5169 |
|
|
| 13 Jul 2011 10:18 AM |
| I just realized I posted on this thread. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 10:25 AM |
| Hahaha, jared, you're such a moron.... |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 10:46 AM |
OH NO The worst succesful game copier strikes in the forum.
|
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 11:04 AM |
| Jared fails, learn how to script noob |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 11:05 AM |
| OMGOMG THIS SHOWS THAT JARED CAN'T SCRIPT AND HE DIDNT MAKE HIS GAMES!!!!!! PROOF |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Jul 2011 11:09 AM |
| I know but its proof for the noobs who like jared that jared is a noob!!! haha he didnt think this through, this is some proof :D |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 11:11 AM |
| Proof? I'm asking for scripting help , i'm not a good script er idiot. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 11:14 AM |
So you just want to add a new stat in? Do you want to take the other ones out too?
~ Mitch ~ |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 11:15 AM |
| Your not a good scripter, and some of those games have more advanced scripting, this is simple to use and you can't, if you can't edit this, you can't make games like that. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 11:16 AM |
Do you just want a tycoon leaderboard? If so, here.
game.Players.PlayerAdded:connect(function(plr) stats = Instanc.new("IntValue",plr) stats.Name = "leaderstats" money = Instance.new("IntValue",stats) money.Name = "PutNameOfMoneyHere" --Put your money name here money.Value = 0 --Change 0 to a starter cash value onstyc = Instance.new("IntValue",plr) onstyc.Name = "Tycoon" end)
?? |
|
|
| Report Abuse |
|
|