So I am making a game which I want to your Magic to be random when you level up, so I made a leaderboard for Level, Magic and Money like this:
game.Players.PlayerAdded:connect(function(p) local stats = Instance.new("IntValue") stats.Name = "leaderstats" stats.Parent = p
local nivel = Instance.new("IntValue")
nivel.Name = "Level"
nivel.Value = 1
nivel.Parent = stats
local magia = Instance.new("IntValue")
magia.Name = "Magic"
magia.Value = 0
magia.Parent = stats
local dinheiro = Instance.new("IntValue")
dinheiro.Name = "Valis"
dinheiro.Value = 0
dinheiro.Parent = stats
end)
I know this may sounds like a request but I want to know if magia.Value is 1 and if it is gives a tool of Lightning, if it is 2 gives another tool also in Lightning.

3 comments
Add the WHOLE script inside the code block
Its my first time posting here, but the site doesnt let me choose what is part of the code.
Wouldn't an If statement solve your question?