Run it
Copy the script and paste it into your executor.
ReplicatedStorage = :()
Pool = ReplicatedStorage:():():()
PoolConstants = (Pool:())
PoolGeometry = (Pool:())
PoolPhysics = (Pool:())
PoolAimOverlay = (Pool:())
FrameWidth = PoolConstants.FrameWidth
FrameHeight = PoolConstants.FrameHeight
BallRadius = PoolConstants.BallRadius
BallDiameter = PoolConstants.BallDiameter
cushions = PoolGeometry.()
pockets = PoolGeometry.()
jaws = PoolGeometry.()
COLOR_POCKET_IN = .(, , )
COLOR_NORMAL = .(, , )
COLOR_BOUNCE = .(, , )
COLOR_SCRATCH = .(, , )
COLOR_WHITE = .(, , )
(a1, a2, a3, a4)
v1 = (a1:(a1)) - a3 * a3
v2 = * a1:(a2)
v1 <
v2 <
v2 >=
v3 = a2:(a2)
v3 <=
v4 = v2 * v2 - * v3 * v1
v4 <
v5 = (-v2 - .(v4)) / ( * v3)
(v5 < ) (a4 < v5)
v5
(a1, a2, a3, a4, a5)
v4 = a5 BallRadius
Normal = a3.Normal
v5 = a2:(Normal)
v5 >= -
v6 = (a1 - a3.A):(Normal)
v6 < -v4
v6 < v4
v3 = (v4 - v6) / v5
(v3 < ) (a4 < v3)
v1 = a3.B - a3.A
Magnitude = v1.Magnitude
v2 = (a1 + a2 * v3 - a3.A):(v1 / Magnitude)
(v2 < ) (Magnitude < v2)
v3
(a1, a2, a3, a4)
v1 = a2:(a3.Normal)
v1 <=
v2 = -(((a1 - a3.MouthCentre):(a3.Normal)) - a3.CommitDepth) / v1
(v2 < ) (a4 < v2)
v3 = .(-a3.Normal.Y, a3.Normal.X)
v4 = .(((a1 + a2 * v2 - a3.MouthCentre):(v3)))
a3.Mouth / < v4
v2
(pos, dir, radius, ignoreNumber, balls)
radius = radius BallRadius
maxDist =
closestT = maxDist
hitKind =
hitObj =
hitNormal =
balls
_, b (balls)
b.Number ~= ignoreNumber b.Pocketed b.Sinking
t = (b.Position - pos, -dir, radius + (b.Radius BallRadius), closestT)
t t > t < closestT
closestT = t
hitKind =
hitObj = b
_, p (pockets)
t = (pos, dir, p, closestT)
t t > t < closestT
closestT = t
hitKind =
hitObj = p
_, c (cushions)
t = (pos, dir, c, closestT, radius)
t t > t < closestT
closestT = t
hitKind =
hitObj = c
hitNormal = c.Normal
_, j (jaws)
t = (j.Position - pos, -dir, radius, closestT)
t t > t < closestT
closestT = t
hitKind =
hitObj = j
hitNormal = (pos + dir * t - j.Position).Unit
hitKind == closestT >= maxDist
pos + dir * , , ,
hitPos = pos + dir * closestT
reflectDir =
hitKind ==
hitPos = hitObj.BowlCentre
hitKind == hitKind ==
hitNormal
reflectDir = dir - * (dir:(hitNormal)) * hitNormal
reflectDir.Magnitude >
reflectDir = reflectDir.Unit
hitKind ==
toOther = (hitObj.Position - hitPos).Unit
reflectDir = toOther
hitPos, hitKind, hitObj, reflectDir
(overlay, sim)
sim sim.Balls
list = {}
_, b (sim.Balls)
b.Pocketed b.Sinking
.(list, b)
#list > list
pt = overlay.Root overlay.Root.Parent overlay.Root.Parent.Parent
bf = pt pt:()
bf
list = {}
_, b (bf:())
b:() b.Visible
num = (b.Name:()) -
x = (b.Position.X.Scale - ) * FrameWidth
y = ( - b.Position.Y.Scale) * FrameHeight
.(list, {Number = num, Position = .(x, y), Radius = BallRadius})
list
{}
(lineFrame, a2, a3, thickness, color)
v1 = a3 - a2
Magnitude = v1.Magnitude
Magnitude <
lineFrame.Visible =
v2 = (a2 + a3) /
lineFrame.Position = .( + v2.X / FrameWidth, - v2.Y / FrameHeight)
lineFrame.Size = .(Magnitude / FrameWidth, (thickness ) / FrameHeight)
lineFrame.Rotation = .(.(-v1.Y, v1.X))
color
lineFrame.BackgroundColor3 = color
lineFrame.ImageColor3 = color
lineFrame.Visible =
Attribute = lineFrame:()
Attribute lineFrame.Parent
Y = lineFrame.Parent.AbsoluteSize.Y
Y >
lineFrame.SliceScale = .((thickness ) / FrameHeight * Y / Attribute, )
(overlay, key, template, color, transparency)
overlay[key] overlay[key].Parent
line = template:()
line.Name = key
line.BackgroundColor3 = color template.BackgroundColor3
line.ImageColor3 = color template.ImageColor3
line.BackgroundTransparency = transparency
line.ImageTransparency = transparency
line.Visible =
line.Parent = overlay.Root
overlay[key] = line
overlay[key]
(overlay, name, color)
marker = overlay.Root:(name)
marker
marker = .()
marker.Name = name
marker.AnchorPoint = .(, )
marker.Size = .( / FrameWidth, / FrameHeight)
marker.BackgroundTransparency =
marker.ZIndex = overlay.AimLine.ZIndex +
corner = .()
corner.CornerRadius = .(, )
corner.Parent = marker
stroke = .()
stroke.Thickness =
stroke.Color = color COLOR_POCKET_IN
stroke.Transparency =
stroke.Parent = marker
marker.Parent = overlay.Root
marker
(overlay)
overlay.ObjectLineBounce overlay.ObjectLineBounce.Visible =
overlay.CueLineBounce overlay.CueLineBounce.Visible =
overlay.AimBounce overlay.AimBounce.Visible =
overlay.AimBounce2 overlay.AimBounce2.Visible =
overlay.ComboLine overlay.ComboLine.Visible =
m1 = overlay.Root:()
m1 m1.Visible =
m2 = overlay.Root:()
m2 m2.Visible =
.OriginalPredictShot
.OriginalPredictShot = PoolPhysics.PredictShot
PoolPhysics.PredictShot = (sim, dir, power, spin, dt)
res = .(sim, dir, power, spin, dt)
res
res.Simulation = sim
res
PoolAimOverlay.Update = (a1, a2, a3, a4, a5, a6, a7)
a3.Magnitude <
isLegal = a7 ~=
AimLineColour = isLegal COLOR_SCRATCH PoolConstants.AimLineColour
DefaultAccent = isLegal COLOR_SCRATCH (a1.AccentColour COLOR_NORMAL)
a1.AimLine.BackgroundColor3 = AimLineColour
a1.AimLine.ImageColor3 = AimLineColour
UIStroke = a1.Ghost:()
UIStroke
UIStroke.Color = AimLineColour
Unit = a3.Unit
v2 = a2 - Unit * (PoolConstants.BallRadius + (.(a5 , , ) * + ))
v3 = v2 - Unit *
a1.StickEnabled
a1.CueStick.Visible =
(a1.CueStick, v3, v2, )
a4 a4.Kind ~= a1.GuidesEnabled
Ghost = a4.Ghost
(a1.AimLine, a2, Ghost, )
a1.Ghost.Position = .( + Ghost.X / FrameWidth, - Ghost.Y / FrameHeight)
a1.Ghost.Visible =
balls = (a1, a4.Simulation)
targetMarker = (a1, , COLOR_POCKET_IN)
targetMarker.Visible =
scratchMarker = (a1, , COLOR_SCRATCH)
scratchMarker.Visible =
a4.Kind == a4.ObjectDirection
objStart = Ghost + a4.ObjectDirection * BallDiameter
hitPos1, kind1, obj1, reflect1 = (objStart, a4.ObjectDirection, BallRadius, a4.Other, balls)
kind1 ==
(a1.ObjectLine, objStart, hitPos1, , COLOR_POCKET_IN)
targetMarker.Position = .( + obj1.MouthCentre.X / FrameWidth, - obj1.MouthCentre.Y / FrameHeight)
targetMarker.Visible =
a1.ObjectLineBounce a1.ObjectLineBounce.Visible =
(a1.ObjectLine, objStart, hitPos1, , DefaultAccent)
targetMarker.Visible =
reflect1
hitPos2, kind2, obj2, _ = (hitPos1, reflect1, BallRadius, a4.Other, balls)
bounceLine = (a1, , a1.ObjectLine, COLOR_BOUNCE, )
kind2 ==
(bounceLine, hitPos1, hitPos2, , COLOR_POCKET_IN)
targetMarker.Position = .( + obj2.MouthCentre.X / FrameWidth, - obj2.MouthCentre.Y / FrameHeight)
targetMarker.Visible =
(bounceLine, hitPos1, hitPos2, , COLOR_BOUNCE)
a1.ObjectLineBounce
a1.ObjectLineBounce.Visible =
a4.CueDirection a4.CueDirection.Magnitude >
cueHit, cueKind, cueObj, cueReflect = (Ghost, a4.CueDirection, BallRadius, , balls)
cueKind ==
(a1.CueLine, Ghost, cueHit, , COLOR_SCRATCH)
scratchMarker.Position = .( + cueObj.MouthCentre.X / FrameWidth, - cueObj.MouthCentre.Y / FrameHeight)
scratchMarker.Visible =
a1.CueLineBounce a1.CueLineBounce.Visible =
(a1.CueLine, Ghost, cueHit, , AimLineColour)
scratchMarker.Visible =
cueReflect
cueHit2, cueKind2, cueObj2, _ = (cueHit, cueReflect, BallRadius, , balls)
cueBounce = (a1, , a1.CueLine, AimLineColour, )
cueKind2 ==
(cueBounce, cueHit, cueHit2, , COLOR_SCRATCH)
scratchMarker.Position = .( + cueObj2.MouthCentre.X / FrameWidth, - cueObj2.MouthCentre.Y / FrameHeight)
scratchMarker.Visible =
(cueBounce, cueHit, cueHit2, , AimLineColour)
a1.CueLineBounce
a1.CueLineBounce.Visible =
a1.CueLine.Visible =
a1.CueLineBounce a1.CueLineBounce.Visible =
a1.AimBounce a1.AimBounce.Visible =
a1.AimBounce2 a1.AimBounce2.Visible =
a4.Kind == a4.Kind ==
a1.ObjectLine.Visible =
a1.CueLine.Visible =
a1.ObjectLineBounce a1.ObjectLineBounce.Visible =
a1.CueLineBounce a1.CueLineBounce.Visible =
hit1, kind1, obj1, reflect1 = (a2, Unit, BallRadius, , balls)
reflect1
hit2, kind2, obj2, reflect2 = (Ghost, reflect1, BallRadius, , balls)
aimBounce = (a1, , a1.AimLine, AimLineColour, )
kind2 ==
(aimBounce, Ghost, hit2, , COLOR_SCRATCH)
scratchMarker.Position = .( + obj2.MouthCentre.X / FrameWidth, - obj2.MouthCentre.Y / FrameHeight)
scratchMarker.Visible =
(aimBounce, Ghost, hit2, , AimLineColour)
reflect2
hit3 = (hit2, reflect2, BallRadius, , balls)
aimBounce2 = (a1, , a1.AimLine, AimLineColour, )
(aimBounce2, hit2, hit3, , AimLineColour)
a1.AimBounce2
a1.AimBounce2.Visible =
a1.AimBounce
a1.AimBounce.Visible =
a1.AimBounce2 a1.AimBounce2.Visible =
a1.AimLine.Visible =
a1.Ghost.Visible =
a1.ObjectLine.Visible =
a1.CueLine.Visible =
(a1)
oldSetGuides = PoolAimOverlay.SetGuidesVisible
PoolAimOverlay.SetGuidesVisible = (a1, a2)
(a1, a2)
a2
(a1)
()aim assist MADE BY AI

[UPD] 8 Ball Duels