Run it
Copy the script and paste it into your executor.
Players = :()
ReplicatedStorage = :()
UserInputService = :()
Lighting = :()
player = Players.LocalPlayer
playerGui = player:()
oldGui = playerGui:()
oldGui
oldGui:()
screenGui = .()
screenGui.Name =
screenGui.ResetOnSpawn =
screenGui.ZIndexBehavior = .ZIndexBehavior.Sibling
screenGui.Parent = playerGui
frame = .()
frame.Size = .(, , , )
frame.Position = .(, -, , )
frame.BackgroundColor3 = .(, , )
frame.Active =
frame.Parent = screenGui
.(, frame).CornerRadius = .(, )
titleBar = .()
titleBar.Size = .(, , , )
titleBar.BackgroundColor3 = .(, , )
titleBar.Parent = frame
.(, titleBar).CornerRadius = .(, )
titleFix = .()
titleFix.Size = .(, , , )
titleFix.Position = .(, , , -)
titleFix.BackgroundColor3 = .(, , )
titleFix.Parent = titleBar
title = .()
title.Size = .(, -, , )
title.Position = .(, , , )
title.BackgroundTransparency =
title.Text =
title.TextColor3 = .(, , )
title.TextSize =
title.Font = .Font.GothamBold
title.TextXAlignment = .TextXAlignment.Left
title.Parent = titleBar
minBtn = .()
minBtn.Size = .(, , , )
minBtn.Position = .(, -, , -)
minBtn.BackgroundColor3 = .(, , )
minBtn.Text =
minBtn.TextColor3 = .(, , )
minBtn.TextSize =
minBtn.Font = .Font.GothamBold
minBtn.Parent = titleBar
.(, minBtn).CornerRadius = .(, )
closeBtn = .()
closeBtn.Size = .(, , , )
closeBtn.Position = .(, -, , -)
closeBtn.BackgroundColor3 = .(, , )
closeBtn.Text =
closeBtn.TextColor3 = .(, , )
closeBtn.TextSize =
closeBtn.Font = .Font.GothamBold
closeBtn.Parent = titleBar
.(, closeBtn).CornerRadius = .(, )
logo = .()
logo.Size = .(, , , )
logo.Position = .(, -, , )
logo.BackgroundColor3 = .(, , )
logo.Text =
logo.TextColor3 = .(, , )
logo.TextSize =
logo.Font = .Font.GothamBold
logo.Visible =
logo.Parent = screenGui
.(, logo).CornerRadius = .(, )
tabBar = .()
tabBar.Size = .(, -, , )
tabBar.Position = .(, , , )
tabBar.BackgroundTransparency =
tabBar.Parent = frame
(name, posX, sizeX)
b = .()
b.Size = .(sizeX, -, , )
b.Position = .(posX, , , )
b.BackgroundColor3 = .(, , )
b.Text = name
b.TextColor3 = .(, , )
b.TextSize =
b.Font = .Font.GothamBold
b.TextTruncate = .TextTruncate.AtEnd
b.Parent = tabBar
.(, b).CornerRadius = .(, )
b
tabMovesBtn = (, , )
tabKillBtn = (, , )
tabBlastBtn = (, , )
tabShopBtn = (, , )
tabGiveBtn = (, , )
tabTrainerBtn = (, , )
tabSettingsBtn = (, , )
contentMoves = .()
contentMoves.Size = .(, -, , -)
contentMoves.Position = .(, , , )
contentMoves.BackgroundTransparency =
contentMoves.Parent = frame
contentKill = .()
contentKill.Size = .(, -, , -)
contentKill.Position = .(, , , )
contentKill.BackgroundTransparency =
contentKill.Visible =
contentKill.Parent = frame
contentBlast = .()
contentBlast.Size = .(, -, , -)
contentBlast.Position = .(, , , )
contentBlast.BackgroundTransparency =
contentBlast.Visible =
contentBlast.Parent = frame
contentShops = .()
contentShops.Size = .(, -, , -)
contentShops.Position = .(, , , )
contentShops.BackgroundTransparency =
contentShops.Visible =
contentShops.Parent = frame
contentGive = .()
contentGive.Size = .(, -, , -)
contentGive.Position = .(, , , )
contentGive.BackgroundTransparency =
contentGive.Visible =
contentGive.Parent = frame
contentTrainer = .()
contentTrainer.Size = .(, -, , -)
contentTrainer.Position = .(, , , )
contentTrainer.BackgroundTransparency =
contentTrainer.Visible =
contentTrainer.Parent = frame
contentSettings = .()
contentSettings.Size = .(, -, , -)
contentSettings.Position = .(, , , )
contentSettings.BackgroundTransparency =
contentSettings.Visible =
contentSettings.Parent = frame
(t)
contentMoves.Visible = t ==
contentKill.Visible = t ==
contentBlast.Visible = t ==
contentShops.Visible = t ==
contentGive.Visible = t ==
contentTrainer.Visible = t ==
contentSettings.Visible = t ==
tabMovesBtn.BackgroundColor3 = t ==
.(, , )
.(, , )
tabKillBtn.BackgroundColor3 = t ==
.(, , )
.(, , )
tabBlastBtn.BackgroundColor3 = t ==
.(, , )
.(, , )
tabShopBtn.BackgroundColor3 = t ==
.(, , )
.(, , )
tabGiveBtn.BackgroundColor3 = t ==
.(, , )
.(, , )
tabTrainerBtn.BackgroundColor3 = t ==
.(, , )
.(, , )
tabSettingsBtn.BackgroundColor3 = t ==
.(, , )
.(, , )
tabMovesBtn.MouseButton1Click:(()
()
)
tabKillBtn.MouseButton1Click:(()
()
)
tabBlastBtn.MouseButton1Click:(()
()
)
tabShopBtn.MouseButton1Click:(()
()
)
tabGiveBtn.MouseButton1Click:(()
()
)
tabTrainerBtn.MouseButton1Click:(()
()
)
tabSettingsBtn.MouseButton1Click:(()
()
)
()
selectedLabel = .()
selectedLabel.Size = .(, -, , )
selectedLabel.BackgroundColor3 = .(, , )
selectedLabel.Text =
selectedLabel.TextColor3 = .(, , )
selectedLabel.TextSize =
selectedLabel.Font = .Font.GothamBold
selectedLabel.TextTruncate = .TextTruncate.AtEnd
selectedLabel.Parent = contentMoves
.(, selectedLabel).CornerRadius = .(, )
infoMode =
allMovesMode =
allMovesBtn = .()
allMovesBtn.Name =
allMovesBtn.Size = .(, , , )
allMovesBtn.Position = .(, -, , )
allMovesBtn.BackgroundColor3 = .(, , )
allMovesBtn.Text =
allMovesBtn.TextColor3 = .(, , )
allMovesBtn.TextSize =
allMovesBtn.Font = .Font.GothamBold
allMovesBtn.Parent = contentMoves
.(, allMovesBtn).CornerRadius = .(, )
infoBtn = .()
infoBtn.Name =
infoBtn.Size = .(, , , )
infoBtn.Position = .(, -, , )
infoBtn.BackgroundColor3 = .(, , )
infoBtn.Text =
infoBtn.TextColor3 = .(, , )
infoBtn.TextSize =
infoBtn.Font = .Font.GothamBold
infoBtn.Parent = contentMoves
.(, infoBtn).CornerRadius = .(, )
moveSearch = .()
moveSearch.Size = .(, -, , )
moveSearch.Position = .(, , , )
moveSearch.BackgroundColor3 = .(, , )
moveSearch.Text =
moveSearch.PlaceholderText =
moveSearch.TextColor3 = .(, , )
moveSearch.TextSize =
moveSearch.Font = .Font.Gotham
moveSearch.ClearTextOnFocus =
moveSearch.Parent = contentMoves
.(, moveSearch).CornerRadius = .(, )
refreshBtn = .()
refreshBtn.Size = .(, , , )
refreshBtn.Position = .(, -, , )
refreshBtn.BackgroundColor3 = .(, , )
refreshBtn.Text =
refreshBtn.TextColor3 = .(, , )
refreshBtn.TextSize =
refreshBtn.Font = .Font.GothamBold
refreshBtn.Parent = contentMoves
.(, refreshBtn).CornerRadius = .(, )
backPokemonBtn = .()
backPokemonBtn.Name =
backPokemonBtn.Size = .(, , , )
backPokemonBtn.Position = .(, , , )
backPokemonBtn.BackgroundColor3 = .(, , )
backPokemonBtn.Text =
backPokemonBtn.TextColor3 = .(, , )
backPokemonBtn.TextSize =
backPokemonBtn.Font = .Font.GothamBold
backPokemonBtn.Visible =
backPokemonBtn.Parent = contentMoves
.(, backPokemonBtn).CornerRadius = .(, )
movesContainer = .()
movesContainer.Size = .(, , , -)
movesContainer.Position = .(, , , )
movesContainer.BackgroundTransparency =
movesContainer.Visible =
movesContainer.Parent = contentMoves
modelsContainer = .()
modelsContainer.Size = .(, , , -)
modelsContainer.Position = .(, , , )
modelsContainer.BackgroundTransparency =
modelsContainer.Visible =
modelsContainer.Parent = contentMoves
infoContainer = .()
infoContainer.Name =
infoContainer.Size = .(, , , -)
infoContainer.Position = .(, , , )
infoContainer.BackgroundColor3 = .(, , )
infoContainer.Visible =
infoContainer.Parent = contentMoves
.(, infoContainer).CornerRadius = .(, )
infoBackBtn = .()
infoBackBtn.Name =
infoBackBtn.Size = .(, , , )
infoBackBtn.Position = .(, , , )
infoBackBtn.BackgroundColor3 = .(, , )
infoBackBtn.Text =
infoBackBtn.TextColor3 = .(, , )
infoBackBtn.TextSize =
infoBackBtn.Font = .Font.GothamBold
infoBackBtn.Parent = infoContainer
.(, infoBackBtn).CornerRadius = .(, )
infoTitle = .()
infoTitle.Size = .(, -, , )
infoTitle.Position = .(, , , )
infoTitle.BackgroundTransparency =
infoTitle.Text =
infoTitle.TextColor3 = .(, , )
infoTitle.TextSize =
infoTitle.Font = .Font.GothamBold
infoTitle.TextXAlignment = .TextXAlignment.Left
infoTitle.TextTruncate = .TextTruncate.AtEnd
infoTitle.Parent = infoContainer
infoScroll = .()
infoScroll.Size = .(, -, , -)
infoScroll.Position = .(, , , )
infoScroll.BackgroundColor3 = .(, , )
infoScroll.BorderSizePixel =
infoScroll.ScrollBarThickness =
infoScroll.CanvasSize = .(, , , )
infoScroll.AutomaticCanvasSize = .AutomaticSize.Y
infoScroll.Parent = infoContainer
.(, infoScroll).CornerRadius = .(, )
infoPadding = .()
infoPadding.PaddingTop = .(, )
infoPadding.PaddingBottom = .(, )
infoPadding.PaddingLeft = .(, )
infoPadding.PaddingRight = .(, )
infoPadding.Parent = infoScroll
infoLayout = .()
infoLayout.Padding = .(, )
infoLayout.SortOrder = .SortOrder.LayoutOrder
infoLayout.Parent = infoScroll
(posX)
sc = .()
sc.Size = .(, , , )
sc.Position = .(posX, , , )
sc.BackgroundColor3 = .(, , )
sc.ScrollBarThickness =
sc.CanvasSize = .(, , , )
sc.Parent = movesContainer
.(, sc).CornerRadius = .(, )
layout = .()
layout.Padding = .(, )
layout.Parent = sc
padding = .()
padding.PaddingTop = .(, )
padding.PaddingLeft = .(, )
padding.PaddingRight = .(, )
padding.Parent = sc
layout:():(()
sc.CanvasSize = .(, , , layout.AbsoluteContentSize.Y + )
)
sc, layout
moveScroll1, moveLayout1 = ()
moveScroll2, moveLayout2 = ()
moveScroll3, moveLayout3 = ()
modelScroll = .()
modelScroll.Size = .(, , , -)
modelScroll.Position = .(, , , )
modelScroll.BackgroundColor3 = .(, , )
modelScroll.ScrollBarThickness =
modelScroll.CanvasSize = .(, , , )
modelScroll.Parent = modelsContainer
.(, modelScroll).CornerRadius = .(, )
modelLayout = .()
modelLayout.Padding = .(, )
modelLayout.Parent = modelScroll
modelPadding = .()
modelPadding.PaddingTop = .(, )
modelPadding.Parent = modelScroll
modelLayout:():(()
modelScroll.CanvasSize = .(, , , modelLayout.AbsoluteContentSize.Y + )
)
selectedModel =
selectedMove =
moveButtons = {}
modelButtons = {}
pinnedGuis = {}
moveData =
()
module = ReplicatedStorage:()
moveData =
module module:()
ok, result = (, module)
ok (result) ==
moveData = result
moveData
()
()
infoMode
infoBtn.BackgroundColor3 = .(, , )
infoBtn.Text =
infoBtn.Size = .(, , , )
infoBtn.Position = .(, -, , )
infoBtn.BackgroundColor3 = .(, , )
infoBtn.Text =
infoBtn.Size = .(, , , )
infoBtn.Position = .(, -, , )
(gui)
gui
n = .(gui.Name)
n:()
n:()
n:()
n:()
n:()
(gui)
gui pinnedGuis[gui]
pinnedGuis[gui] =
gui.AncestryChanged:(()
gui.Parent
pinnedGuis[gui] =
)
playerGui.ChildAdded:((child)
.()
child:() (child)
(child)
)
(model)
model
_, child (model:())
.(child.Name) == child:()
value = child.Value
value ~= (value) ~=
(value)
(model)
owner = model model:()
owner owner.Value
owner.Value == player owner.Value.Name == player.Name
.. owner.Value.Name ..
(model)
heldItem = (model)
model.Name .. (model) .. .. (heldItem )
(model)
model model:()
Players:(model)
model:()
owner = model:()
owner ~= owner:()
(model)
model
jokemonFolder = ReplicatedStorage:()
pokemonData = jokemonFolder jokemonFolder:(model.Name)
pokemonData pokemonData:()
(model)
movesFolder = (model)
names = {}
seen = {}
movesFolder names
(folder)
folder
_, move (folder:())
move.Name ~= seen[move.Name]
seen[move.Name] =
.(names, move.Name)
(movesFolder)
(movesFolder:())
.(names)
names
()
moveData
()
names = {}
(moveData) ==
name, data (moveData)
(name) == (data) ==
.(names, name)
.(names)
names
(sc, layout)
sc layout
sc.CanvasSize = .(, , , layout.AbsoluteContentSize.Y + )
()
_, sc ({moveScroll1, moveScroll2, moveScroll3})
_, child (sc:())
child:()
child:()
.(moveButtons)
()
_, child (modelScroll:())
child:()
child:()
.(modelButtons)
()
_, child (infoScroll:())
child:()
child:()
showPokemonList
showMoveList
showMoveInfo
()
selectedModel =
selectedMove =
movesContainer.Visible =
modelsContainer.Visible =
infoContainer.Visible =
backPokemonBtn.Visible =
moveSearch.Text =
moveSearch.PlaceholderText =
selectedLabel.Text = infoMode
()
showPokemonList = ()
selectedModel =
movesContainer.Visible =
modelsContainer.Visible =
infoContainer.Visible =
backPokemonBtn.Visible =
moveSearch.PlaceholderText =
selectedLabel.Text = infoMode
()
found = {}
seen = {}
_, model (:())
model:()
seen[model]
(model)
(model)
seen[model] =
.(found, model)
.(found, (a, b)
a.Name < b.Name
)
search = .(moveSearch.Text )
_, model (found)
search ==
.(.(model.Name), search, , )
owner = model:()
ownerName =
owner owner.Value
owner.Value == player
ownerName =
ownerName = .. owner.Value.Name ..
button = .()
button.Size = .(, -, , )
button.BackgroundColor3 = .(, , )
button.Text = (model)
button.TextColor3 = .(, , )
button.TextSize =
button.Font = .Font.GothamBold
button.TextTruncate = .TextTruncate.AtEnd
button.Parent = modelScroll
.(, button).CornerRadius = .(, )
modelButtons[model] = button
()
button button.Parent model model:()
button.Text = (model)
model.ChildAdded:((child)
child.Name == .(child.Name) ==
child:()
child.Changed:(updateThisModelLabel)
.(updateThisModelLabel)
)
_, child (model:())
(child.Name == .(child.Name) == ) child:()
child.Changed:(updateThisModelLabel)
button.MouseButton1Click:(()
model:()
selectedModel = model
selectedMove =
moveSearch.Text =
()
)
(modelScroll, modelLayout)
()
model, button (modelButtons)
button button.Parent
model model:()
button.Text = (model)
button:()
modelButtons[model] =
showMoveInfo = ()
selectedMove
selectedLabel.Text =
moveData
()
data = moveData moveData[selectedMove]
movesContainer.Visible =
modelsContainer.Visible =
infoContainer.Visible =
backPokemonBtn.Visible =
infoTitle.Text = selectedMove
()
order =
(labelText, valueText, highlight)
order +=
row = .()
row.Size = .(, -, , )
row.AutomaticSize = .AutomaticSize.Y
row.BackgroundColor3 = highlight
.(, , )
.(, , )
row.Text = .. labelText .. .. valueText
row.TextColor3 = highlight
.(, , )
.(, , )
row.TextSize =
row.Font = .Font.Gotham
row.TextWrapped =
row.TextXAlignment = .TextXAlignment.Left
row.TextYAlignment = .TextYAlignment.Top
row.LayoutOrder = order
row.Parent = infoScroll
.(, row).CornerRadius = .(, )
pad = .()
pad.PaddingTop = .(, )
pad.PaddingBottom = .(, )
pad.PaddingLeft = .(, )
pad.PaddingRight = .(, )
pad.Parent = row
(, selectedMove, )
(, selectedModel selectedModel.Name , )
data (data) ~=
(
,
,
)
selectedLabel.Text = .. selectedMove
preferredOrder = {
, , , , ,
, , , , ,
, , , ,
, , ,
, ,
, ,
, ,
, ,
, , ,
}
shown = {}
(value)
(value) ==
parts = {}
key, item (value)
.(parts, (key) .. .. (item))
.(parts)
.. .(parts, ) ..
(value)
_, key (preferredOrder)
data[key] ~=
shown[key] =
(key, (data[key]), )
remaining = {}
key (data)
shown[key]
.(remaining, key)
.(remaining, (a, b)
(a) < (b)
)
_, key (remaining)
((key), (data[key]), )
order <=
(, , )
infoScroll.CanvasPosition = .(, )
selectedLabel.Text = .. selectedMove
(moveName, columnIndex)
targetScroll
columnIndex ==
targetScroll = moveScroll1
columnIndex ==
targetScroll = moveScroll2
targetScroll = moveScroll3
button = .()
button.Size = .(, -, , )
button.BackgroundColor3 = .(, , )
button.Text = moveName
button.TextColor3 = .(, , )
button.TextSize =
button.Font = .Font.Gotham
button.TextTruncate = .TextTruncate.AtEnd
button.Parent = targetScroll
.(, button).CornerRadius = .(, )
moveButtons[moveName] = button
button.MouseButton1Click:(()
selectedModel selectedModel:()
selectedMove = moveName
name, moveButton (moveButtons)
moveButton.BackgroundColor3 = name == moveName
.(, , )
.(, , )
infoMode
()
remote = ReplicatedStorage:()
remote remote:()
selectedLabel.Text =
selectedLabel.Text = .. moveName .. .. selectedModel.Name
remote:(selectedModel, moveName, )
)
showMoveList = ()
selectedModel
movesContainer.Visible =
modelsContainer.Visible =
infoContainer.Visible =
backPokemonBtn.Visible =
moveSearch.PlaceholderText =
selectedLabel.Text = allMovesMode
( .. selectedModel.Name)
(infoMode
( .. selectedModel.Name)
( .. selectedModel.Name))
()
moveNames
allMovesMode
moveNames = ()
moveNames = (selectedModel)
search = .(moveSearch.Text )
filtered = {}
_, name (moveNames)
search ==
.(.(name), search, , )
.(filtered, name)
count = #filtered
moveScroll1.Visible =
moveScroll2.Visible = count >
moveScroll3.Visible = count >
count <=
moveScroll1.Size = .(, , , )
moveScroll1.Position = .(, , , )
count <=
moveScroll1.Size = .(, , , )
moveScroll1.Position = .(, , , )
moveScroll2.Size = .(, , , )
moveScroll2.Position = .(, , , )
moveScroll1.Size = .(, , , )
moveScroll1.Position = .(, , , )
moveScroll2.Size = .(, , , )
moveScroll2.Position = .(, , , )
moveScroll3.Size = .(, , , )
moveScroll3.Position = .(, , , )
columns = count <= count <=
i, name (filtered)
(name, (i - ) % columns)
(moveScroll1, moveLayout1)
(moveScroll2, moveLayout2)
(moveScroll3, moveLayout3)
backPokemonBtn.MouseButton1Click:(()
()
)
allMovesBtn.MouseButton1Click:(()
allMovesMode = allMovesMode
allMovesBtn.BackgroundColor3 = allMovesMode
.(, , )
.(, , )
allMovesMode
allMovesBtn.Text =
()
allMovesBtn.Text =
selectedModel selectedModel:()
moveSearch.Text =
()
)
infoBtn.MouseButton1Click:(()
infoMode = infoMode
()
infoMode
selectedMove selectedModel
()
selectedModel
()
selectedLabel.Text =
()
selectedLabel.Text =
infoContainer.Visible =
selectedModel selectedModel:()
()
selectedLabel.Text = .. selectedModel.Name
()
)
infoBackBtn.MouseButton1Click:(()
infoContainer.Visible =
selectedModel selectedModel:()
infoMode =
()
()
selectedLabel.Text =
selectedModel =
()
)
refreshBtn.MouseButton1Click:(()
infoContainer.Visible
()
()
selectedModel movesContainer.Visible
()
()
)
moveSearch:():(()
infoContainer.Visible
selectedModel movesContainer.Visible
()
()
)
(descendant)
.(()
attempt = ,
selectedModel infoContainer.Visible
()
()
descendant:()
.()
)
.DescendantAdded:((descendant)
descendant:() descendant.Name == .(descendant.Name) ==
(descendant)
)
.DescendantRemoving:((descendant)
descendant.Name == .(descendant.Name) ==
.(refreshMovesModelLabels)
)
.DescendantRemoving:((descendant)
descendant == selectedModel
.(showPokemonList)
)
()
()
Players = :()
ReplicatedStorage = :()
player = Players.LocalPlayer
battleRemote = ReplicatedStorage:()
autoTargetEnabled =
skipShinyEnabled =
skipCapturedEnabled =
killToggle = .()
killToggle.Size = .(, , , )
killToggle.Position = .(, , , )
killToggle.BackgroundColor3 = .(, , )
killToggle.TextColor3 = .(, , )
killToggle.Text =
killToggle.TextSize =
killToggle.Font = .Font.GothamBold
killToggle.Parent = contentKill
killCorner = .()
killCorner.CornerRadius = .(, )
killCorner.Parent = killToggle
shinyToggle = .()
shinyToggle.Size = .(, , , )
shinyToggle.Position = .(, , , )
shinyToggle.BackgroundColor3 = .(, , )
shinyToggle.TextColor3 = .(, , )
shinyToggle.Text =
shinyToggle.TextSize =
shinyToggle.Font = .Font.GothamBold
shinyToggle.Parent = contentKill
shinyCorner = .()
shinyCorner.CornerRadius = .(, )
shinyCorner.Parent = shinyToggle
captureToggle = .()
captureToggle.Size = .(, , , )
captureToggle.Position = .(, , , )
captureToggle.BackgroundColor3 = .(, , )
captureToggle.TextColor3 = .(, , )
captureToggle.Text =
captureToggle.TextSize =
captureToggle.Font = .Font.GothamBold
captureToggle.Parent = contentKill
captureCorner = .()
captureCorner.CornerRadius = .(, )
captureCorner.Parent = captureToggle
(model)
model
model:(, ) ~=
(model)
catchable = model:()
catchable ~=
catchable:()
catchable.Value ~=
killToggle.MouseButton1Click:(()
autoTargetEnabled = autoTargetEnabled
killToggle.Text = autoTargetEnabled
killToggle.BackgroundColor3 = autoTargetEnabled
.(, , )
.(, , )
)
shinyToggle.MouseButton1Click:(()
skipShinyEnabled = skipShinyEnabled
shinyToggle.Text = skipShinyEnabled
shinyToggle.BackgroundColor3 = skipShinyEnabled
.(, , )
.(, , )
)
captureToggle.MouseButton1Click:(()
skipCapturedEnabled = skipCapturedEnabled
captureToggle.Text = skipCapturedEnabled
captureToggle.BackgroundColor3 = skipCapturedEnabled
.(, , )
.(, , )
)
.(()
.()
autoTargetEnabled
wildFolder = :()
wildFolder
_, model (wildFolder:())
autoTargetEnabled
model:()
skipShinyEnabled (model)
skipCapturedEnabled (model)
model.Parent ~= wildFolder
skipShinyEnabled (model)
skipCapturedEnabled (model)
(()
battleRemote:(model)
)
.()
)
blastToggle = .()
blastToggle.Size = .(, , , )
blastToggle.Position = .(, , , )
blastToggle.BackgroundColor3 = .(, , )
blastToggle.Text =
blastToggle.TextColor3 = .(, , )
blastToggle.TextSize =
blastToggle.Font = .Font.GothamBold
blastToggle.Parent = contentBlast
.(, blastToggle).CornerRadius = .(, )
blastRunning2 =
blastToggle.MouseButton1Click:(()
blastRunning2 = blastRunning2
blastRunning2
blastToggle.Text =
blastToggle.TextColor3 = .(, , )
blastToggle.BackgroundColor3 = .(, , )
.(()
blastRunning2
attackRemote = ReplicatedStorage:()
attackRemote attackRemote:()
i = ,
blastRunning2
(()
attackRemote:(i)
)
.()
.()
)
blastToggle.Text =
blastToggle.TextColor3 = .(, , )
blastToggle.BackgroundColor3 = .(, , )
)
shopSearch = .()
shopSearch.Size = .(, -, , )
shopSearch.Position = .(, , , )
shopSearch.BackgroundColor3 = .(, , )
shopSearch.Text =
shopSearch.PlaceholderText =
shopSearch.TextColor3 = .(, , )
shopSearch.TextSize =
shopSearch.Font = .Font.Gotham
shopSearch.Parent = contentShops
.(, shopSearch).CornerRadius = .(, )
shopRefresh = .()
shopRefresh.Size = .(, , , )
shopRefresh.Position = .(, -, , )
shopRefresh.BackgroundColor3 = .(, , )
shopRefresh.Text =
shopRefresh.TextColor3 = .(, , )
shopRefresh.TextSize =
shopRefresh.Font = .Font.GothamBold
shopRefresh.Parent = contentShops
.(, shopRefresh).CornerRadius = .(, )
shopScroll = .()
shopScroll.Size = .(, , , -)
shopScroll.Position = .(, , , )
shopScroll.BackgroundColor3 = .(, , )
shopScroll.ScrollBarThickness =
shopScroll.CanvasSize = .(, , , )
shopScroll.Parent = contentShops
.(, shopScroll).CornerRadius = .(, )
shopLayout = .()
shopLayout.Padding = .(, )
shopLayout.Parent = shopScroll
shopPadding = .()
shopPadding.PaddingTop = .(, )
shopPadding.Parent = shopScroll
(guiObj)
guiObj
(()
cur = guiObj
cur cur ~= playerGui
cur:()
cur.Enabled =
cur:() cur:()
cur.Visible =
cur = cur.Parent
guiObj:() guiObj:()
guiObj.Visible =
guiObj.Parent guiObj.Parent:()
guiObj.Parent.Visible =
)
shopButtons = {}
()
_, b (shopButtons)
b b.Parent
b:()
.(shopButtons)
(name, obj)
btn = .()
btn.Size = .(, -, , )
btn.BackgroundColor3 = .(, , )
btn.Text = .. name
btn.TextColor3 = .(, , )
btn.TextSize =
btn.Font = .Font.GothamBold
btn.TextXAlignment = .TextXAlignment.Left
btn.Parent = shopScroll
.(, btn).CornerRadius = .(, )
padding = .()
padding.PaddingLeft = .(, )
padding.Parent = btn
.(shopButtons, btn)
btn.MouseButton1Click:(()
(obj)
)
(filter)
()
filter = filter .(filter)
added = {}
tmShops = playerGui:()
tmShops
_, shop (tmShops:())
filter ==
.(.(shop.Name), , #filter) == filter
( .. shop.Name, shop)
added[shop.Name] =
itemShops = playerGui:()
itemShops
_, shop (itemShops:())
filter ==
.(.(shop.Name), , #filter) == filter
( .. shop.Name, shop)
added[shop.Name] =
_, directName ({
,
,
})
g = playerGui:(directName)
g added[g.Name]
filter ==
.(.(g.Name), , #filter) == filter
(g.Name .. , g)
added[g.Name] =
_, gui (playerGui:())
gui:()
.(.(gui.Name), )
added[gui.Name]
filter ==
.(.(gui.Name), , #filter) == filter
(gui.Name .. , gui)
added[gui.Name] =
.(()
shopScroll.CanvasSize =
.(, , , shopLayout.AbsoluteContentSize.Y + )
)
shopRefresh.MouseButton1Click:(()
(shopSearch.Text)
)
shopSearch:():(()
(shopSearch.Text)
)
()
giveSelectedItem =
giveSelectedModel =
giveAllMode =
giveItemButtons = {}
giveModelButtons = {}
giveItems = {}
giveRemote = ReplicatedStorage:()
giveHeader = .()
giveHeader.Size = .(, , , )
giveHeader.Position = .(, , , )
giveHeader.BackgroundColor3 = .(, , )
giveHeader.Text =
giveHeader.TextColor3 = .(, , )
giveHeader.TextSize =
giveHeader.Font = .Font.GothamBold
giveHeader.Parent = contentGive
.(, giveHeader).CornerRadius = .(, )
giveStatus = .()
giveStatus.Size = .(, , , )
giveStatus.Position = .(, , , )
giveStatus.BackgroundColor3 = .(, , )
giveStatus.Text =
giveStatus.TextColor3 = .(, , )
giveStatus.TextSize =
giveStatus.Font = .Font.GothamBold
giveStatus.TextTruncate = .TextTruncate.AtEnd
giveStatus.Parent = contentGive
.(, giveStatus).CornerRadius = .(, )
giveSearch = .()
giveSearch.Size = .(, -, , )
giveSearch.Position = .(, , , )
giveSearch.BackgroundColor3 = .(, , )
giveSearch.Text =
giveSearch.PlaceholderText =
giveSearch.TextColor3 = .(, , )
giveSearch.TextSize =
giveSearch.Font = .Font.Gotham
giveSearch.ClearTextOnFocus =
giveSearch.Parent = contentGive
.(, giveSearch).CornerRadius = .(, )
giveRefresh = .()
giveRefresh.Size = .(, , , )
giveRefresh.Position = .(, -, , )
giveRefresh.BackgroundColor3 = .(, , )
giveRefresh.Text =
giveRefresh.TextColor3 = .(, , )
giveRefresh.TextSize =
giveRefresh.Font = .Font.GothamBold
giveRefresh.Parent = contentGive
.(, giveRefresh).CornerRadius = .(, )
giveItemsContainer = .()
giveItemsContainer.Size = .(, , , -)
giveItemsContainer.Position = .(, , , )
giveItemsContainer.BackgroundTransparency =
giveItemsContainer.Visible =
giveItemsContainer.Parent = contentGive
giveChoosePokemon = .()
giveChoosePokemon.Size = .(, , , )
giveChoosePokemon.Position = .(, , , )
giveChoosePokemon.BackgroundColor3 = .(, , )
giveChoosePokemon.Text =
giveChoosePokemon.TextColor3 = .(, , )
giveChoosePokemon.TextSize =
giveChoosePokemon.Font = .Font.GothamBold
giveChoosePokemon.Parent = giveItemsContainer
.(, giveChoosePokemon).CornerRadius = .(, )
giveItemScroll = .()
giveItemScroll.Size = .(, , , -)
giveItemScroll.Position = .(, , , )
giveItemScroll.BackgroundColor3 = .(, , )
giveItemScroll.ScrollBarThickness =
giveItemScroll.CanvasSize = .(, , , )
giveItemScroll.AutomaticCanvasSize = .AutomaticSize.None
giveItemScroll.Parent = giveItemsContainer
.(, giveItemScroll).CornerRadius = .(, )
giveItemLayout = .()
giveItemLayout.Padding = .(, )
giveItemLayout.Parent = giveItemScroll
giveItemPadding = .()
giveItemPadding.PaddingTop = .(, )
giveItemPadding.Parent = giveItemScroll
giveModelsContainer = .()
giveModelsContainer.Size = .(, , , -)
giveModelsContainer.Position = .(, , , )
giveModelsContainer.BackgroundTransparency =
giveModelsContainer.Visible =
giveModelsContainer.Parent = contentGive
giveTopBar = .()
giveTopBar.Size = .(, , , )
giveTopBar.BackgroundTransparency =
giveTopBar.Parent = giveModelsContainer
giveBack = .()
giveBack.Size = .(, , , )
giveBack.BackgroundColor3 = .(, , )
giveBack.Text =
giveBack.TextColor3 = .(, , )
giveBack.TextSize =
giveBack.Font = .Font.GothamBold
giveBack.Parent = giveTopBar
.(, giveBack).CornerRadius = .(, )
giveRefreshModels = .()
giveRefreshModels.Size = .(, , , )
giveRefreshModels.Position = .(, , , )
giveRefreshModels.BackgroundColor3 = .(, , )
giveRefreshModels.Text =
giveRefreshModels.TextColor3 = .(, , )
giveRefreshModels.TextSize =
giveRefreshModels.Font = .Font.GothamBold
giveRefreshModels.Parent = giveTopBar
.(, giveRefreshModels).CornerRadius = .(, )
giveSelectAllModels = .()
giveSelectAllModels.Size = .(, , , )
giveSelectAllModels.Position = .(, , , )
giveSelectAllModels.BackgroundColor3 = .(, , )
giveSelectAllModels.Text =
giveSelectAllModels.TextColor3 = .(, , )
giveSelectAllModels.TextSize =
giveSelectAllModels.Font = .Font.GothamBold
giveSelectAllModels.Parent = giveModelsContainer
.(, giveSelectAllModels).CornerRadius = .(, )
giveModelScroll = .()
giveModelScroll.Size = .(, , , -)
giveModelScroll.Position = .(, , , )
giveModelScroll.BackgroundColor3 = .(, , )
giveModelScroll.ScrollBarThickness =
giveModelScroll.CanvasSize = .(, , , )
giveModelScroll.Parent = giveModelsContainer
.(, giveModelScroll).CornerRadius = .(, )
giveModelLayout = .()
giveModelLayout.Padding = .(, )
giveModelLayout.Parent = giveModelScroll
giveModelPadding = .()
giveModelPadding.PaddingTop = .(, )
giveModelPadding.Parent = giveModelScroll
()
giveItemScroll.CanvasSize = .(
, , , giveItemLayout.AbsoluteContentSize.Y +
)
()
giveModelScroll.CanvasSize = .(
, , , giveModelLayout.AbsoluteContentSize.Y +
)
giveItemLayout:():(
updateGiveItemCanvas
)
giveModelLayout:():(
updateGiveModelCanvas
)
()
_, button (giveItemButtons)
button button.Parent
button:()
.(giveItemButtons)
()
_, button (giveModelButtons)
button button.Parent
button:()
.(giveModelButtons)
()
giveItemsContainer.Visible =
giveModelsContainer.Visible =
pokemonName = giveAllMode (giveSelectedModel giveSelectedModel.Name )
giveStatus.Text = .. pokemonName ..
()
()
giveItemsContainer.Visible =
giveModelsContainer.Visible =
giveStatus.Text =
()
(itemName)
itemName ==
itemName = (itemName)
itemName = itemName:(, ):(, )
cleaned, count = itemName:(, )
count ==
itemName = cleaned
itemName = itemName:(, ):(, )
itemName ==
itemName
()
remote = ReplicatedStorage:()
remote remote:()
giveStatus.Text =
remote
(obj)
(obj)
(obj)
owner = obj:()
ownerText =
owner owner.Value
owner.Value == player owner.Value.Name == player.Name
ownerText =
ownerText = .. owner.Value.Name ..
heldItem = (obj)
heldItem
ownerText .. .. heldItem
ownerText ..
(obj)
obj obj.Parent
obj:() (obj)
giveModelButtons[obj]
modelButton = .()
modelButton.Size = .(, -, , )
modelButton.BackgroundColor3 = .(, , )
modelButton.Text = obj.Name .. (obj)
modelButton.TextColor3 = .(, , )
modelButton.TextSize =
modelButton.Font = .Font.GothamBold
modelButton.TextXAlignment = .TextXAlignment.Left
modelButton.TextTruncate = .TextTruncate.AtEnd
modelButton.Parent = giveModelScroll
.(, modelButton).CornerRadius = .(, )
padding = .()
padding.PaddingLeft = .(, )
padding.Parent = modelButton
giveModelButtons[obj] = modelButton
()
modelButton modelButton.Parent obj:()
modelButton.Text = obj.Name .. (obj)
obj.ChildAdded:((child)
child.Name == .(child.Name) ==
child:()
child.Changed:(updateThisGiveModelLabel)
.(updateThisGiveModelLabel)
)
_, child (obj:())
(child.Name == .(child.Name) == ) child:()
child.Changed:(updateThisGiveModelLabel)
modelButton.MouseButton1Click:(()
obj.Parent
modelButton.Parent
modelButton:()
giveModelButtons[obj] =
()
giveAllMode =
giveSelectedModel = obj
giveSelectedItem =
giveSelectAllModels.Text =
giveStatus.Text = .. obj.Name
()
)
()
()
found = {}
_, obj (:())
obj:() (obj)
found[obj] =
(obj)
obj, button (giveModelButtons)
found[obj] obj:()
button button.Parent button:()
giveModelButtons[obj] =
()
============================================
giveSelectAllModels.MouseButton1Click:Connect(function()
scanGiveModels()
local count = 0
for model in pairs(giveModelButtons) do
if model and model:IsDescendantOf(workspace) and hasOwner(model) then
count += 1
end
end
if count == 0 then
giveStatus.Text = "No eligible Pokémon found"
return
end
giveAllMode = true
giveSelectedModel = nil
giveSelectedItem = nil
giveStatus.Text = "ALL POKEMON SELECTED: " .. count .. " | Choose an item"
showGiveItemList()
end)
-- ============================================================
-- GET ITEM NAME FROM GUI OBJECT
-- ============================================================
local function getItemNameFromObject(obj)
if not obj then
return nil
end
if obj:IsA("TextButton")
or obj:IsA("TextLabel")
or obj:IsA("TextBox") then
local text = obj.Text
if text and text ~= "" then
return cleanGiveItemName(text)
end
end
local itemName = obj:GetAttribute("ItemName")
if itemName then
return cleanGiveItemName(itemName)
end
local itemAttribute = obj:GetAttribute("Item")
if itemAttribute then
return cleanGiveItemName(itemAttribute)
end
return cleanGiveItemName(obj.Name)
end
-- ============================================================
-- CREATE ITEM BUTTON
-- ============================================================
local function addGiveItemButton(itemName, shopName)
itemName = cleanGiveItemName(itemName)
if not itemName then
return
end
-- Use the cleaned name as the unique key.
local key = string.lower(itemName)
if giveItemButtons[key] then
return
end
local button = Instance.new("TextButton")
button.Size = UDim2.new(1, -8, 0, 25)
button.BackgroundColor3 =
string.lower(itemName) == string.lower(giveSelectedItem or "")
and Color3.fromRGB(150, 80, 25)
or Color3.fromRGB(40, 40, 50)
-- Display ONLY the item name.
-- No [6], [Mega Stone], [Items], or shop label.
button.Text = itemName
button.TextColor3 = Color3.new(1, 1, 1)
button.TextSize = 8
button.Font = Enum.Font.GothamBold
button.TextXAlignment = Enum.TextXAlignment.Left
button.TextTruncate = Enum.TextTruncate.AtEnd
button.Parent = giveItemScroll
Instance.new("UICorner", button).CornerRadius = UDim.new(0, 5)
local padding = Instance.new("UIPadding")
padding.PaddingLeft = UDim.new(0, 8)
padding.Parent = button
giveItemButtons[key] = button
button.MouseButton1Click:Connect(function()
if not giveAllMode and (not giveSelectedModel or not giveSelectedModel:IsDescendantOf(workspace)) then
giveStatus.Text = "Select a Pokemon first"
showGiveModels()
return
end
giveSelectedItem = itemName
for _, b in pairs(giveItemButtons) do
if b and b.Parent then
b.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
end
end
button.BackgroundColor3 = Color3.fromRGB(150, 80, 25)
local remote = getGiveRemote()
if not remote then
return
end
if giveAllMode then
local recipients = {}
for model in pairs(giveModelButtons) do
if model and model:IsDescendantOf(workspace) and hasOwner(model) then
table.insert(recipients, model)
end
end
table.sort(recipients, function(a, b) return a.Name < b.Name end)
local sent, failed = 0, 0
for index, recipient in ipairs(recipients) do
if recipient:IsDescendantOf(workspace) then
local ok = pcall(function()
remote:FireServer(recipient, itemName)
end)
if ok then sent += 1 else failed += 1 end
end
if index % 8 == 0 then
giveStatus.Text = "Giving " .. itemName .. "... " .. index .. "/" .. #recipients
task.wait(0.03)
end
end
giveStatus.Text = "Gave " .. itemName .. " to " .. sent .. " Pokémon" .. (failed > 0 and (" | Failed: " .. failed) or "")
giveAllMode = false
giveSelectedModel = nil
showGiveModels()
else
local selectedPokemon = giveSelectedModel
local success = pcall(function()
remote:FireServer(selectedPokemon, itemName)
end)
if success then
giveStatus.Text = "Sent: " .. itemName .. " → " .. selectedPokemon.Name
else
giveStatus.Text = "Failed to send item"
end
end
end)
end
-- ============================================================
-- SCAN ITEMS
-- ============================================================
local function scanGiveItems(filter)
clearGiveItems()
table.clear(giveItems)
filter = string.lower(tostring(filter or ""))
local itemShops = playerGui:FindFirstChild("ItemShops")
local scanned = {}
local function addFoundItem(itemName, shopName)
itemName = cleanGiveItemName(itemName)
if not itemName or itemName == "" then
return
end
-- Exclude names containing Ball.
local lowerName = string.lower(itemName)
if string.find(lowerName, "ball", 1, true) then
return
end
-- Exclude names starting with TM, case-insensitively.
if string.sub(lowerName, 1, 2) == "tm" then
return
end
-- Case-insensitive substring search.
-- Searching "ite" finds every name containing "ite".
if filter ~= ""
and not string.find(lowerName, filter, 1, true) then
return
end
-- Deduplicate using the cleaned item name.
local uniqueKey = lowerName
if scanned[uniqueKey] then
return
end
scanned[uniqueKey] = true
table.insert(giveItems, {
Name = itemName,
Shop = shopName or ""
})
end
-- =========================================================
-- SCAN ITEMSHOPS
-- =========================================================
if itemShops then
for _, shopNumber in ipairs(itemShops:GetChildren()) do
local scrollingFrames = {}
for _, descendant in ipairs(shopNumber:GetDescendants()) do
if descendant:IsA("ScrollingFrame") then
table.insert(scrollingFrames, descendant)
end
end
if shopNumber:IsA("ScrollingFrame") then
table.insert(scrollingFrames, shopNumber)
end
for _, scrollingFrame in ipairs(scrollingFrames) do
for _, item in ipairs(scrollingFrame:GetChildren()) do
if item:IsA("GuiObject") then
local itemName = getItemNameFromObject(item)
if itemName
and itemName ~= "UIListLayout"
and itemName ~= "UIPadding"
and itemName ~= "UICorner" then
addFoundItem(itemName, shopNumber.Name)
end
end
end
end
end
end
-- =========================================================
-- SCAN ReplicatedStorage.Items
-- =========================================================
local itemsModule = ReplicatedStorage:FindFirstChild("Items")
if itemsModule and itemsModule:IsA("ModuleScript") then
local success, itemData = pcall(require, itemsModule)
if success and type(itemData) == "table" then
for itemName in pairs(itemData) do
if type(itemName) == "string" then
addFoundItem(itemName, "Items")
end
end
end
end
-- =========================================================
-- ALWAYS INCLUDE THESE THREE ITEMS
-- =========================================================
addFoundItem("Rayquazite", "Special")
addFoundItem("Skarmorite", "Special")
addFoundItem("Dragonitite", "Special")
-- =========================================================
-- SORT ALPHABETICALLY
-- =========================================================
table.sort(giveItems, function(a, b)
return string.lower(a.Name) < string.lower(b.Name)
end)
-- =========================================================
-- CREATE BUTTONS
-- =========================================================
for _, itemData in ipairs(giveItems) do
addGiveItemButton(itemData.Name, itemData.Shop)
end
if #giveItems == 0 then
giveStatus.Text = "No items found"
else
giveStatus.Text = "Items Found: " .. #giveItems
end
updateGiveItemCanvas()
end
-- ============================================================
-- SEARCH AND SCAN BUTTONS
-- ============================================================
giveRefresh.MouseButton1Click:Connect(function()
scanGiveItems(giveSearch.Text)
end)
giveSearch:GetPropertyChangedSignal("Text"):Connect(function()
scanGiveItems(giveSearch.Text)
end)
-- ============================================================
-- BACK TO ITEMS
-- ============================================================
giveBack.MouseButton1Click:Connect(function()
giveSelectedModel = nil
giveSelectedItem = nil
giveAllMode = false
showGiveModels()
end)
giveChoosePokemon.MouseButton1Click:Connect(function()
giveSelectedModel = nil
giveSelectedItem = nil
giveAllMode = false
showGiveModels()
end)
-- ============================================================
-- REFRESH MODELS
-- ============================================================
giveRefreshModels.MouseButton1Click:Connect(function()
scanGiveModels()
giveStatus.Text = "Select a Pokemon first"
end)
-- ============================================================
-- INITIAL SCAN
-- ============================================================
scanGiveItems("")
scanGiveModels()
showGiveModels()
-- ============================================================
-- WATCH FOR ITEMSHOPS
-- ============================================================
playerGui.ChildAdded:Connect(function(child)
if child.Name == "ItemShops" then
task.wait(0.3)
scanGiveItems(giveSearch.Text)
child.DescendantAdded:Connect(function()
task.wait(0.15)
if contentGive.Visible and giveItemsContainer.Visible then
scanGiveItems(giveSearch.Text)
end
end)
child.DescendantRemoving:Connect(function()
task.wait(0.15)
if contentGive.Visible and giveItemsContainer.Visible then
scanGiveItems(giveSearch.Text)
end
end)
end
end)
local existingItemShops = playerGui:FindFirstChild("ItemShops")
if existingItemShops then
existingItemShops.DescendantAdded:Connect(function()
task.wait(0.15)
if contentGive.Visible and giveItemsContainer.Visible then
scanGiveItems(giveSearch.Text)
end
end)
existingItemShops.DescendantRemoving:Connect(function()
task.wait(0.15)
if contentGive.Visible and giveItemsContainer.Visible then
scanGiveItems(giveSearch.Text)
end
end)
end
-- ============================================================
-- WATCH FOR NEW MODELS
-- ============================================================
local function refreshGiveModelLabels()
for model, button in pairs(giveModelButtons) do
if model and button and button.Parent and model:IsDescendantOf(workspace) then
button.Text = model.Name .. getGiveOwnerLabel(model)
end
end
end
local function tryAddGiveModel(model)
if not model or not model:IsA("Model") then return end
for attempt = 1, 6 do
if not model:IsDescendantOf(workspace) then return end
if hasOwner(model) then
addGiveModelButton(model)
refreshGiveModelLabels()
return
end
task.wait(0.08)
end
end
workspace.DescendantAdded:Connect(function(obj)
if obj:IsA("Model") then
task.defer(tryAddGiveModel, obj)
elseif obj.Name == "Owner" or string.lower(obj.Name) == "helditem" then
local model = obj:FindFirstAncestorOfClass("Model")
if model then task.defer(tryAddGiveModel, model) end
task.defer(refreshGiveModelLabels)
end
end)
workspace.DescendantRemoving:Connect(function(obj)
if obj.Name == "Owner" or string.lower(obj.Name) == "helditem" then
task.defer(refreshGiveModelLabels)
end
end)
-- ============================================================
-- REMOVE MODELS THAT DISAPPEAR
-- ============================================================
workspace.DescendantRemoving:Connect(function(obj)
local button = giveModelButtons[obj]
if button then
if button.Parent then
button:Destroy()
end
giveModelButtons[obj] = nil
updateGiveModelCanvas()
end
end)
-- TRAINER TAB
-- Requires: player, ReplicatedStorage, contentTrainer
local trainersFolder = workspace:FindFirstChild("Trainers")
local fightRemote = ReplicatedStorage:FindFirstChild("FightTrainer")
local battleRemote = ReplicatedStorage:FindFirstChild("Battle")
local selectedTrainer = nil
local fightEnabled = false
local battleEnabled = false
local fightThreadRunning = false
local battleThreadRunning = false
local trainerButtons = {}
-- HELPERS
local function getMonsterFolder(trainer)
return trainer and trainer:FindFirstChild("Monster")
end
-- DISPLAY ONLY 5 POKÉMON NAMES, THEN "+ X MORE"
-- This only changes the displayed text, not which Pokémon Battle uses.
local function getPokemonNames(trainer)
local folder = getMonsterFolder(trainer)
if not folder then
return "No Pokémon"
end
local pokemon = folder:GetChildren()
table.sort(pokemon, function(a, b)
return a.Name:lower() < b.Name:lower()
end)
if #pokemon == 0 then
return "No Pokémon"
end
local names = {}
local showCount = math.min(5, #pokemon)
for i = 1, showCount do
table.insert(names, pokemon[i].Name)
end
local result = table.concat(names, ", ")
if #pokemon > 5 then
result = result .. " +" .. (#pokemon - 5) .. " more"
end
return result
end
-- NEW: GET A SORTING KEY FROM EACH TRAINER'S POKÉMON
-- Uses the alphabetically first Pokémon name as the primary key.
local function getTrainerPokemonSortKey(trainer)
local folder = getMonsterFolder(trainer)
if not folder then
return "zzzz_no_pokemon"
end
local pokemon = folder:GetChildren()
if #pokemon == 0 then
return "zzzz_no_pokemon"
end
local names = {}
for _, monster in ipairs(pokemon) do
table.insert(names, monster.Name:lower())
end
table.sort(names)
return names[1]
end
local function rounded(instance, radius)
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, radius or 6)
corner.Parent = instance
end
local function makeButton(parent, text, position, size, color)
local button = Instance.new("TextButton")
button.Position = position
button.Size = size
button.BackgroundColor3 = color
button.Text = text
button.TextColor3 = Color3.new(1, 1, 1)
button.TextSize = 9
button.Font = Enum.Font.GothamBold
button.TextWrapped = true
button.Parent = parent
rounded(button)
return button
end
-- TITLE
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, -8, 0, 22)
title.Position = UDim2.new(0, 4, 0, 2)
title.BackgroundTransparency = 1
title.Text = "TRAINER AUTOMATION"
title.TextColor3 = Color3.fromRGB(220, 150, 255)
title.TextSize = 12
title.Font = Enum.Font.GothamBold
title.Parent = contentTrainer
-- STATUS
local status = Instance.new("TextLabel")
status.Size = UDim2.new(1, -8, 0, 18)
status.Position = UDim2.new(0, 4, 0, 24)
status.BackgroundTransparency = 1
status.Text = "Status: Select a trainer"
status.TextColor3 = Color3.fromRGB(180, 180, 180)
status.TextSize = 9
status.Font = Enum.Font.Gotham
status.TextXAlignment = Enum.TextXAlignment.Left
status.TextTruncate = Enum.TextTruncate.AtEnd
status.Parent = contentTrainer
-- SELECTED TRAINER
local selectedLabel = Instance.new("TextLabel")
selectedLabel.Size = UDim2.new(1, -8, 0, 26)
selectedLabel.Position = UDim2.new(0, 4, 0, 43)
selectedLabel.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
selectedLabel.Text = "Trainer: NONE"
selectedLabel.TextColor3 = Color3.fromRGB(230, 230, 230)
selectedLabel.TextSize = 9
selectedLabel.Font = Enum.Font.GothamBold
selectedLabel.TextWrapped = true
selectedLabel.Parent = contentTrainer
rounded(selectedLabel)
-- SCROLLABLE TRAINER LIST
local trainerList = Instance.new("ScrollingFrame")
trainerList.Size = UDim2.new(1, -8, 0, 112)
trainerList.Position = UDim2.new(0, 4, 0, 72)
trainerList.BackgroundColor3 = Color3.fromRGB(25, 25, 32)
trainerList.BorderSizePixel = 0
trainerList.ScrollBarThickness = 4
trainerList.AutomaticCanvasSize = Enum.AutomaticSize.Y
trainerList.CanvasSize = UDim2.new(0, 0, 0, 0)
trainerList.Parent = contentTrainer
rounded(trainerList)
local trainerLayout = Instance.new("UIListLayout")
trainerLayout.Padding = UDim.new(0, 4)
trainerLayout.SortOrder = Enum.SortOrder.LayoutOrder
trainerLayout.Parent = trainerList
local trainerPadding = Instance.new("UIPadding")
trainerPadding.PaddingTop = UDim.new(0, 4)
trainerPadding.PaddingBottom = UDim.new(0, 4)
trainerPadding.PaddingLeft = UDim.new(0, 4)
trainerPadding.PaddingRight = UDim.new(0, 4)
trainerPadding.Parent = trainerList
-- ACTION BUTTONS
local teleportButton = makeButton(
contentTrainer,
"TELEPORT",
UDim2.new(0.02, 0, 0, 188),
UDim2.new(0.32, 0, 0, 28),
Color3.fromRGB(70, 70, 120)
)
local fightToggle = makeButton(
contentTrainer,
"FIGHT: OFF",
UDim2.new(0.34, 0, 0, 188),
UDim2.new(0.32, 0, 0, 28),
Color3.fromRGB(150, 55, 55)
)
local battleToggle = makeButton(
contentTrainer,
"BATTLE: OFF",
UDim2.new(0.66, 0, 0, 188),
UDim2.new(0.32, 0, 0, 28),
Color3.fromRGB(120, 40, 40)
)
local refreshButton = makeButton(
contentTrainer,
"REFRESH TRAINERS",
UDim2.new(0.02, 0, 0, 220),
UDim2.new(0.96, 0, 0, 23),
Color3.fromRGB(55, 55, 70)
)
-- UPDATE STATUS
local function updateStatus()
if fightEnabled and battleEnabled then
status.Text = "Status: Fight + Battle running"
elseif fightEnabled then
status.Text = "Status: Fight running"
elseif battleEnabled then
status.Text = "Status: Battle running"
elseif selectedTrainer then
status.Text = "Status: Trainer selected"
else
status.Text = "Status: Select a trainer"
end
status.TextColor3 = (fightEnabled or battleEnabled)
and Color3.fromRGB(80, 255, 120)
or Color3.fromRGB(180, 180, 180)
fightToggle.Text = fightEnabled and "FIGHT: ON" or "FIGHT: OFF"
fightToggle.BackgroundColor3 = fightEnabled
and Color3.fromRGB(45, 150, 75)
or Color3.fromRGB(150, 55, 55)
battleToggle.Text = battleEnabled and "BATTLE: ON" or "BATTLE: OFF"
battleToggle.BackgroundColor3 = battleEnabled
and Color3.fromRGB(45, 120, 55)
or Color3.fromRGB(120, 40, 40)
selectedLabel.Text = "Trainer: "
.. (selectedTrainer and selectedTrainer.Name or "NONE")
end
-- REFRESH TRAINER LIST
local function refreshTrainers()
for _, button in ipairs(trainerButtons) do
if button.Parent then
button:Destroy()
end
end
table.clear(trainerButtons)
trainersFolder = workspace:FindFirstChild("Trainers")
if not trainersFolder then
status.Text = "Status: workspace.Trainers not found"
return
end
local trainers = trainersFolder:GetChildren()
-- NEW SORTING:
-- 1. Sort by the alphabetically first Pokémon name.
-- 2. If those names match, sort by trainer name.
table.sort(trainers, function(a, b)
local keyA = getTrainerPokemonSortKey(a)
local keyB = getTrainerPokemonSortKey(b)
if keyA == keyB then
return a.Name:lower() < b.Name:lower()
end
return keyA < keyB
end)
for index, trainer in ipairs(trainers) do
local button = makeButton(
trainerList,
trainer.Name .. " [" .. getPokemonNames(trainer) .. "]",
UDim2.new(),
UDim2.new(1, -4, 0, 32),
selectedTrainer == trainer
and Color3.fromRGB(90, 55, 125)
or Color3.fromRGB(45, 45, 58)
)
button.LayoutOrder = index
table.insert(trainerButtons, button)
button.MouseButton1Click:Connect(function()
selectedTrainer = trainer
refreshTrainers()
updateStatus()
end)
end
updateStatus()
end
-- TELEPORT TO SELECTED TRAINER
teleportButton.MouseButton1Click:Connect(function()
local trainer = selectedTrainer
local character = player.Character
local root = character and character:FindFirstChild("HumanoidRootPart")
if not trainer or not trainer.Parent then
status.Text = "Status: Select a trainer first"
return
end
local trainerRoot =
trainer:FindFirstChild("HumanoidRootPart")
or trainer.PrimaryPart
or trainer:FindFirstChildWhichIsA("BasePart", true)
if root and trainerRoot then
root.CFrame = trainerRoot.CFrame + Vector3.new(0, 3, 0)
status.Text = "Status: Teleported to " .. trainer.Name
else
status.Text = "Status: Trainer position not found"
end
end)
-- FIGHT LOOP
local function startFightLoop()
if fightThreadRunning then
return
end
if not fightRemote or not fightRemote:IsA("RemoteEvent") then
fightEnabled = false
updateStatus()
status.Text = "Status: FightTrainer remote not found"
return
end
fightThreadRunning = true
task.spawn(function()
while fightEnabled do
local trainer = selectedTrainer
if trainer and trainer.Parent then
pcall(function()
fightRemote:FireServer(trainer)
end)
end
task.wait(0.15)
end
fightThreadRunning = false
if fightEnabled then
startFightLoop()
end
end)
end
-- FIND THE MATCHING POKÉMON IN WORKSPACE
local function findWorkspacePokemon(pokemon)
if not pokemon then
return nil
end
return workspace:FindFirstChild(pokemon.Name)
or workspace:FindFirstChild(pokemon.Name, true)
end
-- BATTLE LOOP: AUTOMATICALLY BATTLE ALL POKÉMON
local function startBattleLoop()
if battleThreadRunning then
return
end
if not battleRemote or not battleRemote:IsA("RemoteEvent") then
battleEnabled = false
updateStatus()
status.Text = "Status: Battle remote not found"
return
end
battleThreadRunning = true
task.spawn(function()
while battleEnabled do
local trainer = selectedTrainer
local folder = getMonsterFolder(trainer)
if trainer and trainer.Parent and folder then
local pokemon = folder:GetChildren()
table.sort(pokemon, function(a, b)
return a.Name:lower() < b.Name:lower()
end)
if #pokemon == 0 then
status.Text = "Status: Trainer has no Pokémon"
task.wait(0.5)
else
for _, monster in ipairs(pokemon) do
if not battleEnabled then
break
end
if selectedTrainer ~= trainer then
break
end
local target = findWorkspacePokemon(monster)
if target then
pcall(function()
battleRemote:FireServer(target)
end)
end
task.wait(0.15)
end
end
else
status.Text = "Status: Select a trainer with Pokémon"
task.wait(0.5)
end
task.wait(0.15)
end
battleThreadRunning = false
if battleEnabled then
startBattleLoop()
end
end)
end
-- FIGHT TOGGLE
fightToggle.MouseButton1Click:Connect(function()
fightEnabled = not fightEnabled
if fightEnabled then
startFightLoop()
end
updateStatus()
end)
-- BATTLE TOGGLE
battleToggle.MouseButton1Click:Connect(function()
battleEnabled = not battleEnabled
if battleEnabled then
startBattleLoop()
end
updateStatus()
end)
-- REFRESH TRAINERS
refreshButton.MouseButton1Click:Connect(refreshTrainers)
-- INITIALIZE
refreshTrainers()
updateStatus()
-- SETTINGS
local settingsScroll = Instance.new("ScrollingFrame")
settingsScroll.Size = UDim2.new(1, 0, 1, 0)
settingsScroll.BackgroundTransparency = 1
settingsScroll.ScrollBarThickness = 3
settingsScroll.CanvasSize = UDim2.new(0, 0, 0, 250)
settingsScroll.Parent = contentSettings
local settingsLayout = Instance.new("UIListLayout")
settingsLayout.Padding = UDim.new(0, 5)
settingsLayout.Parent = settingsScroll
local function createSettingBtn(text)
local b = Instance.new("TextButton")
b.Size = UDim2.new(1, -8, 0, 32)
b.BackgroundColor3 = Color3.fromRGB(40, 40, 55)
b.Text = text .. " : OFF"
b.TextColor3 = Color3.new(1, 1, 1)
b.TextSize = 9
b.Font = Enum.Font.GothamBold
b.TextXAlignment = Enum.TextXAlignment.Left
b.Parent = settingsScroll
Instance.new("UICorner", b).CornerRadius = UDim.new(0, 8)
local padding = Instance.new("UIPadding")
padding.PaddingLeft = UDim.new(0, 10)
padding.Parent = b
return b
end
local s1 = createSettingBtn("🎨 Low Graphics")
local s2 = createSettingBtn("💡 No Shadows")
local s3 = createSettingBtn("✨ No Particles")
local s4 = createSettingBtn("🌿 No Grass")
local s5 = createSettingBtn("💧 Optimize Sky")
local s6 = Instance.new("TextButton")
s6.Size = UDim2.new(1, -8, 0, 32)
s6.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
s6.Text = "⚡ ULTRA FPS BOOST"
s6.TextColor3 = Color3.new(1, 1, 1)
s6.TextSize = 9
s6.Font = Enum.Font.GothamBold
s6.Parent = settingsScroll
Instance.new("UICorner", s6).CornerRadius = UDim.new(0, 8)
s1.MouseButton1Click:Connect(function()
s1.Text = "🎨 Low Graphics : ON"
s1.BackgroundColor3 = Color3.fromRGB(45, 90, 60)
for _, v in ipairs(workspace:GetDescendants()) do
if v:IsA("BasePart") then
pcall(function()
v.Material = Enum.Material.SmoothPlastic
end)
end
end
end)
s2.MouseButton1Click:Connect(function()
s2.Text = "💡 No Shadows : ON"
s2.BackgroundColor3 = Color3.fromRGB(45, 90, 60)
Lighting.GlobalShadows = false
for _, v in ipairs(workspace:GetDescendants()) do
if v:IsA("BasePart") then
v.CastShadow = false
end
end
end)
s3.MouseButton1Click:Connect(function()
s3.Text = "✨ No Particles : ON"
s3.BackgroundColor3 = Color3.fromRGB(45, 90, 60)
for _, v in ipairs(workspace:GetDescendants()) do
if v:IsA("ParticleEmitter") or v:IsA("Trail") then
v.Enabled = false
end
end
end)
s4.MouseButton1Click:Connect(function()
s4.Text = "🌿 No Grass : ON"
s4.BackgroundColor3 = Color3.fromRGB(45, 90, 60)
local terrain = workspace:FindFirstChild("Terrain")
if terrain then
terrain.Decoration = false
end
end)
s5.MouseButton1Click:Connect(function()
s5.Text = "💧 Optimize Sky : ON"
s5.BackgroundColor3 = Color3.fromRGB(45, 90, 60)
Lighting.FogEnd = 100000
end)
s6.MouseButton1Click:Connect(function()
Lighting.GlobalShadows = false
Lighting.FogEnd = 100000
for _, v in ipairs(workspace:GetDescendants()) do
pcall(function()
if v:IsA("BasePart") then
v.Material = Enum.Material.SmoothPlastic
v.CastShadow = false
end
if v:IsA("ParticleEmitter") or v:IsA("Trail") then
v.Enabled = false
end
end)
end
local terrain = workspace:FindFirstChild("Terrain")
if terrain then
terrain.Decoration = false
end
s1.Text = "🎨 Low Graphics : ON"
s1.BackgroundColor3 = Color3.fromRGB(45, 90, 60)
s2.Text = "💡 No Shadows : ON"
s2.BackgroundColor3 = Color3.fromRGB(45, 90, 60)
s3.Text = "✨ No Particles : ON"
s3.BackgroundColor3 = Color3.fromRGB(45, 90, 60)
s4.Text = "🌿 No Grass : ON"
s4.BackgroundColor3 = Color3.fromRGB(45, 90, 60)
s5.Text = "💧 Optimize Sky : ON"
s5.BackgroundColor3 = Color3.fromRGB(45, 90, 60)
end)
-- DRAGGING / MINIMIZE
local dragging = false
local dragStart = nil
local startPos = nil
local logoDragging = false
local logoDragStart = nil
local logoStartPos = nil
local logoMoved = false
titleBar.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = frame.Position
end
end)
UserInputService.InputChanged:Connect(function(input)
if dragging
and (
input.UserInputType == Enum.UserInputType.MouseMovement
or input.UserInputType == Enum.UserInputType.Touch
) then
local d = input.Position - dragStart
frame.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + d.X,
startPos.Y.Scale,
startPos.Y.Offset + d.Y
)
end
if logoDragging
and (
input.UserInputType == Enum.UserInputType.MouseMovement
or input.UserInputType == Enum.UserInputType.Touch
) then
local d = input.Position - logoDragStart
if math.abs(d.X) > 5 or math.abs(d.Y) > 5 then
logoMoved = true
end
logo.Position = UDim2.new(
logoStartPos.X.Scale,
logoStartPos.X.Offset + d.X,
logoStartPos.Y.Scale,
logoStartPos.Y.Offset + d.Y
)
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch then
dragging = false
if logoDragging then
if not logoMoved then
frame.Position = logo.Position
logo.Visible = false
frame.Visible = true
end
logoDragging = false
end
end
end)
logo.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch then
logoDragging = true
logoMoved = false
logoDragStart = input.Position
logoStartPos = logo.Position
end
end)
minBtn.MouseButton1Click:Connect(function()
logo.Position = frame.Position
frame.Visible = false
logo.Visible = true
end)
closeBtn.MouseButton1Click:Connect(function()
screenGui:Destroy()
end)