Run it
Copy the script and paste it into your executor.
globalEnv = ()
ChessDuels = {}
playersService = :()
replicatedStorage = :()
userInputService = :()
virtualUser = :()
DEPTH_OPTIONS = { , , , , , , }
TIME_OPTIONS = { , , , , }
DELAY_OPTIONS = { , , , , }
POLL_INTERVAL =
RETRY_AFTER =
localPlayer = playersService.LocalPlayer
connections = {}
guiRoot =
running =
flags = {
autoPlay = ,
autoRematch = ,
autoClaim = ,
antiAfk = ,
}
depthIndex =
timeIndex =
delayIndex =
Engine =
Bot =
actionRemote =
updateRemote =
currentGetter =
lastGame =
lastKey =
lastSentAt =
suggestion =
statusLabel =
hintLabel =
analysing =
(module)
()
ok, result = (, module)
()
ok result
()
chessFolder = replicatedStorage:(, )
chessFolder
Engine = (chessFolder:())
Bot = (chessFolder:())
remotes = replicatedStorage:(, )
remotes
actionRemote = remotes:()
updateRemote = remotes:()
()
getgc
_, fn (())
(fn) == (isexecutorclosure (fn))
okName, name = (debug.info, fn, )
okSrc, source = (debug.info, fn, )
okName okSrc name == (source) == source:()
currentGetter = fn
()
currentGetter
ok, = (currentGetter)
ok () == .state
lastGame =
lastGame
(text)
statusLabel statusLabel.Text = text
(move)
Engine.(move)
()
state = Engine.(.state)
#Engine.(state) ==
score, move, reached = Bot.(state, DEPTH_OPTIONS[depthIndex], TIME_OPTIONS[timeIndex])
move
move = Engine.(state)[]
move, score, reached
(move)
actionRemote
actionRemote:(, {
from = move.from,
to = move.to,
promo = move.promo,
})
lastSentAt = .()
()
= ()
()
.over
suggestion =
lastKey =
()
hintLabel hintLabel.Text =
flags.autoRematch actionRemote .you ~=
actionRemote:()
flags.autoClaim actionRemote
actionRemote:()
.you ==
()
state = Engine.(.state)
state.turn ~= .you
()
key = (.id) .. .. (.ply)
key == lastKey
flags.autoPlay suggestion .() - lastSentAt > RETRY_AFTER
(suggestion)
analysing
analysing =
lastKey = key
()
move, score, reached = ()
analysing =
suggestion = move
move
shown = .(, (move), (score ) / , reached )
hintLabel hintLabel.Text = shown
()
flags.autoPlay
.(DELAY_OPTIONS[delayIndex])
fresh = ()
fresh fresh.id == .id fresh.ply == .ply fresh.over
(move)
()
running
ok, err = (step)
ok
analysing =
( .. (err))
.(POLL_INTERVAL)
()
gethui
ok, hui = (gethui)
ok hui hui
localPlayer:()
ChessDuels.()
screenGui = .()
screenGui.Name =
screenGui.ResetOnSpawn =
screenGui.Parent = ()
guiRoot = screenGui
frame = .()
frame.Size = .(, )
frame.AutomaticSize = .AutomaticSize.Y
frame.Position = .(, )
frame.BackgroundColor3 = .(, , )
frame.BorderSizePixel =
frame.Parent = screenGui
stroke = .()
stroke.Color = .(, , )
stroke.Parent = frame
corner = .()
corner.CornerRadius = .(, )
corner.Parent = frame
padding = .()
padding.PaddingTop = .(, )
padding.PaddingBottom = .(, )
padding.PaddingLeft = .(, )
padding.PaddingRight = .(, )
padding.Parent = frame
layout = .()
layout.Padding = .(, )
layout.SortOrder = .SortOrder.LayoutOrder
layout.Parent = frame
order =
(text)
order +=
button = .()
button.LayoutOrder = order
button.Size = .(, , , )
button.BackgroundColor3 = .(, , )
button.BorderSizePixel =
button.TextColor3 = .(, , )
button.Font = .Font.GothamMedium
button.TextSize =
button.Text = text
button.Parent = frame
btnCorner = .()
btnCorner.CornerRadius = .(, )
btnCorner.Parent = button
button
(text, size)
order +=
label = .()
label.LayoutOrder = order
label.Size = .(, , , size )
label.BackgroundTransparency =
label.TextColor3 = .(, , )
label.Font = .Font.GothamBold
label.TextSize =
label.TextXAlignment = .TextXAlignment.Left
label.Text = text
label.Parent = frame
label
(text, name)
button = ()
()
on = flags[name]
button.Text = text .. .. (on )
button.BackgroundColor3 = on .(, , ) .(, , )
button.MouseButton1Click:(()
flags[name] = flags[name]
()
)
()
(text, options, getIndex, setIndex, suffix)
button = ()
()
button.Text = text .. .. (options[()]) .. (suffix )
button.MouseButton1Click:(()
(() % #options + )
()
)
()
().TextColor3 = .(, , )
statusLabel = ()
hintLabel = (, )
hintLabel.TextColor3 = .(, , )
hintLabel.TextSize =
()
(, )
(, DEPTH_OPTIONS, () depthIndex , (v) depthIndex = v )
(, TIME_OPTIONS, () timeIndex , (v) timeIndex = v , )
(, DELAY_OPTIONS, () delayIndex , (v) delayIndex = v , )
().MouseButton1Click:(()
suggestion (suggestion)
)
()
(, )
(, )
().MouseButton1Click:(()
actionRemote actionRemote:()
)
()
(, )
().MouseButton1Click:(ChessDuels.detach)
dragging, dragStart, startPosition = , ,
.(connections, frame.InputBegan:((input)
input.UserInputType ~= .UserInputType.MouseButton1
dragging =
dragStart = input.Position
startPosition = frame.Position
))
.(connections, userInputService.InputChanged:((input)
dragging input.UserInputType ~= .UserInputType.MouseMovement
delta = input.Position - dragStart
frame.Position = .(startPosition.X.Scale, startPosition.X.Offset + delta.X, startPosition.Y.Scale, startPosition.Y.Offset + delta.Y)
))
.(connections, userInputService.InputEnded:((input)
input.UserInputType == .UserInputType.MouseButton1 dragging =
))
.(connections, userInputService.InputBegan:((input)
input.KeyCode == .KeyCode.RightShift
frame.Visible = frame.Visible
))
ChessDuels.()
running =
_, connection (connections) connection:()
.(connections)
guiRoot guiRoot:() guiRoot =
globalEnv.ChessDuels =
()
ChessDuels.()
()
(Engine Bot actionRemote)
()
()
.(connections, updateRemote.OnClientEvent:((payload)
(payload) == payload.state payload.you ~=
lastGame = payload
))
.(connections, localPlayer.Idled:(()
flags.antiAfk
virtualUser:()
virtualUser:(.zero)
))
ChessDuels.()
.(pollLoop)
()
globalEnv.ChessDuels globalEnv.ChessDuels.()
globalEnv.ChessDuels = ChessDuels
(err)
()
(err)
(debug.())
ChessDuels.()
(ChessDuels.init, onInitializeError)Auto Chess Does everything for u

Chess Duels