idk if its the ends or a variable the elseif wont work
if(_G.MyPokemon[_G.def]) == "Bulbasaur" or (_G.MyPokemon[_G.def])=="Ivysaur" or (_G.MyPokemon[_G.def])=="Venusaur" then
wait(1)
if(_G.Level[_G.def]) >= 13 then -- WORKING
local newMove = "Vine Whip"
if(_G.Moves[_G.def][1] ~= newMove) and (_G.Moves[_G.def][2] ~= newMove) and (_G.Moves[_G.def][3] ~= newMove) and (_G.Moves[_G.def][4] ~= newMove) then
local Message = tostring(name).." learned "..tostring(newMove).."!"
TextLabel= script.Parent.BattleScreen.Frame.Frame.Options.Message
for i=1,#Message do
TextLabel.Text=string.sub(Message,0,i)
wait(.04)
end
local mymoves = {}
moveSlot = (#_G.Moves[_G.def])
if (moveSlot < 4) then
table.insert(_G.Moves[_G.def], newMove)
game.Players.LocalPlayer.PlayerGui.Moves.MainFrame.LearnedMove.Value = true
wait(1)
else
local Message = "No room to learn a new move! Delete a move."
TextLabel= script.Parent.BattleScreen.Frame.Frame.Options.Message
for i=1,#Message do
TextLabel.Text=string.sub(Message,0,i)
wait(.04)
end
_G.DeleteMove(newMove)
end
end
elseif(_G.Level[_G.def]) >= 20 then -- NOT WORKING
print("learning poison")
local newMove = "Poison Powder"
if(_G.Moves[_G.def][1] ~= newMove) and (_G.Moves[_G.def][2] ~= newMove) and (_G.Moves[_G.def][3] ~= newMove) and (_G.Moves[_G.def][4] ~= newMove) then
local Message = tostring(name).." learned "..tostring(newMove).."!"
TextLabel= script.Parent.BattleScreen.Frame.Frame.Options.Message
for i=1,#Message do
TextLabel.Text=string.sub(Message,0,i)
wait(.04)
end
local mymoves = {}
moveSlot = (#_G.Moves[_G.def])
if (moveSlot < 4) then
table.insert(_G.Moves[_G.def], newMove)
game.Players.LocalPlayer.PlayerGui.Moves.MainFrame.LearnedMove.Value = true
wait(1)
else
local Message = "No room to learn a new move! Delete a move."
TextLabel= script.Parent.BattleScreen.Frame.Frame.Options.Message
for i=1,#Message do
TextLabel.Text=string.sub(Message,0,i)
wait(.04)
end
_G.DeleteMove(newMove)
end
end
end |