eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
|
| 11 Apr 2012 11:29 PM |
function onXPChanged(player, XP, level) if XP.Value>=level.Value * 80 and level.Value < script.LevelCap.Value then XP.Value = XP.Value - level.Value * 80 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 = "Ball" fireworks.formFactor = "Symmetric" fireworks.Reflectance = 0.5 fireworks.Transparency = 0.5 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 local m = Instance.new("Hint") m.Parent = game.Workspace m.Text = player.Name .. "'s Level has been updated, Congratulations!" wait(5) m.Parent = nil end
function onLevelUp(player) wait(1) player.leaderstats1.Defense.Value = player.leaderstats.Class.Value + 100 --[[ local stuff = player.Backpack:GetChildren() wait(5) for i = 1,#stuff do local name = stuff[i].Name if game.Starterpack:findFirstChild(name)==nil then stuff[i]:Clone().Parent = player.Backpack end end --]] end
function onPlayerRespawned(player) wait(2) player.Character.Humanoid.Health = player.leaderstats1.Defense.Value + 1 player.Character.Humanoid.MaxHealth = player.leaderstats1.Defense.Value + 1 end
function onLevelUp(player) wait(2) player.Character.Humanoid.Health = player.leaderstats1.Defense.Value + 1 player.Character.Humanoid.MaxHealth = player.leaderstats1.Defense.Value + 1 --[[ local stuff = player.Backpack:GetChildren() wait(5) for i = 1,#stuff do local name = stuff[i].Name if game.Starterpack:findFirstChild(name)==nil then stuff[i]:Clone().Parent = player.Backpack end end --]] end
function onLevelUp(player) wait(1) player.leaderstats1.Skillpts.Value = player.leaderstats.Lvl.Value + 1 --[[ local stuff = player.Backpack:GetChildren() wait(5) for i = 1,#stuff do local name = stuff[i].Name if game.Starterpack:findFirstChild(name)==nil then stuff[i]:Clone().Parent = player.Backpack end end --]] end
function onPlayerEntered(newPlayer) local stats = Instance.new("IntValue") stats.Name = "leaderstats"
local stats1 = Instance.new("IntValue") stats1.Name = "leaderstats1"
local level = Instance.new("IntValue") level.Name = "Lvl" level.Value = 20
local xp = Instance.new("IntValue") xp.Name = "XP" xp.Value = 0
local gold = Instance.new("IntValue") gold.Name = "Gold" gold.Value = 20
local Fantasy = Instance.new("IntValue") Fantasy.Name = "Class" Fantasy.Value = 0
local Defense = Instance.new("IntValue") Defense.Name = "Defense" Defense.Value = 0
local Statpts = Instance.new("IntValue") Statpts.Name = "Skillpoints" Statpts.Value = 0
level.Parent = stats xp.Parent = stats gold.Parent = stats Fantasy.Parent = stats
Defense.Parent = stats1 Statpts.Parent = stats1
stats.Parent = newPlayer stats1.Parent = newPlayer
xp.Changed:connect(function() onXPChanged(newPlayer, xp, level) end) level.Changed:connect(function() onLevelUp(newPlayer, xp, level) end)
newPlayer.Changed:connect(function (property) if (property == "Character") then onPlayerRespawned(newPlayer) end end) end
game.Players.ChildAdded:connect(onPlayerEntered)
THESE WONT WORK:
function onLevelUp(player) wait(1) player.leaderstats1.Skillpts.Value = player.leaderstats.Lvl.Value + 1
function onLevelUp(player) wait(2) player.Character.Humanoid.Health = player.leaderstats1.Defense.Value + 1 player.Character.Humanoid.MaxHealth = player.leaderstats1.Defense.Value + 1
function onLevelUp(player) wait(1) player.leaderstats1.Defense.Value = player.leaderstats.Class.Value + 100 |
|
|
| Report Abuse |
|
|
Dentists
|
  |
| Joined: 09 Apr 2012 |
| Total Posts: 6624 |
|
| |
|
|
| 11 Apr 2012 11:30 PM |
| wat da hell do all these jumbled words and numbers do |
|
|
| Report Abuse |
|
|
nvva
|
  |
| Joined: 21 Mar 2012 |
| Total Posts: 388 |
|
| |
|
wowzee
|
  |
| Joined: 02 Apr 2010 |
| Total Posts: 22692 |
|
|
| 11 Apr 2012 11:31 PM |
| I really can't say, you will have much more help if you go to scripting helpers. |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 11 Apr 2012 11:39 PM |
| You didn't declare the variable 'XP' |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 11:41 PM |
| wat? what does it even do? |
|
|
| Report Abuse |
|
|
eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
|
| 11 Apr 2012 11:45 PM |
function onXPChanged(player, XP, level) if XP.Value>=level.Value * 80 and level.Value < script.LevelCap.Value then XP.Value = XP.Value - level.Value * 80 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 = "Ball" fireworks.formFactor = "Symmetric" fireworks.Reflectance = 0.5 fireworks.Transparency = 0.5 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 local m = Instance.new("Hint") m.Parent = game.Workspace m.Text = player.Name .. "'s Level has been updated, Congratulations!" wait(5) m.Parent = nil end
function onPlayerRespawned(player) wait(2) player.Character.Humanoid.Health = player.leaderstats1.Defense.Value + 1 player.Character.Humanoid.MaxHealth = player.leaderstats1.Defense.Value + 1 end
player.XP.Changed:connect(function() wait(1) player.leaderstats1.Skillpts.Value = player.leaderstats.Lvl.Value + 1 player.Character.Humanoid.Health = player.leaderstats1.Defense.Value + 1 player.Character.Humanoid.MaxHealth = player.leaderstats1.Defense.Value + 1 end)
function onPlayerEntered(newPlayer) local stats = Instance.new("IntValue") stats.Name = "leaderstats"
local stats1 = Instance.new("IntValue") stats1.Name = "leaderstats1"
local level = Instance.new("IntValue") level.Name = "Lvl" level.Value = 20
local xp = Instance.new("IntValue") xp.Name = "XP" xp.Value = 0
local gold = Instance.new("IntValue") gold.Name = "Gold" gold.Value = 20
local Fantasy = Instance.new("IntValue") Fantasy.Name = "Class" Fantasy.Value = 0
local Defense = Instance.new("IntValue") Defense.Name = "Defense" Defense.Value = 0
local Statpts = Instance.new("IntValue") Statpts.Name = "Skillpoints" Statpts.Value = 0
level.Parent = stats xp.Parent = stats gold.Parent = stats Fantasy.Parent = stats
Defense.Parent = stats1 Statpts.Parent = stats1
stats.Parent = newPlayer stats1.Parent = newPlayer
xp.Changed:connect(function() onXPChanged(newPlayer, xp, level) end) level.Changed:connect(function() onLevelUp(newPlayer, xp, level) end)
newPlayer.Changed:connect(function (property) if (property == "Character") then onPlayerRespawned(newPlayer) end end) end
game.Players.ChildAdded:connect(onPlayerEntered)
Doesnt work |
|
|
| Report Abuse |
|
|
eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
|
| 11 Apr 2012 11:46 PM |
function onXPChanged(player, XP, level) if XP.Value>=level.Value * 80 and level.Value < script.LevelCap.Value then XP.Value = XP.Value - level.Value * 80 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 = "Ball" fireworks.formFactor = "Symmetric" fireworks.Reflectance = 0.5 fireworks.Transparency = 0.5 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 local m = Instance.new("Hint") m.Parent = game.Workspace m.Text = player.Name .. "'s Level has been updated, Congratulations!" wait(5) m.Parent = nil end
function onPlayerRespawned(player) wait(2) player.Character.Humanoid.Health = player.leaderstats1.Defense.Value + 1 player.Character.Humanoid.MaxHealth = player.leaderstats1.Defense.Value + 1 end
player.XP.Changed:connect(function() wait(1) player.leaderstats1.Skillpts.Value = player.leaderstats.Lvl.Value + 1 player.Character.Humanoid.Health = player.leaderstats1.Defense.Value + 1 player.Character.Humanoid.MaxHealth = player.leaderstats1.Defense.Value + 1 end)
function onPlayerEntered(newPlayer) local stats = Instance.new("IntValue") stats.Name = "leaderstats"
local stats1 = Instance.new("IntValue") stats1.Name = "leaderstats1"
local level = Instance.new("IntValue") level.Name = "Lvl" level.Value = 20
local xp = Instance.new("IntValue") xp.Name = "XP" xp.Value = 0
local gold = Instance.new("IntValue") gold.Name = "Gold" gold.Value = 20
local Fantasy = Instance.new("IntValue") Fantasy.Name = "Class" Fantasy.Value = 0
local Defense = Instance.new("IntValue") Defense.Name = "Defense" Defense.Value = 0
local Statpts = Instance.new("IntValue") Statpts.Name = "Skillpoints" Statpts.Value = 0
level.Parent = stats xp.Parent = stats gold.Parent = stats Fantasy.Parent = stats
Defense.Parent = stats1 Statpts.Parent = stats1
stats.Parent = newPlayer stats1.Parent = newPlayer
xp.Changed:connect(function() onXPChanged(newPlayer, xp, level) end) level.Changed:connect(function() onLevelUp(newPlayer, xp, level) end)
newPlayer.Changed:connect(function (property) if (property == "Character") then onPlayerRespawned(newPlayer) end end) end
game.Players.ChildAdded:connect(onPlayerEntered)
still dont work :o |
|
|
| Report Abuse |
|
|
batsleep
|
  |
| Joined: 01 Feb 2009 |
| Total Posts: 13677 |
|
| |
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 11 Apr 2012 11:47 PM |
| You never declared common variables... |
|
|
| Report Abuse |
|
|
| |
|
eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
|
| 11 Apr 2012 11:49 PM |
function player.XP.Changed:connect(function() wait(1) player.leaderstats1.Skillpts.Value = player.leaderstats.Lvl.Value + 1 player.Character.Humanoid.Health = player.leaderstats1.Defense.Value + 1 player.Character.Humanoid.MaxHealth = player.leaderstats1.Defense.Value + 1 end
???? |
|
|
| Report Abuse |
|
|
| |
|
eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
| |
|
| |
|
eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
|
| 11 Apr 2012 11:57 PM |
@ret just enjyoing my youth o.o |
|
|
| Report Abuse |
|
|
| |
|
eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
| |
|
| |
|
Fortone
|
  |
| Joined: 19 Mar 2012 |
| Total Posts: 6332 |
|
| |
|
eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
| |
|
eddz99
|
  |
| Joined: 30 Dec 2009 |
| Total Posts: 1707 |
|
| |
|
|
| 14 Apr 2012 10:56 AM |
| Way to steal RME's script o.o |
|
|
| Report Abuse |
|
|
LuAManual
|
  |
| Joined: 02 Apr 2012 |
| Total Posts: 1238 |
|
|
| 14 Apr 2012 10:57 AM |
u forgot a space somewhere....
derp |
|
|
| Report Abuse |
|
|