generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Help with this script (WARNING LONG)

Previous Thread :: Next Thread 
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
04 Jun 2013 07:49 PM
print("Start") -- Will have 400-750 lines when done, will cover 75% of player GUIs
local a = script.Parent.Parent
local aplrgui = a.PlayerGui
local b = Instance.new("ScreenGui", aplrgui)
local c = Instance.new("Frame", b)
c.Size = UDim2.new(0,1650,0,750)
local d = Instance.new("TextLabel", c)
d.Name = "MainTextBorder"
d.Text = "Welcome to this RPG!"
d.Size = UDim2.new(0,805,0,205)
d.Font = "ArialBold"
d.FontSize = "Size48"
d.Position = UDim2.new(0,750,0,150)
d.TextScaled = true
d.TextColor3 = Color3.new(255/255,255/255,255/255)
wait(0.5)
d.Text = "This RPG game is [V0.0.0]"
wait(0.5)
d.Text = "I am working on the game engine!"
wait(math.random(0.2,1))
d.Text = "Loading [20%]"
wait(math.random(0.2,1))
d.Text = "Loading [40%]"
wait(math.random(0.2,1))
d.Text = "Loading [60%]"
wait(math.random(0.2,1))
d.Text = "Loading [80%]"
wait(math.random(0.2,1))
d.Text = "Loading [100%]"
wait(0.1)
d.Text = "Done!"
wait(1)
d.Text = "SAVE OR LOAD"
wait(0.5)
d.Text = "Welcome to the legendary master RPG!"

local e = Instance.new("TextButton", c)
e.Name = "e"
e.Text = "Save"
e.Font = "ArialBold"
e.FontSize = "Size48"
e.TextScaled = true
e.Size = UDim2.new(0,350,0,70)
e.Position = UDim2.new(0,750,0,70)
e.TextColor3 = Color3.new(255/255,255/255,255/255)
local f = Instance.new("TextButton", c)
f.Name = "f"
f.Text = "Load"
f.Font = "ArialBold"
f.FontSize = "Size48"
f.TextScaled = true
f.Size = UDim2.new(0,350,0,70)
f.Position = UDim2.new(0,1100,0,70)
f.TextColor3 = Color3.new(255/255,255/255,255/255)

if (a:findFirstChild("leaderstats"))and((a:findFirstChild("Attributes")) ~= nil)then

local leaderstats = Instance.new("IntValue", a)
leaderstats.Name = "leaderstats"
local Lvl = Instance.new("IntValue", g)
Lvl.Name = "Lvl"
Lvl.Value = 1
local XP = Instance.new("IntValue", g)
XP.Name = "XP"
XP.Value = 0
local Gold = Instance.new("IntValue", g)
Gold.Name = "Gold"
Gold.Value = 25
local Attributes = Instance.new("IntValue", a)
Attributes.Name = "Attributes"
local Mining = Instance.new("IntValue", k)
Mining.Name = "Mining"
Mining.Value = 1
local MiningXP = Instance.new("IntValue", k)
MiningXP.Name = "MiningXP"
MiningXP.Value = 0
local Smith = Instance.new("IntValue", k)
Smith.Name = "Smith"
Smith.Value = 1
local SmithXP = Instance.new("IntValue", k)
SmithXP.Name = "SmithXP"
SmithXP.Value = 0
local Herb = Instance.new("IntValue", k)
Herb.Name = "Herb"
Herb.Value = 1
local HerbXP = Instance.new("IntValue", k)
HerbXP.Name = "HerbXP"
HerbXP.Value = 0
local Alch = Instance.new("IntValue", k)
Alch.Name = "Alch"
Alch.Value = 1
local AlchXP = Instance.new("IntValue", k)
AlchXP.Name = "AlchXP"
AlchXP.Value = 0
end

if (leaderstats ~= nil) then
function onClick()
function saveScore1(a, score)
a:SaveNumber("Lvl")
end

function saveScore2(a, score)
a:SaveNumber("XP")
end

function saveScore3(a, score)
a:SaveNumber("Gold")
end

function saveScore4(a, score)
a:SaveNumber("Mining")
end

function saveScore5(a, score)
a:SaveNumber("MiningXP")
end

function saveScore6(a, score)
a:SaveNumber("Smith")
end

function saveScore7(a, score)
a:SaveNumber("SmithXP")
end

function saveScore8(a, score)
a:SaveNumber("Herb")
end

function saveScore9(a, score)
a:SaveNumber("HerbXP")
end

function saveScore10(a, score)
a:SaveNumber("Alch")
end

function saveScore11(a, score)
a:SaveNumber("AlchXP")
end
end
print("Saved score!")
end


if (g ~= nil) then
function onClick2()
-- Border_Line
function loadScore(a, clickCounter)
local score = a:LoadNumber("Lvl")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore2(a, clickCounter)
local score = a:LoadNumber("XP")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore3(a, clickCounter)
local score = a:LoadNumber("Gold")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore4(a, clickCounter)
local score = a:LoadNumber("Mining")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore5(a, clickCounter)
local score = a:LoadNumber("MiningXP")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore6(a, clickCounter)
local score = a:LoadNumber("Smith")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore7(a, clickCounter)
local score = a:LoadNumber("SmithXP")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore8(a, clickCounter)
local score = a:LoadNumber("Herb")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore9(a, clickCounter)
local score = a:LoadNumber("HerbXP")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore10(a, clickCounter)
local score = a:LoadNumber("Alch")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore11(a, clickCounter)
local score = a:LoadNumber("AlchXP")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end
end
end
print("Loaded Score")
wait(0.05)
f.Text = "Loaded!"
wait(2.45)
f.Text = "Load"

function onLvlChanged(a, XP, Lvl)
if XP.Value>=Lvl.Value * 40^1.21 then
XP.Value = XP.Value - Lvl.Value * 40^1.21
Lvl.Value = Lvl.Value + 1
local msg = Instance.new("Message")
msg.Text = ""..a.Name.." has gained a level and is now level "..Lvl.Value
wait(1.5)
msg:remove()
end
end

function onMiningChanged(a, MiningXP, Mining)
if MiningXP.Value>=Lvl.Value * 40^1.21 then
MiningXP.Value = MiningXP.Value - Mining.Value * 40^1.21
Mining.Value = Mining.Value + 1
local msg = Instance.new("Message")
msg.Text = ""..a.Name.." has gained a mining level and is now level "..Mining.Value
wait(1.5)
msg:remove()
end
end

function onSmithChanged(a, SmithXP, Smith)
if SmithXP.Value>=Smith.Value * 40^1.21 then
SmithXP.Value = SmithXP.Value - Smith.Value * 40^1.21
Smith.Value = Smith.Value + 1
local msg = Instance.new("Message")
msg.Text = ""..a.Name.." has gained a smithing level and is now level "..Smith.Value
wait(1.5)
msg:remove()
end
end

function onHerbChanged(a, HerbXP, Herb)
if HerbXP.Value>=Herb.Value * 40^1.21 then
HerbXP.Value = HerbXP.Value - Herb.Value * 40^1.21
Herb.Value = Herb.Value + 1
local msg = Instance.new("Message")
msg.Text = ""..a.Name.." has gained a herblore level and is now level "..Herb.Value
wait(1.5)
msg:remove()
end
end

function onAlchChanged(a, AlchXP, Alch)
if AlchXP.Value>=Alch.Value * 40^1.21 then
AlchXP.Value = AlchXP.Value - Alch.Value * 40^1.21
Alch.Value = Alch.Value + 1
local msg = Instance.new("Message")
msg.Text = ""..a.Name.." has gained a alchemy level and is now level "..Alch.Value
wait(1.5)
msg:remove()
end
end

XP.Changed:connect(function() onLvlChanged(XP, Gold) end)
Lvl.Changed:connect(function() onLvlChanged(XP, Gold) end)
MiningXP.Changed:connect(function() onMiningChanged(MiningXP, Mining) end)
Mining.Changed:connect(function() onMiningChanged(MiningXP, Mining) end)
SmithXP.Changed:connect(function() onSmithChanged(SmithXP, Smith) end)
Smith.Changed:connect(function() onSmithChanged(SmithXP, Smith) end)
HerbXP.Changed:connect(function() onHerbChanged(HerbXP, Herb) end)
Herb.Changed:connect(function() onHerbChanged(HerbXP, Herb) end)
AlchXP.Changed:connect(function() onAlchChanged(AlchXP, Alch) end)
Alch.Changed:connect(function() onAlchChanged(AlchXP, Alch) end)

local yudodis = Instance.new("TextButton", c)
yudodis.Name = "yudodis"
yudodis.Text = "PLAY"
yudodis.Font = "ArialBold"
yudodis.FontSize = "Size48"
yudodis.TextScaled = true
yudodis.Size = UDim2.new(0,750,0,210)
yudodis.Position = UDim2.new(0,100,0,210)
yudodis.TextColor3 = Color3.new(255/255,255/255,255/255)
if (yudodis ~= nil) then
function OnClick3()
local nopes = c
nopes:remove()

end
end
c:findFirstChild("e").MouseButton1Click:connect(onClick)
c:findFirstChild("f").script.Parent.MouseButton1Click:connect(onClick2)
c:findFirstChild("yudodis")script.Parent.MouseButton1Click:connect(onClick3)
-- 363 lines thus far, gettin' farther, fixin' glitches in code, and almost done w/ it too :) --
--[[
Output: line 333 - local XP is a nil value (Not exactly what it said but something like it...)
]]
Report Abuse
ColdSmoke is not online. ColdSmoke
Joined: 02 Jan 2012
Total Posts: 5784
04 Jun 2013 07:51 PM
so if you could just isolate line 333

that would be great
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
04 Jun 2013 08:02 PM
XP is local and your using it in the wrong area of where it was made.
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
04 Jun 2013 08:07 PM
@above, ...i dont get what you mean, copy paste a fixed version
@2 above, what does isolate mean?
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
04 Jun 2013 08:41 PM
bump
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
04 Jun 2013 11:17 PM
bump, comeon i need help!
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
04 Jun 2013 11:21 PM
bump combo: 3
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
04 Jun 2013 11:24 PM
Bump combo: 4

GTG IN 3 MINUTES PLEASE HELP!
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
04 Jun 2013 11:26 PM
Bump combo: 5
Wow, i posted comments and no replys!
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
04 Jun 2013 11:28 PM
Bump combo: 6
Geez, how long does it take to get someone to reply to a forum, and gtg >:l
Report Abuse
TeCnus is not online. TeCnus
Joined: 03 Jun 2011
Total Posts: 605
05 Jun 2013 01:27 AM
Hi
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
05 Jun 2013 11:31 AM
...seriously...i need help w/ the script or i cant make a cool rpg!
Report Abuse
Ravenshield is not online. Ravenshield
Joined: 21 Nov 2007
Total Posts: 4143
05 Jun 2013 11:34 AM
Did you make the script yourself?

By isolating, he means giving us the two lines above, the line and the two lines below.

Isolating line 333 means:

Line 331
Line 332
Line 333 <- we want this line only. Not the entire script.
Line 334 <- and additionally some of these other lines.
Line 335

Report Abuse
batistapowerbonbtla is not online. batistapowerbonbtla
Joined: 16 Dec 2011
Total Posts: 2203
05 Jun 2013 11:35 AM
function onLvlChanged(a, XP, Lvl)
if XP>=Lvl.Value * 40^1.21 then
XP = XP - Lvl.Value * 40^1.21
Lvl.Value = Lvl.Value + 1
local msg = Instance.new("Message")
msg.Text = ""..a.Name.." has gained a level and is now level "..Lvl.Value
wait(1.5)
msg:remove()
end
end

I'm assuming that you're already passing the XP.Value as the argument but I could be wrong
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
05 Jun 2013 11:35 AM
@above yes, i used some help though, scripting isnt that easy...
Report Abuse
batistapowerbonbtla is not online. batistapowerbonbtla
Joined: 16 Dec 2011
Total Posts: 2203
05 Jun 2013 11:36 AM
Nevermind I'm an idiot lol
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
05 Jun 2013 11:36 AM
Finally, thanks yall'!
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
05 Jun 2013 11:37 AM
For the help on this script, but soon ill make harder ones to unglitch, because i am planning to make an epic RPG!
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
05 Jun 2013 11:46 AM
Now all i want is you to rewrite the WHOLE SCRIPT right...i just need the connect functions etc etc right!
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
05 Jun 2013 11:51 AM
Just copy + paste and edit it so it doesnt have mistakes
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
05 Jun 2013 12:09 PM
-- the new script i made, still has the same problem, and reply w/ the whole script fixed!
print("Start") -- Will have 400-750 lines when done, will cover 75% of player GUIs
local a = script.Parent.Parent
local aplrgui = a.PlayerGui
local b = Instance.new("ScreenGui", aplrgui)
local c = Instance.new("Frame", b)
c.Size = UDim2.new(0,1650,0,750)
local d = Instance.new("TextLabel", c)
d.Name = "MainTextBorder"
d.Text = "Welcome to this RPG!"
d.Size = UDim2.new(0,805,0,205)
d.Font = "ArialBold"
d.FontSize = "Size48"
d.Position = UDim2.new(0,750,0,150)
d.TextScaled = true
d.TextColor3 = Color3.new(255/255,255/255,255/255)
wait(0.5)
d.Text = "This RPG game is [V0.0.0]"
wait(0.5)
d.Text = "I am working on the game engine!"
wait(math.random(0.2,1))
d.Text = "Loading [20%]"
wait(math.random(0.2,1))
d.Text = "Loading [40%]"
wait(math.random(0.2,1))
d.Text = "Loading [60%]"
wait(math.random(0.2,1))
d.Text = "Loading [80%]"
wait(math.random(0.2,1))
d.Text = "Loading [100%]"
wait(0.1)
d.Text = "Done!"
wait(1)
d.Text = "SAVE OR LOAD"
wait(0.5)
d.Text = "Welcome to the legendary master RPG!"

local e = Instance.new("TextButton", c)
e.Name = "e"
e.Text = "Save"
e.Font = "ArialBold"
e.FontSize = "Size48"
e.TextScaled = true
e.Size = UDim2.new(0,350,0,70)
e.Position = UDim2.new(0,750,0,70)
e.TextColor3 = Color3.new(255/255,255/255,255/255)
local f = Instance.new("TextButton", c)
f.Name = "f"
f.Text = "Load"
f.Font = "ArialBold"
f.FontSize = "Size48"
f.TextScaled = true
f.Size = UDim2.new(0,350,0,70)
f.Position = UDim2.new(0,1100,0,70)
f.TextColor3 = Color3.new(255/255,255/255,255/255)

function onLvlChanged(a, XP, Lvl)
if XP.Value>=Lvl.Value * 40^1.21 then
XP.Value = XP.Value - Lvl.Value * 40^1.21
Lvl.Value = Lvl.Value + 1
local msg = Instance.new("Message")
msg.Text = ""..a.Name.." has gained a level and is now level "..Lvl.Value
wait(1.5)
msg:remove()
end
end


function onLevelUp(a, XP, Lvl)
if a.Character~=nil then
for i = 1,5 do
local fireworks = Instance.new("Part")
fireworks.Shape = "Ball" --Shape of XP points.
fireworks.formFactor = "Symmetric"
fireworks.Reflectance = 0 --How shiny?
fireworks.Transparency = 0 --How transparent?
fireworks.Size = Vector3.new(2,2,2)
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
end

function onMiningChanged(a, MiningXP, Mining)
if MiningXP.Value>=Lvl.Value * 40^1.21 then
MiningXP.Value = MiningXP.Value - Mining.Value * 40^1.21
Mining.Value = Mining.Value + 1
local msg = Instance.new("Message")
msg.Text = ""..a.Name.." has gained a mining level and is now level "..Mining.Value
wait(1.5)
msg:remove()
end
end

function onMiningUp(a, MiningXP, Mining)
if a.Character~=nil then
for i = 1,5 do
local fireworks = Instance.new("Part")
fireworks.Shape = "Ball" --Shape of XP points.
fireworks.formFactor = "Symmetric"
fireworks.Reflectance = 0 --How shiny?
fireworks.Transparency = 0 --How transparent?
fireworks.Size = Vector3.new(2,2,2)
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
end

function onSmithChanged(a, SmithXP, Smith)
if SmithXP.Value>=Smith.Value * 40^1.21 then
SmithXP.Value = SmithXP.Value - Smith.Value * 40^1.21
Smith.Value = Smith.Value + 1
local msg = Instance.new("Message")
msg.Text = ""..a.Name.." has gained a smithing level and is now level "..Smith.Value
wait(1.5)
msg:remove()
end
end

function onSmithUp(a, SmithXP, Smith)
if a.Character~=nil then
for i = 1,5 do
local fireworks = Instance.new("Part")
fireworks.Shape = "Ball" --Shape of XP points.
fireworks.formFactor = "Symmetric"
fireworks.Reflectance = 0 --How shiny?
fireworks.Transparency = 0 --How transparent?
fireworks.Size = Vector3.new(2,2,2)
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
end


function onHerbChanged(a, HerbXP, Herb)
if HerbXP.Value>=Herb.Value * 40^1.21 then
HerbXP.Value = HerbXP.Value - Herb.Value * 40^1.21
Herb.Value = Herb.Value + 1
local msg = Instance.new("Message")
msg.Text = ""..a.Name.." has gained a herblore level and is now level "..Herb.Value
wait(1.5)
msg:remove()
end
end

function onHerbUp(a, HerbXP, Herb)
if a.Character~=nil then
for i = 1,5 do
local fireworks = Instance.new("Part")
fireworks.Shape = "Ball" --Shape of XP points.
fireworks.formFactor = "Symmetric"
fireworks.Reflectance = 0 --How shiny?
fireworks.Transparency = 0 --How transparent?
fireworks.Size = Vector3.new(2,2,2)
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
end

function onAlchChanged(a, AlchXP, Alch)
if AlchXP.Value>=Alch.Value * 40^1.21 then
AlchXP.Value = AlchXP.Value - Alch.Value * 40^1.21
Alch.Value = Alch.Value + 1
local msg = Instance.new("Message")
msg.Text = ""..a.Name.." has gained a alchemy level and is now level "..Alch.Value
wait(1.5)
msg:remove()
end
end

function onAlchUp(a, AlchXP, Alch)
if a.Character~=nil then
for i = 1,5 do
local fireworks = Instance.new("Part")
fireworks.Shape = "Ball" --Shape of XP points.
fireworks.formFactor = "Symmetric"
fireworks.Reflectance = 0 --How shiny?
fireworks.Transparency = 0 --How transparent?
fireworks.Size = Vector3.new(2,2,2)
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
end


if (leaderstats ~= nil) then
function onClick()
function saveScore1(a, score)
a:SaveNumber("Lvl")
end

function saveScore2(a, score)
a:SaveNumber("XP")
end

function saveScore3(a, score)
a:SaveNumber("Gold")
end

function saveScore4(a, score)
a:SaveNumber("Mining")
end

function saveScore5(a, score)
a:SaveNumber("MiningXP")
end

function saveScore6(a, score)
a:SaveNumber("Smith")
end

function saveScore7(a, score)
a:SaveNumber("SmithXP")
end

function saveScore8(a, score)
a:SaveNumber("Herb")
end

function saveScore9(a, score)
a:SaveNumber("HerbXP")
end

function saveScore10(a, score)
a:SaveNumber("Alch")
end

function saveScore11(a, score)
a:SaveNumber("AlchXP")
end
end
print("Saved score!")
end


if (g ~= nil) then
function onClick2()
-- Border_Line
function loadScore(a, clickCounter)
local score = a:LoadNumber("Lvl")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore2(a, clickCounter)
local score = a:LoadNumber("XP")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore3(a, clickCounter)
local score = a:LoadNumber("Gold")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore4(a, clickCounter)
local score = a:LoadNumber("Mining")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore5(a, clickCounter)
local score = a:LoadNumber("MiningXP")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore6(a, clickCounter)
local score = a:LoadNumber("Smith")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore7(a, clickCounter)
local score = a:LoadNumber("SmithXP")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore8(a, clickCounter)
local score = a:LoadNumber("Herb")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore9(a, clickCounter)
local score = a:LoadNumber("HerbXP")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore10(a, clickCounter)
local score = a:LoadNumber("Alch")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end

function loadScore11(a, clickCounter)
local score = a:LoadNumber("AlchXP")

if score ~= 1 then
clickCounter.Value = score
else
print("Nothing to load/score was 0")
end

end
end
end

if (a:findFirstChild("leaderstats"))and((a:findFirstChild("Attributes")) ~= nil)then

local leaderstats = Instance.new("IntValue", a)
leaderstats.Name = "leaderstats"
local Lvl = Instance.new("IntValue", leaderstats)
Lvl.Name = "Lvl"
Lvl.Value = 1
local XP = Instance.new("IntValue", leaderstats)
XP.Name = "XP"
XP.Value = 0
local Gold = Instance.new("IntValue", leaderstats)
Gold.Name = "Gold"
Gold.Value = 25
local Attributes = Instance.new("IntValue", a)
Attributes.Name = "Attributes"
local Mining = Instance.new("IntValue", Attributes)
Mining.Name = "Mining"
Mining.Value = 1
local MiningXP = Instance.new("IntValue", Attributes)
MiningXP.Name = "MiningXP"
MiningXP.Value = 0
local Smith = Instance.new("IntValue", Attributes)
Smith.Name = "Smith"
Smith.Value = 1
local SmithXP = Instance.new("IntValue", Attributes)
SmithXP.Name = "SmithXP"
SmithXP.Value = 0
local Herb = Instance.new("IntValue", Attributes)
Herb.Name = "Herb"
Herb.Value = 1
local HerbXP = Instance.new("IntValue", Attributes)
HerbXP.Name = "HerbXP"
HerbXP.Value = 0
local Alch = Instance.new("IntValue", Attributes)
Alch.Name = "Alch"
Alch.Value = 1
local AlchXP = Instance.new("IntValue", Attributes)
AlchXP.Name = "AlchXP"
AlchXP.Value = 0
end

leaderstats.XP.Changed:connect(function() onLvlChanged(XP, Lvl) end) -- HOW IS LEADERSTATS NIL?!?!?!?!?!?!??!!!!?! OMG I TRYED SO HARD TO FIX!!!!
leaderstats.Lvl.Changed:connect(function() onLvlUp(XP, Lvl) end)
Attributes.MiningXP.Changed:connect(function() onMiningChanged(MiningXP, Mining) end)
Attributes.Mining.Changed:connect(function() onMiningUp(MiningXP, Mining) end)
Attributes.SmithXP.Changed:connect(function() onSmithChanged(SmithXP, Smith) end)
Attributes.Smith.Changed:connect(function() onSmithUp(SmithXP, Smith) end)
Attributes.HerbXP.Changed:connect(function() onHerbChanged(HerbXP, Herb) end)
Attributes.Herb.Changed:connect(function() onHerbUp(HerbXP, Herb) end)
Attributes.AlchXP.Changed:connect(function() onAlchChanged(AlchXP, Alch) end)
Attributes.Alch.Changed:connect(function() onAlchUp(AlchXP, Alch) end)

local yudodis = Instance.new("TextButton", c)
yudodis.Name = "yudodis"
yudodis.Text = "PLAY"
yudodis.Font = "ArialBold"
yudodis.FontSize = "Size48"
yudodis.TextScaled = true
yudodis.Size = UDim2.new(0,750,0,210)
yudodis.Position = UDim2.new(0,100,0,210)
yudodis.TextColor3 = Color3.new(255/255,255/255,255/255)
if (yudodis ~= nil) then
function OnClick3()
local nopes = c
nopes:remove()

end
end
c:findFirstChild("e").MouseButton1Click:connect(onClick)
c:findFirstChild("f").MouseButton1Click:connect(onClick2)
c:findFirstChild("yudodis").MouseButton1Click:connect(onClick3)
-- 451 lines, getting closer, there is a major problem though >:O --
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
05 Jun 2013 12:14 PM
Almost 400th post...
well i bet this thread will die soon, but while its on the front scripting helpers is there, i NEED HELP W/ THIS SCRIPT, PLEASE!
Report Abuse
monster07 is not online. monster07
Joined: 19 Jul 2009
Total Posts: 533
05 Jun 2013 01:56 PM
No-Ones gonna help unless you say what isnt working (all of it and no-one will help)
Were not just gonna write the script for you. Isolate the lines that are broke
Report Abuse
RobloxWarrior89 is not online. RobloxWarrior89
Joined: 29 Mar 2012
Total Posts: 2388
05 Jun 2013 05:29 PM
Line 421!
Report Abuse
jiji1997 is not online. jiji1997
Joined: 28 Mar 2009
Total Posts: 134
06 Jun 2013 01:24 AM
Roblox, maybe if you actually were to make this instead of taking Ceth's script.. e.e Maybe then you would actually understand what was wrong.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image