iNicklas
|
  |
| Joined: 26 Oct 2010 |
| Total Posts: 4031 |
|
|
| 08 Jan 2014 01:06 PM |
Like: Game.workspace.Leaderboard.Gold.Value=900000
Dont know if right. But how do i make a script that gives me lv, stage, gold or XP. |
|
|
| Report Abuse |
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
|
| 08 Jan 2014 01:07 PM |
Why do I feel as if you're an exploiter?
If it's your own game, you'd know where the values are located, and as such do this yourself. The fact you don't know where the "leaderboard" is, is kind of worrying. |
|
|
| Report Abuse |
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 08 Jan 2014 01:39 PM |
hello Inick , i got the answer for your question ;D, let me just post it here.. wait a sec.
|
|
|
| Report Abuse |
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 08 Jan 2014 01:42 PM |
--ok all you do is copy and paste all this :D, only the bits under -- ------------------------------------------------- function onXPChanged(player, XP, level) if XP.Value>= 100*(level.Value) and level.Value < script.LevelCap.Value then XP.Value = XP.Value - (level.Value*100) level.Value = level.Value + 1 end end
function onLevelUp(player, XP, level) if player.Character~=nil then for i = 1,5 do local fireworks = Instance.new("Part") fireworks.Shape = 0 fireworks.formFactor = "Symmetric" fireworks.Size = Vector3.new(1,1,1) fireworks.BrickColor = BrickColor.Random() fireworks.CFrame = player.Character.Head.CFrame + Vector3.new(0,2,0) fireworks.Parent = game.Workspace game:GetService("Debris"):AddItem(fireworks, 2) fireworks.Velocity = Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30)) end end local m = Instance.new("Hint") m.Parent = game.Workspace m.Text = player.Name .. " has gained a level!" wait(5) m.Parent = nil end
function saveScore(player, score) player:SaveNumber("Lvl", score) end
function saveScore2(player, score) player:SaveNumber("XP", score) end
function saveScore3(player, score) player:SaveNumber("Gold", score) end
function saveScore4(player, score) player:SaveNumber("Strength", score) end
function saveScore5(player, score) player:SaveNumber("Constitution", score) end
function saveScore6(player, score) player:SaveNumber("Intelligence", score) end
function saveScore7(player, score) player:SaveNumber("Dexterity", score) end
function saveScore8(player, score) player:SaveNumber("points", score) end
function saveScore9(player, score) player:SaveNumber("PvP Points", score) end
function loadScore(player, clickCounter) local score = player:LoadNumber("Lvl")
if score ~= 1 then clickCounter.Value = score else print("Nothing to load/score was 0") end
end
function loadScore2(player, clickCounter) local score = player:LoadNumber("XP")
if score ~= 0 then clickCounter.Value = score else print("Nothing to load/score was 0") end
end
function loadScore3(player, clickCounter) local score = player:LoadNumber("Gold")
if score ~= 0 then clickCounter.Value = score else print("Nothing to load/score was 0") end
end
function loadScore4(player, clickCounter) local score = player:LoadNumber("Strength")
if score ~= 0 then clickCounter.Value = score else print("Nothing to load/score was 0") end
end
function loadScore5(player, clickCounter) local score = player:LoadNumber("Constitution")
if score ~= 0 then clickCounter.Value = score else print("Nothing to load/score was 0") end
end
function loadScore6(player, clickCounter) local score = player:LoadNumber("Intelligence")
if score ~= 0 then clickCounter.Value = score else print("Nothing to load/score was 0") end
end
function loadScore7(player, clickCounter) local score = player:LoadNumber("Dexterity")
if score ~= 0 then clickCounter.Value = score else print("Nothing to load/score was 0") end
end
function loadScore8(player, clickCounter) local score = player:LoadNumber("points")
if score ~= 0 then clickCounter.Value = score else print("Nothing to load/score was 0") end
end
function loadScore9(player, clickCounter) local score = player:LoadNumber("PvP Points")
if score ~= 0 then clickCounter.Value = score else print("Nothing to load/score was 0") end
end
function onPlayerEntered(newPlayer)
local stats = Instance.new("IntValue") stats.Name = "leaderstats"
local attrb = Instance.new("IntValue") attrb.Name = "attributes"
local clicks = Instance.new("IntValue") clicks.Name = "Lvl" clicks.Value = 0
local clicks2 = Instance.new("IntValue") clicks2.Name = "XP" clicks2.Value = 0
local clicks3 = Instance.new("IntValue") clicks3.Name = "Gold" clicks3.Value = 0
local clicks4 = Instance.new("IntValue") clicks4.Name = "Strength" clicks4.Value = 0
local clicks5 = Instance.new("IntValue") clicks5.Name = "Constitution" clicks5.Value = 0
local clicks6 = Instance.new("IntValue") clicks6.Name = "Intelligence" clicks6.Value = 0
local clicks7 = Instance.new("IntValue") clicks7.Name = "Dexterity" clicks7.Value = 0
local clicks8 = Instance.new("IntValue") clicks8.Name = "points" clicks8.Value = 0
local clicks9 = Instance.new("IntValue") clicks9.Name = "PvP Points" clicks9.Value = 0
clicks.Parent = stats clicks2.Parent = stats clicks3.Parent = stats clicks4.Parent = attrb clicks5.Parent = attrb clicks6.Parent = attrb clicks7.Parent = attrb clicks8.Parent = attrb clicks9.Parent = stats stats.Parent = newPlayer attrb.Parent = newPlayer
clicks2.Changed:connect(function() onXPChanged(newPlayer, clicks2, clicks) end) clicks.Changed:connect(function() onLevelUp(newPlayer, clicks2, clicks) end)
newPlayer:WaitForDataReady() -- IMPORTANT: after player.DataReady = true, it won't become false again. You need DataReady to be true for a player before you can load or save data.
-- try loading the player's score loadScore(newPlayer, clicks) loadScore2(newPlayer, clicks2) loadScore3(newPlayer, clicks3) loadScore4(newPlayer, clicks4) loadScore5(newPlayer, clicks5) loadScore6(newPlayer, clicks6) loadScore7(newPlayer, clicks7) loadScore8(newPlayer, clicks8) loadScore9(newPlayer, clicks9)
newPlayer.CharacterAdded:connect(function(c) c.Humanoid.MaxHealth = newPlayer.leaderstats.Lvl.Value * 10 + 100 c.Humanoid.Health = newPlayer.leaderstats.Lvl.Value * 10 + 100 end) end
function onPlayerRemoving(player) print("Attempting to save score for " .. player.Name) local stats = player:FindFirstChild("leaderstats") local attrb = player:FindFirstChild("attributes") if (stats ~= nil) then local clicks = stats:FindFirstChild("Lvl") local clicks2 = stats:FindFirstChild("XP") local clicks3 = stats:FindFirstChild("Gold") local clicks4 = attrb:FindFirstChild("Strength") local clicks5 = attrb:FindFirstChild("Constitution") local clicks6 = attrb:FindFirstChild("Intelligence") local clicks7 = attrb:FindFirstChild("Dexterity") local clicks8 = attrb:FindFirstChild("points") local clicks9 = stats:FindFirstChild("PvP Points") if (clicks ~= nil)and(clicks2 ~= nil)and(clicks3 ~= nil)and(clicks4 ~= nil)and(clicks5 ~= nil)and(clicks6 ~= nil)and(clicks7 ~= nil)and(clicks8 ~= nil)and(clicks9 ~= nil) then saveScore(player, clicks.Value) saveScore2(player, clicks2.Value) saveScore3(player, clicks3.Value) saveScore4(player, clicks4.Value) saveScore5(player, clicks5.Value) saveScore6(player, clicks6.Value) saveScore7(player, clicks7.Value) saveScore8(player, clicks8.Value) saveScore9(player, clicks9.Value) end end end
game.Players.PlayerAdded:connect(onPlayerEntered) game.Players.PlayerRemoving:connect(onPlayerRemoving) |
|
|
| Report Abuse |
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 08 Jan 2014 01:45 PM |
Or nickle, you could go on this link, to make a better game hehe lol : link:
http://www.roblox.com/item.aspx?setItemId=13808974&avID=325001012 |
|
|
| Report Abuse |
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 08 Jan 2014 02:18 PM |
| If you werent so cute i would have a go at you for knowing nothing ^ |
|
|
| Report Abuse |
|
dmjoe
|
  |
| Joined: 01 May 2009 |
| Total Posts: 2387 |
|
| |
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 08 Jan 2014 02:21 PM |
me? i was helping or trying, god ! your in every post smiley! |
|
|
| Report Abuse |
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 08 Jan 2014 02:35 PM |
I'm in every post because I know a lot.
And don't be insulted, at least someone is helping. :) |
|
|
| Report Abuse |
|
nabinraj
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 276 |
|
|
| 09 Jan 2014 02:08 PM |
umm? in a good way?right? I like to help others...
|
|
|
| Report Abuse |
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 09 Jan 2014 03:43 PM |
| Well you're trying. And that's better than nothing. |
|
|
| Report Abuse |
|
iNicklas
|
  |
| Joined: 26 Oct 2010 |
| Total Posts: 4031 |
|
| |