|
| 05 Sep 2013 08:52 PM |
I found a script but i wanna make it have a different currency heres the script
function onPlayerEntered(newPlayer)--Standerd LeaderBoard for Tycoons and Money games. local stats = Instance.new ("IntValue")---Get the leaderboard stats. stats.Name = "leaderstats"---Right name. stats.Parent = newPlayer--Put them in the Player. local Money = Instance.new ("IntValue")---Get the money Value. Money.Name = "Money"---Name it correctly. Money.Value = 100---Set it to what you want players to start out with. Money.Parent = newPlayer.leaderstats--Put it in the leaderboard. end--Close the function.
function handleKillCount(humanoid, player) local killer = getKillerOfHumanoidIfStillInGame(humanoid) if killer ~= nil then local stats = killer:findFirstChild("leaderstats") if stats ~= nil then local kills = stats:findFirstChild("Money") if killer ~= player then kills.Value = kills.Value + 10 --Set to as much money as you want per kill else kills.Value = kills.Value - 1 --Dont mess with this. end end end end
game.Players.ChildAdded:connect(onPlayerEntered)---Connection line for onPlayerEntered.
How do i modify this script to make it so the leaderboard currency is Gold |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2013 08:57 PM |
| If your going to use free models, Why don't you just look up a gold leaderboard? |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2013 09:00 PM |
| I cant find one that is just gold because of rpgs making gold, levels and xp. i dont want levels or xp. also my brother is making a game and he needs currency called ZomBux. So i took this cause it works fine |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2013 09:07 PM |
function onPlayerEntered(newPlayer) local stats = Instance.new ("IntValue") stats.Name = "leaderstats" stats.Parent = newPlayer local Money = Instance.new ("IntValue") Money.Name = "Gold" Money.Value = 0 Money.Parent = newPlayer.leaderstats end game.Players.ChildAdded:connect(onPlayerEntered)
yo that shuld werk for what you wanted |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2013 09:15 PM |
^This is disappointing, I sat there an made this though
USE MINE PL0X
function onPlayerEntered(newPlayer) local stats = Instance.new("IntValue") stats.Name = "leaderstats" local g = Instance.new("IntValue") g.Name = "Gold" g.Value = 25 g.Parent = stats stats.Parent = newPlayer newPlayer.Changed:connect(function (property) end) end
game.Players.ChildAdded:connect(onPlayerEntered)
|
|
|
| Report Abuse |
|
|
|
| 05 Sep 2013 09:24 PM |
| lolol it might crash cuz you no put da wait. |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2013 09:24 PM |
| I meant it will throw an error not crash. |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2013 09:34 PM |
I am so dumb! see i don't know an ounce of coding so what i tried to do is make it say This local gold = Instance.new ("IntValue") Gold.Name = "Gold" Gold .Value = 100 Gold.Parent = newPlayer.leaderstats
Thank you for the help
By the way it Didn't work but i figured it out to change the money.name to money.name="gold" |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2013 09:35 PM |
| Oh by the way if you want to see the game that Im trying to make with this coding its called Vampire Hunters |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 05 Sep 2013 11:34 PM |
| I dislike free model'd games |
|
|
| Report Abuse |
|
|