Run it
Copy the script and paste it into your executor.
:() .Loaded:()
cloneref = cloneref (v) v
= ()
= (f) f
().MystrixHub
MystrixHub.ConnectionController MystrixHub.ConnectionController.Connections
i, v , MystrixHub.ConnectionController.Connections
(() v:() )
MystrixHub.ConnectionController.Connections[i] =
MystrixHub.TasksController MystrixHub.TasksController.Tasks
i, v , MystrixHub.TasksController.Tasks
(() .(v) )
MystrixHub.TasksController.Tasks[i] =
MystrixHub.UIController
UI = MystrixHub.UIController
(()
_, sg ((:()):())
sg.Name == sg:()
)
().MystrixHub =
.()
CURRENT_VERSION =
DISCORD_INVITE =
Services = ({}, {
__index = (self, Index)
ok, service = (.GetService, , Index)
ok service ==
ok, service = (() :(Index) )
ok service ==
ok, service = (() [Index] )
ok service ==
wrapped = service
(() wrapped = (service) )
(self, Index, wrapped)
wrapped
})
_, name ({ , , , , , , })
_ = Services[name]
Players = Services.Players
RunService = Services.RunService
LocalPlayer = Players.LocalPlayer
LocalPlayer
.()
LocalPlayer = Players.LocalPlayer
().MystrixHub = {
Meta = {
Version = CURRENT_VERSION,
Discord = DISCORD_INVITE,
Logo = HUB_LOGO,
ServerName = ,
},
PlayerController = {
Player = LocalPlayer,
PlayerGui = LocalPlayer:(),
},
UIController = {
Window = ,
Tabs = {},
},
ConnectionController = {
Connections = {},
},
TasksController = {
Tasks = {},
},
Functions = {},
}
MystrixHub.ConnectionController.(Connection)
.(MystrixHub.ConnectionController.Connections, Connection)
MystrixHub.TasksController.(Task)
.(MystrixHub.TasksController.Tasks, Task)
().MystrixSilentAim = ().MystrixSilentAim { Enabled = , Hooked = }
().MystrixMaxPower = ().MystrixMaxPower { Enabled = , Hooked = }
SilentAimState = ().MystrixSilentAim
SilentAimState.OnlyGoalShots == SilentAimState.OnlyGoalShots =
MaxPowerState = ().MystrixMaxPower
MystrixHub.Functions.()
MP = ().MystrixMaxPower
MP.Hooked
ok, Rules = (()
(Services.ReplicatedStorage:():():()).Rules
)
ok (Rules) ~= (Rules.charge) ~=
MP.Hooked = MystrixHub.Functions.(Rules, , (callOrig)
(value)
state = ().MystrixMaxPower
state state.Enabled
(value)
)
MP.Hooked ==
().MystrixReach = ().MystrixReach { Enabled = , Add = }
().MystrixReach.Enabled =
().MystrixAntiRagdoll = ().MystrixAntiRagdoll {}
().MystrixAntiRagdoll.Enabled =
().MystrixAntiRagdoll.Tackle =
().MystrixAntiRagdoll.GetUp =
().MystrixAntiRagdoll.Running =
MystrixHub.Functions.()
AR = ().MystrixAntiRagdoll
AR.Hooked2
mod = MystrixHub.Functions.()
mod
okT, Tuning = (()
(Services.ReplicatedStorage:():():():())
)
okT (Tuning) == (Tuning.Slide) ==
AR.Tuning = Tuning
AR.SitDefault = AR.SitDefault Tuning.Slide.SitTime
AR.Hooked =
AR.Hooked2 =
MystrixHub.Functions.()
AR = ().MystrixAntiRagdoll
AR.Remote AR.Remote
ok, remote = (()
Net = (Services.ReplicatedStorage:():())
Net:()
)
ok remote
AR.Remote = remote
remote
MystrixHub.Functions.(body)
AR = ().MystrixAntiRagdoll
remote = MystrixHub.Functions.()
body.mrWrapped
body.mrWrapped =
body.mrOrig = body.onRecovered
body.onRecovered = ()
remote
= - (.() - (body.physicalAt ))
<=
(() remote:() )
.(, ()
body.active
(() remote:() )
)
mode = body.mode
mode == mode == mode == mode ==
body.yaw = AR.Yaw body.yaw
body.pending =
body.launch =
body.fromKick =
body.fromFront =
body.seatPending =
body.driveOff =
body.reseatPending =
ok = (body.reseat, body)
ok
(body.standNow, body)
body.active
(body.standNow, body)
MystrixHub.Functions.()
(() RunService:() )
MystrixHub.Functions.()
MystrixHub.Functions.()
AR = ().MystrixAntiRagdoll
st = { Had = }
RunService:(, .RenderPriority.Input.Value + , ()
AR.Enabled
char = LocalPlayer.Character
char
MystrixHub.Functions.(char)
id = char:()
(id) ~= id ==
ball = MystrixHub.Functions.()
ball
now = .()
ball:() == id
st.Had = now
now - st.Had >
MystrixHub.TrickActive now < (MystrixHub.ShotNext )
vel = ball.AssemblyLinearVelocity
.(vel.X, , vel.Z).Magnitude >
st.Had =
bodyState = char:()
bodyState ~= bodyState ~=
root = char:()
cm = char:()
(root cm)
dx = ball.Position.X + vel.X * - root.Position.X
dz = ball.Position.Z + vel.Z * - root.Position.Z
distance = .(dx * dx + dz * dz)
distance > distance <
direction = .(dx / distance, , dz / distance)
cm.MovingDirection = direction
cm.BaseMoveSpeed = .(cm.BaseMoveSpeed, )
cm.FacingDirection = direction
)
MystrixHub.Functions.()
(() RunService:() )
MystrixHub.Functions.()
().MystrixAntiRagdoll.Running =
(()
mod = MystrixHub.MannequinClientRef
char = LocalPlayer.Character
animator = mod char mod.(char)
body = animator animator.body
body
body.mrWrapped
body.onRecovered = body.mrOrig
body.mrWrapped =
body.mrOrig =
body.mrTackleFn body.onTackle == body.mrTackleFn
body.onTackle = body.mrTackleOrig
body.mrTackleFn =
body.mrTackleOrig =
body.mrHit =
body.mrHitAt =
)
MystrixHub.Functions.()
F = MystrixHub.Functions
F.()
mod = F.()
mod
AR = ().MystrixAntiRagdoll
F.()
cachedChar, cachedAnimator
RunService:(, .RenderPriority.Input.Value + , ()
AR.Enabled
char = LocalPlayer.Character
char
animator = cachedAnimator
char ~= cachedChar animator animator.body
ok, result = (mod.getAnimator, char)
ok result
cachedChar, cachedAnimator = char, result
animator = result
body = animator.body
body
body.active
root = char:()
root
look = root.CFrame.LookVector
look.X * look.X + look.Z * look.Z >
AR.Yaw = .(-look.X, -look.Z)
mode = body.mode
now = .()
mode == mode == mode == mode ==
AR.OwnAt = now
mode ~= AR.GetUp
t = body.t
hit = body.tackled ~= (body.tackled) ~=
t <
(hit body.slideEnd ~= t >= )
F.(body)
AR.Tackle
now - (AR.OwnAt -.huge) <
F.(body)
)
MystrixHub.ConnectionController.({ Disconnect = ()
MystrixHub.Functions.()
})
AR.Running =
MystrixHub.Functions.()
F = MystrixHub.Functions
AR = ().MystrixAntiRagdoll
AR.Enabled = AR.Tackle == AR.GetUp ==
T = AR.Tuning
T T.Slide AR.SitDefault
T.Slide.SitTime = AR.GetUp AR.SitDefault
AR.Enabled
AR.Running
F.()
AR.Running
F.()
MystrixHub.Functions.(state)
().MystrixAntiRagdoll.Tackle = state ==
MystrixHub.Functions.()
MystrixHub.Functions.(state)
().MystrixAntiRagdoll.GetUp = state ==
MystrixHub.Functions.()
().MystrixNoCooldown = ().MystrixNoCooldown { Enabled = }
MystrixHub.Functions.()
NC = ().MystrixNoCooldown
NC.Conns
_, c (NC.Conns)
(() c:() )
NC.Conns =
NC.Tuning NC.SlideDefault
NC.Tuning.Slide.Cooldown = NC.SlideDefault
MystrixHub.Functions.()
MystrixHub.Functions.()
NC = ().MystrixNoCooldown
ok, tuning = (()
(Services.ReplicatedStorage:():():():())
)
ok (tuning) == (tuning.Slide) ==
NC.Tuning = tuning
NC.SlideDefault = NC.SlideDefault tuning.Slide.Cooldown
tuning.Slide.Cooldown =
conns = {}
NC.Conns = conns
_, name ({ , , })
()
NC.Enabled
v = LocalPlayer:(name)
v ~= v ~=
LocalPlayer:(name, )
conns[#conns + ] = LocalPlayer:(name):(clear)
()
MystrixHub.ConnectionController.({ Disconnect = ()
MystrixHub.Functions.()
})
().MystrixAutoPoke = ().MystrixAutoPoke { Enabled = , Range = }
MystrixHub.Functions.()
scripts = LocalPlayer:()
context = scripts scripts:()
action = context context:()
action action:()
action
MystrixHub.Functions.()
action = MystrixHub.Functions.()
action
binding = MystrixHub.PokeBinding
(binding binding.Parent == action)
binding
(() binding:() )
binding = .()
binding.Name =
binding.Type = .InputBindingType.Scriptable
binding.Parent = action
MystrixHub.PokeBinding = binding
MystrixHub.ConnectionController.({ Disconnect = ()
(() binding:() )
MystrixHub.PokeBinding =
})
binding, action
MystrixHub.Functions.()
binding, action = MystrixHub.Functions.()
binding
context = action.Parent
context context:() context.Enabled
context.Enabled =
binding:()
.(, ()
(() binding:() )
)
MystrixHub.Functions.()
char = LocalPlayer.Character
root = char char:()
root
ball = MystrixHub.Functions.()
ball
possessor = ball:()
ownId = char:()
(possessor) ~= possessor == possessor == ownId
myTeam = char:()
_, model (Services.CollectionService:())
model ~= char model:() model:() == possessor
team = model:()
myTeam ~= team == myTeam
otherRoot = model:()
(otherRoot otherRoot:())
bodyState = model:()
bodyState ~= bodyState ~=
diff = otherRoot.Position - root.Position
model, .(diff.X, , diff.Z).Magnitude
MystrixHub.Functions.()
UIS = Services.UserInputService
UIS.TouchEnabled UIS.KeyboardEnabled
MystrixHub.Functions.()
B = MystrixHub.Bindings
B
_, b (B)
(() b:() )
AS = MystrixHub.AutoShoot
AS AS.Binding
(() AS.Binding:() )
AP = MystrixHub.AutoPoke
AP AP.Binding
(() AP.Binding:() )
MystrixHub.TrickActive =
MystrixHub.ShotNext =
V = MystrixHub.TrickView
V V.Active =
F = MystrixHub.Force
F F.Until =
MystrixHub.Functions.(target, range)
char = LocalPlayer.Character
root = char char:()
cm = char char:()
(root cm target)
gc = cm:()
gc cm.ActiveController ~= gc
ball = MystrixHub.Functions.()
ball ball:() ~= target:()
bp, bv = ball.Position, ball.AssemblyLinearVelocity
view = MystrixHub.Functions.()
view (view.freeState) ==
ok, pos, vel = (view.freeState)
ok (pos) == (vel) ==
bp, bv = pos, vel
aim = bp + .(bv.X, , bv.Z) * - root.Position
flat = .(aim.X, , aim.Z)
dist = flat.Magnitude
dist < dist > .(range, )
look = root.CFrame.LookVector
face = .(look.X, , look.Z)
face.Magnitude < face.Unit:(flat.Unit) < -
.(bp.Y - root.Position.Y) >
MystrixHub.Functions.()
state = MystrixHub.AutoPoke
MystrixHub.AutoPoke =
state
state.Conn
(() state.Conn:() )
state.Binding
(() state.Binding:() )
(() state.Binding:() )
MystrixHub.Functions.()
F = MystrixHub.Functions
F.()
F.()
st = { Acc = , Next = , Target = , Seen = }
MystrixHub.AutoPoke = st
st.Conn = RunService.Heartbeat:((dt)
st.Acc += dt
st.Acc <
st.Acc =
cfg = ().MystrixAutoPoke
cfg.Enabled
now = .()
now < st.Next
char = LocalPlayer.Character
char F.(char)
bodyState = char:()
bodyState ~= bodyState ~=
MystrixHub.TrickActive now < (MystrixHub.ShotNext )
readyAt = LocalPlayer:()
(readyAt) == readyAt > :() +
target, distance = F.()
target distance distance > .(cfg.Range + , )
st.Target, st.Seen = ,
st.Target ~= target
st.Target, st.Seen = target, now
now - st.Seen < F.(target, cfg.Range)
(F.FirePoke)
st.Next = now +
)
MystrixHub.ConnectionController.(st.Conn)
().MystrixSprint = ().MystrixSprint { Infinite = , Auto = }
MystrixHub.Functions.()
cached = MystrixHub.MannequinClientRef
cached cached
ok, mod = (()
(LocalPlayer:():():():())
)
ok (mod) ==
MystrixHub.MannequinClientRef = mod
mod
MystrixHub.Functions.()
state = MystrixHub.AutoSprint
MystrixHub.AutoSprint =
state state.Restore
state.()
MystrixHub.Functions.()
MystrixHub.Functions.()
mod = MystrixHub.Functions.()
mod
state = { Original = mod.keepSprint, Move = , Cached = , At = }
()
now = .()
now - state.At < state.Cached
state.At = now
(state.Move state.Move.Parent)
scripts = LocalPlayer:()
ctx = scripts scripts:()
state.Move = ctx ctx:()
state.Move
state.Cached =
ok, s = (state.Move.GetState, state.Move)
state.Cached = ok (s) == s.Magnitude >
state.Cached
(...)
().MystrixSprint.Auto ()
original = state.Original
original
(...)
()
state.Conn
(() state.Conn:() )
state.Conn =
mod.keepSprint == wrapper
mod.keepSprint = state.Original
state.Restore = restore
mod.keepSprint = wrapper
acc =
state.Conn = RunService.Heartbeat:((dt)
acc += dt
acc <
acc =
mod.keepSprint ~= wrapper
state.Original = mod.keepSprint
mod.keepSprint = wrapper
)
MystrixHub.AutoSprint = state
MystrixHub.ConnectionController.(state.Conn)
MystrixHub.ConnectionController.({ Disconnect = restore })
MystrixHub.Functions.()
MystrixHub.RunSpeedBound =
(() RunService:() )
MystrixHub.Functions.()
F = MystrixHub.Functions
F.()
MystrixHub.RunSpeedBound =
speed = F.()
cfg = ().MystrixSprint
char, cm
RunService:(, .RenderPriority.Input.Value + , ()
boost = cfg.Boost
(cfg.Infinite boost > )
current = LocalPlayer.Character
current ~= char (cm cm.Parent)
char = current
cm = char char:()
cm
bodyState = char:()
bodyState ~= bodyState ~=
dir = cm.MovingDirection
dir.X * dir.X + dir.Y * dir.Y + dir.Z * dir.Z <
current = cm.BaseMoveSpeed
base = current
cfg.Infinite base < speed
base = speed
boost > base >= speed *
target = speed * boost
base < target base = target
base ~= current
cm.BaseMoveSpeed = base
)
MystrixHub.ConnectionController.({ Disconnect = ()
MystrixHub.Functions.()
})
MystrixHub.Functions.()
cfg = ().MystrixSprint
cfg.Infinite (cfg.Boost ) >
MystrixHub.RunSpeedBound
MystrixHub.Functions.()
MystrixHub.Functions.()
MystrixHub.Functions.()
SA = ().MystrixSilentAim
SA.BallView SA.Flight SA.Families
(()
gameFolder = LocalPlayer:():():()
SA.BallView = (gameFolder:())
)
(()
sharedGame = Services.ReplicatedStorage:():()
Kick = (sharedGame:())
SA.Flight = Kick.Flight
SA.Families = Kick.Families
SA.KeeperRules = (sharedGame:())
)
SA.BallView ~= SA.Flight ~= SA.Families ~=
MystrixHub.Functions.()
SA = ().MystrixSilentAim
char = LocalPlayer.Character
root = char char:()
goals = {}
_, part (Services.CollectionService:())
part:() part:()
.(goals, part)
#goals <
.(goals, (a, b) a.Position.X < b.Position.X )
team = char char:()
hasTeam = team == team ==
chosen
hasTeam SA.KeeperRules
ok, side, area = (()
SA.KeeperRules.(team), SA.KeeperRules.(team)
)
ok side area
_, part (goals)
(part.Position.X - area.centre.X) * -side >
chosen = part
chosen hasTeam
blueSide = :() == -
out = team == -blueSide blueSide
chosen = out == - goals[] goals[#goals]
chosen root
look = root.CFrame.LookVector
bestDot = -.huge
_, part (goals)
d = (part.Position.X - root.Position.X) * look.X
d > bestDot
bestDot = d
chosen = part
chosen
b = chosen.Position.X < (goals[].Position.X + goals[#goals].Position.X) / -
q = chosen.Size.Y /
ground = chosen.Position.Y - chosen.Size.Y /
{
x = chosen.Position.X - b * chosen.Size.X / + b * * q,
z = chosen.Position.Z,
ground = ground,
top = ground + * q,
half = * q,
out = b,
team = hasTeam team ,
char = char,
}
MystrixHub.Functions.()
H = MystrixHub
H.DeviceScaleValue H.DeviceScaleValue
override = ().MystrixBudgetScale
(override) == override >
H.DeviceScaleValue = override
override
best = .huge
_ = ,
t0 = .()
v = .(, , )
acc =
i = ,
v = .(v.X * + , v.Y + , v.Z * ):(.(i, , ), )
acc += v.Magnitude
best = .(best, .() - t0)
scale = .(best / , , )
scale < scale =
H.DeviceScaleValue = scale
scale
MystrixHub.Functions.(seconds)
seconds * MystrixHub.Functions.()
MystrixHub.Functions.(tbl, key, build)
target = tbl[key]
(target) ~=
holder = { fn = target }
wrapper = ((...) holder.(...) )
ok, old = (, target, wrapper)
ok
(old) ==
holder.fn = old
()
tbl[key] = wrapper
(replace) tbl[key] == wrapper
(, tbl, )
(replace) tbl[key] == wrapper
MystrixHub.Functions.()
env = ()
names = { , , , , , , , , , }
missing = {}
_, name (names)
env[name] ==
missing[#missing + ] = name
scale = MystrixHub.Functions.()
touch = MystrixHub.Functions.()
MystrixHub.Capabilities = { missing = missing, scale = scale, touch = touch }
( .. (#missing > .(missing, ) ) .. .. .(, scale) .. .. (touch))
MystrixHub.Functions.(plan)
state = ().MystrixSilentAim
state.Enabled state.PlanSync ==
(plan) ~=
plan.hold ==
(plan.ball) ~=
(plan.family) ~=
plan.power ==
plan.leg ==
(plan.dir) ~=
ok, vel, spin = (MystrixHub.Functions.SilentAimPlan, plan)
ok vel
copy = .(plan)
m = .(vel.X * vel.X + vel.Z * vel.Z)
m >
copy.dir = .(vel.X / m, , vel.Z / m)
(plan.vel) ==
copy.vel = vel
(plan.spin) == spin
copy.spin = spin
copy
MystrixHub.Functions.()
snap = MystrixHub.MannequinSnap
now = .()
snap now - snap.At <
snap.List
list = {}
n =
_, model (Services.CollectionService:())
root = model:()
root model:() root:()
n +=
list[n] = {
model = model,
team = model:(),
keeper = model:() ~= model:() == ,
pos = root.Position,
}
MystrixHub.MannequinSnap = { At = now, List = list }
list
MystrixHub.Functions.()
cache = MystrixHub.GoalCache
cache
cache = { At = , Valid = }
MystrixHub.GoalCache = cache
char = LocalPlayer.Character
team = char char:()
now = .()
cache.Valid cache.Char == char cache.Team == team now - cache.At <
cache.Value
cache.Value = MystrixHub.Functions.()
cache.Char = char
cache.Team = team
cache.At = now
cache.Valid =
cache.Value
MystrixHub.Functions.(state)
backup = MystrixHub.PromptBackup
backup
backup = ({}, { __mode = })
MystrixHub.PromptBackup = backup
MystrixHub.QuickInteractConn
MystrixHub.QuickInteractConn:()
MystrixHub.QuickInteractConn =
state
MystrixHub.QuickInteractConn = Services.ProximityPromptService.PromptShown:((prompt)
backup[prompt]
backup[prompt] = { hold = prompt.HoldDuration, line = prompt.RequiresLineOfSight }
prompt.HoldDuration =
prompt.RequiresLineOfSight =
)
prompt, orig (backup)
(()
prompt.HoldDuration = orig.hold
prompt.RequiresLineOfSight = orig.line
)
.(backup)
().MystrixAutoShoot = ().MystrixAutoShoot { Enabled = , Range = }
().MystrixAutoPickup = ().MystrixAutoPickup { Enabled = , Range = }
MystrixHub.Functions.()
ball = MystrixHub.BallRef
ball ball.Parent ball
cs = Services.CollectionService
cs
ok, list = (cs.GetTagged, cs, )
ball = ok list[]
MystrixHub.BallRef = ball
ball
MystrixHub.Functions.(name)
scripts = LocalPlayer:()
context = scripts scripts:()
action = context context:(name )
action action:()
action
MystrixHub.Functions.()
().MystrixAutoTricks.Enabled
MystrixHub.Functions.()
MystrixHub.Functions.()
MystrixHub.Functions.()
MystrixHub.Functions.()
st = MystrixHub.AutoPickup
MystrixHub.AutoPickup =
st st.Gate
(() st.Gate:() )
(() RunService:() )
MystrixHub.Functions.()
MystrixHub.Functions.()
cfg = ().MystrixAutoPickup
st = { Acc = , Active = }
MystrixHub.AutoPickup = st
st.Gate = RunService.Heartbeat:((dt)
st.Acc += dt
st.Acc <
st.Acc =
st.Active =
cfg.Enabled
char = LocalPlayer.Character
char
MystrixHub.Functions.(char)
bodyState = char:()
bodyState ~= bodyState ~=
now = :()
MystrixHub.TrickActive .() < (MystrixHub.ShotNext )
ball = MystrixHub.Functions.()
ball
possessor = ball:()
(possessor) == possessor ~=
id = char:()
ball:() == id
releasedAt = ball:()
(releasedAt) == now - releasedAt <
root = char:()
cm = char:()
(root cm)
st.Root, st.Cm, st.Ball = root, cm, ball
st.Active =
)
RunService:(, .RenderPriority.Input.Value + , ()
st.Active
root, cm, ball = st.Root, st.Cm, st.Ball
(root.Parent cm.Parent ball.Parent)
st.Active =
possessor = ball:()
(possessor) == possessor ~=
st.Active =
ballPos = ball.Position
rootPos = root.Position
ballPos.Y > rootPos.Y -
vel = ball.AssemblyLinearVelocity
.(vel.Y) >
vx, vz = vel.X, vel.Z
vx * vx + vz * vz >
dx = ballPos.X + vx * - rootPos.X
dz = ballPos.Z + vz * - rootPos.Z
distance = .(dx * dx + dz * dz)
distance > cfg.Range distance <
direction = .(dx / distance, , dz / distance)
cm.MovingDirection = direction
cm.BaseMoveSpeed = .(cm.BaseMoveSpeed, )
cm.FacingDirection = direction
)
MystrixHub.ConnectionController.({ Disconnect = () MystrixHub.Functions.() })
().MystrixGuard = ().MystrixGuard { Enabled = , Distance = , Predict = }
().MystrixGuard.IgnoreTeammates =
MystrixHub.Functions.()
G = MystrixHub.GuardGoal
now = .()
G now - G.At <
G.Value
stale = G now - G.At < G.Value
attacked = MystrixHub.Functions.()
attacked stale
far, farPart = -,
_, part (Services.CollectionService:())
part:() part:()
d = .(part.Position.X - attacked.x)
d > far
far = d
farPart = part
farPart stale
value = .(farPart.Position.X, , farPart.Position.Z)
MystrixHub.GuardGoal = { At = now, Value = value }
value
MystrixHub.Functions.()
(() RunService:() )
st = MystrixHub.GuardState
MystrixHub.GuardState =
st
st.Gate
(() st.Gate:() )
st.Controlling st.Cm st.Cm.Parent
(() st.Cm.MovingDirection = .zero )
MystrixHub.Functions.(name)
H = MystrixHub
cache = H.ClientModules
cache
cache = {}
H.ClientModules = cache
cached = cache[name]
cached ~= cached
scripts = LocalPlayer:()
client = scripts scripts:()
folder = client client:()
inst = folder folder:(name)
(inst inst:())
ok, mod = (, inst)
cache[name] = (ok (mod) == ) mod
cache[name]
MystrixHub.Functions.()
(() RunService:() )
st = MystrixHub.BallReachState
MystrixHub.BallReachState =
st st.Gate
(() st.Gate:() )
MystrixHub.Functions.()
F = MystrixHub.Functions
F.()
cfg = ().MystrixReach
st = { Acc = , Active = }
MystrixHub.BallReachState = st
st.Gate = RunService.Heartbeat:((dt)
st.Acc += dt
st.Acc <
st.Acc =
st.Active =
cfg.Enabled
char = LocalPlayer.Character
char
F.(char)
bodyState = char:()
bodyState ~= bodyState ~=
MystrixHub.TrickActive .() < (MystrixHub.ShotNext )
ball = F.()
ball
possessor = ball:()
(possessor) == possessor ~=
id = char:()
ball:() == id
releasedAt = ball:()
(releasedAt) == :() - releasedAt <
root = char:()
cm = char:()
(root cm)
mod = F.()
mod
ok, anim = (mod.getAnimator, char)
ok anim
anim.kick
kickS, headS, pokeS = anim.kickS, anim.headS, anim.pokeS
kickS kickS.done
headS headS.done
pokeS pokeS.done
st.Root, st.Cm, st.Ball = root, cm, ball
st.Active =
)
RunService:(, .RenderPriority.Input.Value + , ()
st.Active
root, cm, ball = st.Root, st.Cm, st.Ball
(root.Parent cm.Parent ball.Parent)
st.Active =
possessor = ball:()
(possessor) == possessor ~=
st.Active =
bp, rp = ball.Position, root.Position
bp.Y > rp.Y -
vel = ball.AssemblyLinearVelocity
vel.X * vel.X + vel.Z * vel.Z > .(vel.Y) >
dx = bp.X + vel.X * - rp.X
dz = bp.Z + vel.Z * - rp.Z
d = .(dx * dx + dz * dz)
d > + cfg.Add d <
ux, uz = dx / d, dz / d
md = cm.MovingDirection
md.X * ux + md.Z * uz < -
direction = .(ux, , uz)
cm.FacingDirection = direction
cm.MovingDirection = direction
cm.BaseMoveSpeed = .(cm.BaseMoveSpeed, )
)
MystrixHub.ConnectionController.({ Disconnect = () MystrixHub.Functions.() })
MystrixHub.Functions.()
F = MystrixHub.Functions
().MystrixReach.Enabled
F.()
F.()
().MystrixAutoDribble = ().MystrixAutoDribble { Enabled = , Range = }
MystrixHub.Functions.()
st = MystrixHub.AutoDribble
MystrixHub.AutoDribble =
(() RunService:() )
st st.Conn
(() st.Conn:() )
MystrixHub.Functions.(st, now)
F = MystrixHub.Functions
cfg = ().MystrixAutoDribble
st.Threats =
char = LocalPlayer.Character
char F.(char)
ball = F.()
id = char:()
ball (id) ~= ball:() ~= id
bodyState = char:()
bodyState ~= bodyState ~=
MystrixHub.TrickActive now < (MystrixHub.ShotNext )
root = char:()
root
rp = root.Position
shoot = ().MystrixAutoShoot
shoot.Enabled
goal = F.()
goal
limit = .(shoot.Range, )
gx, gz = goal.x - rp.X, goal.z - rp.Z
gx * gx + gz * gz <= limit * limit
v = root.AssemblyLinearVelocity
myVel = .(v.X, , v.Z)
speed = myVel.Magnitude
facing = speed > myVel / speed root.CFrame.LookVector
f = .(facing.X, , facing.Z)
f.Magnitude <
f = f.Unit
threats = F.(char, rp, f, myVel, cfg.Range + )
st.Threats = threats
st.ThreatAt = .()
st.Char = char
now - (st.SkillAt ) > st.Combo =
p = threats[]
p
now < st.Next
urgent = p.ttc <= p.d <=
urgent
p.ready p.d >
p.ahead < - p.d >
crowd =
_, t (threats)
t.d <= crowd +=
gesture = F.(speed, p, threats, crowd, st.Last)
rainbow = gesture gesture.kind ==
success = F.(st, gesture, speed, now, rainbow )
success
st.Combo = .((st.Combo ) + , )
st.SkillAt = now
st.Next = now + (rainbow ( + * st.Combo))
st.Next = now +
MystrixHub.Functions.()
F = MystrixHub.Functions
F.()
cfg = ().MystrixAutoDribble
cfg.Evade == cfg.Evade =
cfg.EvadeStrength == cfg.EvadeStrength =
st = { Acc = , Next = , Combo = }
MystrixHub.AutoDribble = st
st.Conn = RunService.Heartbeat:((dt)
st.Acc += dt
st.Acc <
st.Acc =
().MystrixAutoDribble.Enabled
st.Threats =
now = .()
ok = (F.AutoDribbleTick, st, now)
ok
st.Threats =
st.Next = now +
)
RunService:(, .RenderPriority.Input.Value + , ()
c = ().MystrixAutoDribble
(c.Enabled c.Evade)
threats = st.Threats
now = .()
threats #threats == now - (st.ThreatAt ) >
char = LocalPlayer.Character
char char ~= st.Char
MystrixHub.TrickActive now < (MystrixHub.SkillUntil ) now < (MystrixHub.ShotNext )
cm = char:()
cm
md = cm.MovingDirection
flat = .(md.X, , md.Z)
mag = flat.Magnitude
mag <
desired = flat / mag
left = .(desired.Z, , -desired.X)
range = c.Range +
vote, strongest = ,
i = , .(#threats, )
t = threats[i]
t.ahead > t.d < range
w = - t.d / range
t.ready w *=
s = desired.X * t.dir.Z - desired.Z * t.dir.X
vote += (s >= -) * w
strongest = .(strongest, w * t.ahead)
strongest <=
want = vote >= -
sign = want
st.LatSign want ~= st.LatSign now - (st.LatAt ) <
sign = st.LatSign
st.LatSign = want
st.LatAt = now
strength = .(strongest * * (c.EvadeStrength ), , )
out = desired + left * sign * strength
out.Magnitude <
cm.MovingDirection = out.Unit * mag
)
MystrixHub.ConnectionController.(st.Conn)
MystrixHub.ConnectionController.({ Disconnect = ()
MystrixHub.Functions.()
})
MystrixHub.Functions.(ball)
H = MystrixHub
now = .()
cache = H.GoalLineCache
cache now - cache.At > (cache.Lines )
H.DribbleContacts
= Services.ReplicatedStorage:()
gameFolder = :()
dribble = gameFolder gameFolder:()
dribble
ok, mod = (, dribble)
ok (mod) ==
H.DribbleContacts = mod.Contacts
contacts = H.DribbleContacts
cache = { At = now, Lines = contacts contacts.() }
H.GoalLineCache = cache
lines = cache.Lines
lines
x = ball.Position.X
x < lines[] x > lines[]
MystrixHub.Functions.(char)
F = MystrixHub.Functions
team = char:()
team ~= team ~=
LocalPlayer:() ==
:() ==
state = :()
state == state ==
state ==
go = :()
(go) ~= :() < go
hold = LocalPlayer:()
(hold) == hold > :()
ball = F.()
ball F.(ball)
celebration = F.()
celebration (celebration.current) ==
ok, current = (celebration.current)
ok current ~=
replay = F.()
replay (replay.playing) ==
ok, playing = (replay.playing)
ok playing ==
lobby = F.()
lobby (lobby.benched) ==
ok, benched = (lobby.benched)
ok benched ==
gui = LocalPlayer:()
ui = gui gui:()
popup = ui ui:()
popup popup:() popup.Visible
MystrixHub.Functions.(char)
H = MystrixHub
now = .()
H.PausedChar == char now - (H.PausedAt ) <
H.PausedValue
paused = H.Functions.(char)
H.PausedChar, H.PausedAt, H.PausedValue = char, now, paused
paused
MystrixHub.Functions.()
cached = MystrixHub.SprintBase
cached cached
speed =
(()
tuning = (Services.ReplicatedStorage:():():():())
speed = tuning.Speed.Sprint
)
MystrixHub.SprintBase = speed
speed
MystrixHub.Functions.(subject, goal)
F = MystrixHub.Functions
cfg = ().MystrixGuard
pos = subject.Position
vel = subject.AssemblyLinearVelocity
linear = pos + vel * cfg.Predict
vel.Magnitude < F.() linear,
SA = ().MystrixSilentAim
state = SA.BallView.()
p, v, s = pos, vel, .zero
state p, v, s = state.pos, state.vel, state.spin .zero
ok, list, gy = (()
ground = SA.BallView.(p)
F.(SA.Flight.(subject), p, v, s, ground, , / ), ground
)
ok (list) ~= #list == linear,
attacked = F.()
attacked
sign = (attacked.x - goal.X) > -
(p.X - goal.X) * sign >
_, e (list)
(e.pos.X - goal.X) * sign <=
.(e.pos.Z - goal.Z) <= attacked.half + e.pos.Y - attacked.ground <= (attacked.top - attacked.ground) +
e.pos,
p.Y - gy <=
_, e (list)
e.t >= cfg.Predict e.pos,
list[#list].pos,
_, e (list)
e.t > e.pos.Y - gy <= e.pos,
list[#list].pos,
MystrixHub.Functions.()
F = MystrixHub.Functions
F.()
cfg = ().MystrixGuard
cfg.Engage = cfg.Engage
st = { Acc = , Active = , Engaged = , Controlling = , ResumeAt = }
MystrixHub.GuardState = st
(v)
v.X == v.X v.Y == v.Y v.Z == v.Z
.(v.X) < .(v.Y) < .(v.Z) <
(char)
bodyState = char:()
bodyState ~= bodyState ~=
mod = F.()
mod
ok, anim = (mod.getAnimator, char)
ok anim anim.body anim.body.active
()
st.Controlling
cm = st.Cm
cm cm.Parent
cm.MovingDirection = .zero
st.Controlling =
st.Active =
st.Face =
st.StuckAt =
(seconds)
st.ResumeAt = .() + seconds
st.Engaged =
()
()
st.CarrierId, st.CarrierPart, st.CarrierModel = , ,
()
char = LocalPlayer.Character
char
(char)
()
.() < st.ResumeAt
F.(char)
st.Engaged =
root = char:()
cm = char:()
(root cm)
(root.Position)
ball = F.()
ball (ball.Position)
goal = F.()
goal
id = char:()
possessor = ball:()
held = (possessor) == possessor ~=
mate =
carrier
held
possessor == id
()
st.Engaged =
st.CarrierId ~= possessor (st.CarrierPart st.CarrierPart.Parent)
()
st.CarrierId = possessor
_, model (Services.CollectionService:())
model ~= char model:() model:() == possessor
r = model:()
r r:()
st.CarrierPart = r
st.CarrierModel = model
carrier = st.CarrierPart
model = st.CarrierModel
model
theirTeam = model:()
theirTeam ~= theirTeam == char:()
cfg.IgnoreTeammates
st.Engaged = false
return false
end
mate = true
carrier = nil
end
end
else
clearCarrier()
if ball:GetAttribute("ReleasedBy") == id then
local releasedAt = ball:GetAttribute("ReleasedAt")
if type(releasedAt) == "number" and workspace:GetServerTimeNow() - releasedAt < 1.2 then
st.Engaged = false
return false
end
end
end
local rp = root.Position
local subject = carrier or ball
local sp = subject.Position
if not finite(sp) then return false end
local dx, dz = sp.X - rp.X, sp.Z - rp.Z
local d = math.sqrt(dx * dx + dz * dz)
local engaged = d <= (st.Engaged and cfg.Engage * 1.3 or cfg.Engage)
if engaged and not carrier and ball.Position.Y > rp.Y - 2.4 then
engaged = false
end
if mate then engaged = false end
st.Engaged = engaged
if engaged and carrier then
local readyAt = LocalPlayer:GetAttribute("PokeReadyAt")
if not (type(readyAt) == "number" and readyAt > workspace:GetServerTimeNow()) then
local target, distance = F.FindPokeTarget()
if target and distance <= 6.5 then
F.FirePoke()
end
end
end
st.Focus = nil
if not carrier then
st.Focus = F.GuardFocus(ball, goal)
end
st.Char = char
st.MyId = id
st.Speed = F.SprintBase() * math.max(getgenv().MystrixSprint.Boost or 1, 1)
st.Root, st.Cm, st.Ball, st.Carrier, st.Goal = root, cm, ball, carrier, goal
st.Active = true
return true
end
st.Gate = RunService.Heartbeat:Connect(function(dt)
st.Acc += dt
if st.Acc < 0.1 then return end
st.Acc = 0
if not cfg.Enabled then
release()
return
end
local ok, ready = pcall(evaluate)
if not (ok and ready) then
release()
end
end)
local function steer(target, dt)
if not finite(target) or target.Magnitude < 0.001 then
return st.Face
end
target = target.Unit
local cur = st.Face
if not cur or not finite(cur) or cur.Magnitude < 0.001 then
local look = st.Root.CFrame.LookVector
local flat = Vector3.new(look.X, 0, look.Z)
cur = flat.Magnitude > 0.001 and flat.Unit or target
else
cur = cur.Unit
end
local angle = math.acos(math.clamp(cur:Dot(target), -1, 1))
local step = 9 * dt
if angle ~= angle or angle <= step then
st.Face = target
return target
end
local rotated = CFrame.Angles(0, cur:Cross(target).Y >= 0 and step or -step, 0) * cur
rotated = Vector3.new(rotated.X, 0, rotated.Z)
if rotated.Magnitude < 0.001 or not finite(rotated) then
st.Face = target
return target
end
st.Face = rotated.Unit
return st.Face
end
local function drive(dt)
local root, cm, ball, carrier, goal, char = st.Root, st.Cm, st.Ball, st.Carrier, st.Goal, st.Char
if not (root.Parent and cm.Parent and ball.Parent and char and char.Parent) then
release()
return
end
if downed(char) then
pause(0.5)
return
end
if F.MatchPaused(char) then
release()
return
end
if os.clock() < st.ResumeAt then
release()
return
end
local active = cm.ActiveController
if active == nil or active.Name == "BodyIdleController" then
local gc = cm:FindFirstChild("GroundController")
if gc then cm.ActiveController = gc end
end
local possessor = ball:GetAttribute("Possessor")
if possessor ~= nil and possessor ~= 0 and possessor == st.MyId then
release()
return
end
local subject = carrier or ball
if not subject.Parent then
release()
return
end
local pos = subject.Position
local vel = subject.AssemblyLinearVelocity
local rp = root.Position
if not (finite(pos) and finite(vel) and finite(rp)) then
release()
return
end
if vel.Magnitude > 120 then
vel = vel.Unit * 120
end
local move, face
if st.Engaged then
local lead = carrier and 0.18 or 0.12
local mx, mz = pos.X + vel.X * lead - rp.X, pos.Z + vel.Z * lead - rp.Z
local dist = math.sqrt(mx * mx + mz * mz)
if dist > 0.8 then
local dir = Vector3.new(mx / dist, 0, mz / dist)
move = dir * math.clamp(dist / 5, 0, 1)
if dist > 2.5 then
face = dir
end
end
else
local focus = (not carrier and st.Focus) or (pos + vel * cfg.Predict)
local px, pz = focus.X, focus.Z
local gx, gz = goal.X - px, goal.Z - pz
local gd = math.sqrt(gx * gx + gz * gz)
if gd < 1 then
release()
return
end
local ux, uz = gx / gd, gz / gd
local stand = math.min(cfg.Distance, gd * 0.5)
local mx, mz = px + ux * stand - rp.X, pz + uz * stand - rp.Z
local dist = math.sqrt(mx * mx + mz * mz)
if dist > 0.8 then
move = Vector3.new(mx / dist, 0, mz / dist) * math.clamp(dist / 4, 0, 1)
end
local fx, fz = pos.X - rp.X, pos.Z - rp.Z
local fd = math.sqrt(fx * fx + fz * fz)
if fd > 4 then
face = Vector3.new(fx / fd, 0, fz / fd)
end
end
if move then
cm.MovingDirection = move
cm.BaseMoveSpeed = math.max(cm.BaseMoveSpeed, st.Speed)
else
cm.MovingDirection = Vector3.zero
end
if face then
local facing = steer(face, dt)
if facing then
cm.FacingDirection = facing
end
end
st.Controlling = true
local rv = root.AssemblyLinearVelocity
if move and move.Magnitude > 0.5 and rv.X * rv.X + rv.Z * rv.Z < 1 then
st.StuckAt = st.StuckAt or os.clock()
if os.clock() - st.StuckAt > 1.5 then
pause(0.6)
end
else
st.StuckAt = nil
end
end
RunService:BindToRenderStep("MystrixGuard", Enum.RenderPriority.Input.Value + 10, function(dt)
if not st.Active then
if st.Controlling then release() end
return
end
if not pcall(drive, dt) then
release()
end
end)
MystrixHub.ConnectionController.Insert({ Disconnect = function() MystrixHub.Functions.StopGuard() end })
end
getgenv().MystrixKeeper = getgenv().MystrixKeeper or {}
for k, v in pairs({ Enabled = false, Depth = 4.5, DiveRange = 22, Poke = true, Dive = true, Gather = true, Rush = true, RushRange = 34, DiveLead = 0.0, DiveBias = 0.0, CommitRange = 45, StandReach = 2 }) do
if getgenv().MystrixKeeper[k] == nil then
getgenv().MystrixKeeper[k] = v
end
end
getgenv().MystrixKeeper.Enabled = false
function MystrixHub.Functions.KeeperGoal()
local F = MystrixHub.Functions
local char = LocalPlayer.Character
local now = os.clock()
local cache = MystrixHub.KeeperGoalCache
if cache and cache.Char == char and now - cache.At < 0.5 then
return cache.Value
end
local attacked = F.SilentAimGoal()
if not attacked then return nil end
local parts = {}
local mid = 0
for _, part in ipairs(Services.CollectionService:GetTagged("SoccerGoalFrame")) do
if part:IsA("BasePart") and part:IsDescendantOf(workspace) then
parts[#parts + 1] = part
mid += part.Position.X
end
end
if #parts < 2 then return nil end
mid /= #parts
local own, far = nil, -1
for _, part in ipairs(parts) do
local d = math.abs(part.Position.X - attacked.x)
if d > far then
far = d
own = part
end
end
local side = own.Position.X < mid and -1 or 1
local q = own.Size.Y / 9.142857142857142
local ground = own.Position.Y - own.Size.Y / 2
local value = {
x = own.Position.X - side * own.Size.X / 2 + side * 0.21428571428571425 * q,
z = own.Position.Z,
half = 13.071428571428571 * q,
top = ground + 8.714285714285714 * q,
ground = ground,
side = side,
inward = Vector3.new(-side, 0, 0),
}
MystrixHub.KeeperGoalCache = { Char = char, At = now, Value = value }
return value
end
function MystrixHub.Functions.KeeperActions()
local H = MystrixHub
local cached = H.KeeperActionCache
if cached and os.clock() - cached.At < 5 and (not cached.Dive or cached.Dive.Parent) and (not cached.Slide or cached.Slide.Parent) then
return cached
end
local found = { At = os.clock() }
local scripts = LocalPlayer:FindFirstChild("PlayerScripts")
if scripts then
for _, inst in ipairs(scripts:GetDescendants()) do
if inst:IsA("InputAction") then
local name = inst.Name:lower()
if not found.Dive and (name:find("dive") or name == "block") then
local ok, kind = pcall(function() return inst.Type end)
if ok and kind == Enum.InputActionType.Bool then
found.Dive = inst
end
elseif not found.Slide and inst.Name == "Slide" then
found.Slide = inst
end
end
end
end
H.KeeperActionCache = found
return found
end
function MystrixHub.Functions.KeeperReady(action)
if not (action and action.Parent) then return false end
local ok, enabled = pcall(function()
local parent = action.Parent
return action.Enabled and not (parent:IsA("InputContext") and not parent.Enabled)
end)
return ok and enabled == true
end
function MystrixHub.Functions.KeeperFire(action)
local H = MystrixHub
local bindings = H.KeeperBindings
if not bindings then
bindings = {}
H.KeeperBindings = bindings
H.ConnectionController.Insert({ Disconnect = function()
for _, b in pairs(bindings) do
pcall(function() b:Destroy() end)
end
H.KeeperBindings = nil
end })
end
local binding = bindings[action]
if not (binding and binding.Parent == action) then
if binding then
pcall(function() binding:Destroy() end)
end
binding = Instance.new("InputBinding")
binding.Name = "MystrixKeeper"
binding.Type = Enum.InputBindingType.Scriptable
binding.Parent = action
bindings[action] = binding
end
binding:Fire(true)
task.delay(0.06, function()
pcall(function() binding:Fire(false) end)
end)
return true
end
function MystrixHub.Functions.KeeperCarrier(possessor)
for _, model in ipairs(Services.CollectionService:GetTagged("MannequinCharacter")) do
if model:IsA("Model") and model:GetAttribute("DribbleId") == possessor then
local root = model:FindFirstChild("Root")
if root and root:IsA("BasePart") then
return model, root
end
end
end
return nil, nil
end
function MystrixHub.Functions.KeeperDiveEnv()
local H = MystrixHub
if H.KeeperDiveData then return H.KeeperDiveData end
if H.KeeperDiveFail and os.clock() - H.KeeperDiveFail < 3 then return nil end
local ok, data = pcall(function()
local shared = Services.ReplicatedStorage:FindFirstChild("Shared")
local gameFolder = shared and shared:FindFirstChild("Game")
local netModule = shared and shared:FindFirstChild("Net")
local divesModule = gameFolder and gameFolder:FindFirstChild("KeeperDives")
if not (netModule and divesModule) then return nil end
local Net = require(netModule)
return { Dives = require(divesModule), Remote = Net:RemoteEvent("MannequinDev") }
end)
if ok and type(data) == "table" and data.Remote then
H.KeeperDiveData = data
return data
end
H.KeeperDiveFail = os.clock()
return nil
end
task.spawn(MystrixHub.Functions.KeeperDiveEnv)
function MystrixHub.Functions.StopKeeper()
pcall(function() RunService:UnbindFromRenderStep("MystrixKeeper") end)
local st = MystrixHub.KeeperState
MystrixHub.KeeperState = nil
if st and st.Controlling and st.Cm and st.Cm.Parent then
pcall(function() st.Cm.MovingDirection = Vector3.zero end)
end
end
for k, v in pairs({ Lead = 0.03, ArmReach = 3.4, MinShotSpeed = 14, Predive = 0.1, LongAggr = 0.5, DiveBoost = 10, DiveStyle = "Auto", VReach = 2.8, ReachHeight = 6.6, MaxCatchDepth = 16, RunAccel = 0.28 }) do
if getgenv().MystrixKeeper[k] == nil then
getgenv().MystrixKeeper[k] = v
end
end
getgenv().MystrixKeeperBody = getgenv().MystrixKeeperBody or { Enabled = false, Torso = 1.4, Arm = 1.2, Catch = false }
getgenv().MystrixKeeperBody.Enabled = false
MystrixHub.BodySlots = {
Chest = "Torso", Pelvis = "Torso", Head = "Torso", Hair = "Torso",
LeftUpperArm = "Arm", RightUpperArm = "Arm", LeftForearm = "Arm", RightForearm = "Arm", LeftHand = "Arm", RightHand = "Arm",
}
function MystrixHub.Functions.KeeperDiveDirect(char, kind, vec)
local F = MystrixHub.Functions
if kind == "Jump" then return false end
local env = F.KeeperDiveEnv()
local mod = F.MannequinClientModule()
local goal = F.KeeperGoal()
if not (env and mod and goal) then return false end
local okA, anim = pcall(mod.getAnimator, char)
if not okA or not anim then return false end
local body = anim.body or (anim.getBody and anim:getBody())
if not body or body.active then return false end
local dir = Vector3.new(vec.X, 0, vec.Z)
if dir.Magnitude < 0.001 then return false end
dir = dir.Unit
local face = Vector3.new(dir.Z, 0, -dir.X)
if face.X * goal.inward.X + face.Z * goal.inward.Z < 0 then
face = -face
end
local ok, started = pcall(body.keyDive, body, kind, dir, face)
if not (ok and started) then return false end
local kdive = body.kdive
local payload = nil
if kdive then
local boost = getgenv().MystrixKeeper.DiveBoost or 0
if boost > 0 then
local add = dir * boost
if kdive.animated and kdive.move and kdive.move.carry then
kdive.move.carry = kdive.move.carry + add
elseif kdive.carry then
kdive.carry = kdive.carry + add
end
end
if kdive.animated then
local eok, encoded = pcall(env.Dives.encode, kdive.move)
if eok then payload = encoded end
end
end
env.Remote:FireServer("Dive" .. kind, dir, payload)
return true
end
function MystrixHub.Functions.KeeperDive(char, kind, vec)
local F = MystrixHub.Functions
local mod = F.MannequinClientModule()
if not mod then return false end
if char:GetAttribute("BodyState") ~= "Animated" then return false end
if mod.keeperReady and not mod.keeperReady() then return false end
if kind == "Jump" then
if not mod.keeperJump then return false end
return pcall(mod.keeperJump)
end
local ok, res = pcall(F.KeeperDiveDirect, char, kind, vec)
return ok and res == true
end
function MystrixHub.Functions.KeeperDiveProfile(kind)
local H = MystrixHub
local cache = H.KeeperProfiles2
if not cache then
cache = {}
H.KeeperProfiles2 = cache
end
if cache[kind] ~= nil then return cache[kind] or nil end
local mod = H.Functions.KeeperDivesModule()
if not (mod and type(mod.track) == "function" and type(mod.hips) == "function") then return nil end
local ok, tr = pcall(mod.track, kind)
if not ok or type(tr) ~= "table" or not tr.right then
cache[kind] = false
return nil
end
local limit = math.min(tr.ragAt or tr.touch or tr.duration, tr.duration)
local step = 0.02
local n = math.max(math.floor(limit / step), 2)
local okB, base = pcall(mod.hips, tr.right, 0)
if not okB then
cache[kind] = false
return nil
end
local D, Hh = {}, {}
for i = 0, n do
local okP, p = pcall(mod.hips, tr.right, i * step)
if not okP then
cache[kind] = false
return nil
end
D[i + 1] = math.abs(p.X - base.X)
Hh[i + 1] = p.Y
end
local prof = { step = step, D = D, H = Hh, tmax = n * step, takeoff = tr.takeoff, touch = tr.touch }
cache[kind] = prof
return prof
end
function MystrixHub.Functions.KeeperPredict(params, pos, vel, spin, gy, horizon)
local Flight = getgenv().MystrixSilentAim.Flight
local list = {}
local v, s = vel, spin
local rolling = false
local t, n = 0, 0
while t < horizon do
local dt = t < 1.2 and 1 / 60 or 1 / 30
local np, nv, ns
if rolling then
np, nv, ns = Flight.rollStep(pos, v, s, dt, params)
else
np, nv, ns = Flight.airStep(pos, v, s, dt, params)
if np.Y < gy and nv.Y < 0 then
np = Vector3.new(np.X, gy, np.Z)
local bv, bs = Flight.bounce(nv, ns, params)
if bv.Y < Flight.BOUNCE_MIN then
bv, bs = Flight.toGround(bv, bs)
rolling = true
end
nv, ns = bv, bs
end
end
pos, v, s = np, nv, ns
t += dt
n += 1
list[n] = { t = t, pos = pos }
end
return list
end
function MystrixHub.Functions.KeeperCatchPoint(list, pos, goal, kd, cfg)
local side, lineX = goal.side, goal.x
local prev, prevT = pos, 0
local first, cross
for _, e in ipairs(list) do
local p = e.pos
local depth = (lineX - p.X) * side
local h = p.Y - goal.ground
if not first and e.t >= 0.03 and depth >= 0 and depth <= kd and depth <= cfg.MaxCatchDepth and h >= -0.3 and h <= cfg.ReachHeight then
first = { t = e.t, pos = p }
end
if (prev.X - lineX) * side < 0 and (p.X - lineX) * side >= 0 then
local a = (lineX - prev.X) / (p.X - prev.X)
cross = { t = prevT + (e.t - prevT) * a, pos = prev:Lerp(p, a) }
break
end
prev, prevT = p, e.t
end
return first, cross
end
function MystrixHub.Functions.KeeperClaimPoint(list, goal, cfg)
for _, e in ipairs(list) do
local p = e.pos
local depth = (goal.x - p.X) * goal.side
if e.t >= 0.1 then
if depth < -1 then return nil end
if depth >= 0.5 and depth <= 20 and math.abs(p.Z - goal.z) <= goal.half * 1.7 then
local h = p.Y - goal.ground
if h >= -0.3 and h <= cfg.ReachHeight + 0.6 then
return { t = e.t, pos = p }
end
end
end
end
return nil
end
function MystrixHub.Functions.KeeperRunDist(T, vz0, top, accelT)
if T <= 0 then return 0 end
local a = top / accelT
local tTop = math.max((top - vz0) / a, 0)
if T <= tTop then
return vz0 * T + 0.5 * a * T * T
end
return vz0 * tTop + 0.5 * a * tTop * tTop + top * (T - tTop)
end
function MystrixHub.Functions.KeeperDiveFit(prof, need, hy, carry, rem, runFn, arm, vtol, off)
local ct = math.max(prof.takeoff or 0.15, 0.15)
local bestDef = math.huge
for i = 1, #prof.D do
local t = (i - 1) * prof.step
local c = math.min(t, ct)
local disp = prof.D[i] + carry * (c - c * c / (2 * ct)) + arm + runFn(math.max(rem - t, 0))
local dl = math.max(need - disp, 0)
local dv = math.max(math.abs(hy - (prof.H[i] + off)) - vtol, 0)
if dl <= 0 and dv <= 0 then
return t, 0
end
if dl + dv < bestDef then bestDef = dl + dv end
end
return nil, bestDef
end
function MystrixHub.Functions.KeeperDiveVector(plan, root, lat, hy)
local cfg = getgenv().MystrixKeeper
local goal = plan.goal
local sign = lat >= 0 and 1 or -1
local style = cfg.DiveStyle
local bias = 0
if style == "Back" then
bias = -0.6
elseif style == "Outside" then
bias = 0.5
elseif style == "Auto" then
local dxp = (plan.hit.pos.X - root.Position.X) * goal.inward.X
if dxp < -1 or hy > 5.4 then
bias = -math.clamp(0.3 + math.max(-dxp, 0) * 0.15, 0.3, 0.65)
elseif dxp > 1.3 then
bias = math.clamp(0.2 + dxp * 0.1, 0.2, 0.5)
end
end
return Vector3.new(goal.inward.X * bias, 0, sign).Unit
end
function MystrixHub.Functions.ApplyKeeperBody()
local saved = MystrixHub.KeeperBodySaved
if not saved then return end
local B = getgenv().MystrixKeeperBody
local KH, c = saved.KH, saved.Consts
KH.SAVE_PAD = math.max(c.SAVE_PAD, B.Arm * 0.6)
KH.SMOTHER_REACH = c.SMOTHER_REACH + B.Arm * 0.5
KH.MEET_SLACK = c.MEET_SLACK + B.Arm * 0.25
KH.GATHER_REACH = c.GATHER_REACH + B.Torso * 0.8
KH.GATHER_HIGH = c.GATHER_HIGH + B.Torso
if B.Catch then
KH.CATCH_EASY = 400
KH.CATCH_SPEED = 600
for _, name in ipairs({ "Pelvis", "Head" }) do
if KH.CATCH_PARTS[name] == nil then
KH.CATCH_PARTS[name] = true
saved.Added[name] = true
end
end
else
KH.CATCH_EASY = c.CATCH_EASY
KH.CATCH_SPEED = c.CATCH_SPEED
for name in pairs(saved.Added) do
KH.CATCH_PARTS[name] = nil
saved.Added[name] = nil
end
end
end
function MystrixHub.Functions.StopKeeperBody()
local saved = MystrixHub.KeeperBodySaved
MystrixHub.KeeperBodySaved = nil
if not saved then return end
if saved.Contacts.hitPad == saved.Wrapper then
saved.Contacts.hitPad = saved.Orig
end
local KH = saved.KH
for k, v in pairs(saved.Consts) do
KH[k] = v
end
for name in pairs(saved.Added) do
KH.CATCH_PARTS[name] = nil
end
end
function MystrixHub.Functions.StartKeeperBody()
local F = MystrixHub.Functions
F.StopKeeperBody()
local ok, mods = pcall(function()
local g = Services.ReplicatedStorage:WaitForChild("Shared"):WaitForChild("Game")
return { Contacts = require(g:WaitForChild("Dribble")).Contacts, KH = require(g:WaitForChild("KeeperHands")) }
end)
if not ok or type(mods) ~= "table" or not mods.Contacts or not mods.KH then return false end
local Contacts, KH = mods.Contacts, mods.KH
local orig = Contacts.hitPad
local function wrapper(part)
local base = orig and orig(part) or 0
local cfg = getgenv().MystrixKeeperBody
if not cfg.Enabled then return base end
local model = part.Parent
if not model or model ~= LocalPlayer.Character then return base end
local slot = MystrixHub.BodySlots[part.Name]
if not slot or model:GetAttribute("Role") ~= "Goalkeeper" then return base end
local state = model:GetAttribute("BodyState")
if state ~= nil and state ~= "Animated" and state ~= "Diving" then return base end
return math.max(base, slot == "Torso" and cfg.Torso or cfg.Arm)
end
local saved = { Contacts = Contacts, Orig = orig, Wrapper = wrapper, KH = KH, Consts = {}, Added = {} }
for _, k in ipairs({ "CATCH_EASY", "CATCH_SPEED", "SAVE_PAD", "GATHER_REACH", "GATHER_HIGH", "SMOTHER_REACH", "MEET_SLACK" }) do
saved.Consts[k] = KH[k]
end
Contacts.hitPad = wrapper
MystrixHub.KeeperBodySaved = saved
F.ApplyKeeperBody()
MystrixHub.ConnectionController.Insert({ Disconnect = function()
MystrixHub.Functions.StopKeeperBody()
end })
return true
end
function MystrixHub.Functions.KeeperDecide(plan, root, cm, now)
local F = MystrixHub.Functions
local cfg = getgenv().MystrixKeeper
local B = getgenv().MystrixKeeperBody
local hit = plan.hit
if not hit then return nil end
local goal = plan.goal
local rp = root.Position
local rem = plan.at + hit.t - now
if rem < -0.08 or rem > 1.6 or plan.speed < cfg.MinShotSpeed then return nil end
local lat = hit.pos.Z - rp.Z
local alat = math.abs(lat)
local hy = hit.pos.Y - goal.ground
local long = math.clamp(((plan.dist or 0) - 30) / 60, 0, 1) * cfg.LongAggr
local torso = B.Enabled and B.Torso or 0
local armPad = B.Enabled and B.Arm or 0
local standReach = cfg.StandReach + 1.2 + torso + armPad * 0.5
local standH = 5.2 + torso
local gc = cm and cm:FindFirstChild("GroundController")
local accelT = math.clamp(gc and gc.AccelerationTime or cfg.RunAccel, 0.12, 0.5)
local top = F.SprintBase() * math.max(getgenv().MystrixSprint.Boost or 1, 1)
local sign = lat >= 0 and 1 or -1
local vz = root.AssemblyLinearVelocity.Z * sign
local function runFn(T)
return F.KeeperRunDist(T, vz, top, accelT)
end
local canRun = runFn(math.max(rem - 0.1, 0))
if alat <= standReach + canRun * 0.85 and hy <= standH then return nil end
if hy > standH and hy <= standH + 3 and alat <= standReach + 0.6 + canRun * 0.5 then
return "Jump", rem, 0.3 + cfg.Lead + cfg.Predive * 0.5, lat, Vector3.new(0, 0, sign)
end
if alat > cfg.DiveRange * (1 + long * 0.6) * 1.1 + torso then return nil end
local vec = F.KeeperDiveVector(plan, root, lat, hy)
local need = alat / math.max(math.abs(vec.Z), 0.5)
local arm = cfg.ArmReach + armPad + long * 1.2
local vtol = cfg.VReach + torso * 0.6
local offs = { Low = 0.7, Mid = 1.2, High = 1.9 }
local carry = math.clamp(vz, -24, 24) + cfg.DiveBoost
local best
for _, kind in ipairs({ "Low", "Mid", "High" }) do
local prof = F.KeeperDiveProfile(kind)
if prof then
local t, deficit = F.KeeperDiveFit(prof, need, hy, carry, rem, runFn, arm, vtol, offs[kind])
local score = t and math.max(t - rem, 0) * 4 or 10 + deficit
if t then
local idx = math.min(math.floor(t / prof.step) + 1, #prof.H)
score += math.abs(hy - (prof.H[idx] + offs[kind])) * 0.2
end
if not best or score < best.score then
best = { kind = kind, t = t or prof.tmax, score = score }
end
end
end
if not best then return nil end
local lag = math.clamp(plan.lag or 0, 0, 0.25)
local pre = cfg.Predive * (0.4 + math.clamp((plan.speed - 30) / 70, 0, 1)) * (1 + long)
return best.kind, rem, best.t + cfg.Lead + lag * 0.4 + pre, lat, vec
end
function MystrixHub.Functions.KeeperPlan(char, root, ball, goal)
local F = MystrixHub.Functions
local cfg = getgenv().MystrixKeeper
local st = MystrixHub.KeeperState
local id = char:GetAttribute("DribbleId")
local myTeam = char:GetAttribute("Team")
local possessor = ball:GetAttribute("Possessor")
local rp = root.Position
local bp = ball.Position
local gz = goal.z
local inward = goal.inward
local near = cfg.Depth
local limit = goal.half - 2.5
local now = os.clock()
local function spotFor(point)
local dx, dz = point.X - goal.x, point.Z - gz
local dist = math.sqrt(dx * dx + dz * dz)
local ux, uz = inward.X, 0
if dist > 1 then
ux, uz = dx / dist, dz / dist
end
local along = ux * inward.X
if along < 0.35 then
uz = (uz >= 0 and 1 or -1) * 0.9367496997597597
along = 0.35
end
local t = math.clamp((dist - 14) / 90, 0, 1)
local depth = near + near * 1.2 * t
local z = math.clamp(uz * depth / along, -limit, limit)
return Vector3.new(goal.x + inward.X * depth, rp.Y, gz + z)
end
if type(possessor) == "number" and possessor ~= 0 then
if possessor == id then return nil end
local model, croot = F.KeeperCarrier(possessor)
if not croot then
return { kind = "hold", target = spotFor(bp), look = bp }
end
local cp = croot.Position
local cv = croot.AssemblyLinearVelocity
local ahead = Vector3.new(cp.X + cv.X * 0.25, cp.Y, cp.Z + cv.Z * 0.25)
local plan = { kind = "hold", target = spotFor(ahead), look = cp }
if model:GetAttribute("Team") == myTeam then
return plan
end
local gx, gdz = cp.X - goal.x, cp.Z - gz
local toGoal = math.sqrt(gx * gx + gdz * gdz)
local mx, mz = cp.X - rp.X, cp.Z - rp.Z
local toMe = math.sqrt(mx * mx + mz * mz)
plan.carrier = croot
plan.alert = toGoal <= 60
local inFront = inward.X * gx > 0
local central = math.abs(gdz) <= goal.half * 1.25
local towards = -(cv.X * inward.X)
local holding = st and st.RushUntil and now < st.RushUntil
local want = cfg.Rush and inFront and central and toGoal <= cfg.RushRange and toGoal >= 9 and toMe <= 26 and towards > -2
if want or (holding and inFront and toGoal >= 7 and toMe <= 30) then
if want and st then st.RushUntil = now + 0.5 end
local lead = math.min(toMe / math.max(F.SprintBase(), 1), 0.4)
plan.kind = "rush"
plan.target = Vector3.new(cp.X + cv.X * lead, rp.Y, cp.Z + cv.Z * lead)
end
return plan
end
if not F.SilentAimModules() then return nil end
local SA = getgenv().MystrixSilentAim
local BV = SA.BallView
local rel = ball:GetAttribute("ReleasedBy")
local relAt = ball:GetAttribute("ReleasedAt")
local selfRecent = rel == id and type(relAt) == "number" and workspace:GetServerTimeNow() - relAt < 1.2
local state = BV.freeSim()
local pos, vel, spin
if state then
pos, vel, spin = state.pos, state.vel, state.spin
else
pos = BV.getPosition() or bp
vel = ball.AssemblyLinearVelocity
spin = Vector3.zero
end
local speed = vel.Magnitude
if speed > 12 then
local params = SA.Flight.params(ball)
local gy = BV.groundBallY(pos)
local list = F.KeeperPredict(params, pos, vel, spin or Vector3.zero, gy, 3.2)
local depthNow = (goal.x - pos.X) * goal.side
local kd = math.max(cfg.Depth * 1.3, 2)
local first, cross = F.KeeperCatchPoint(list, pos, goal, kd, cfg)
local lag = 0
pcall(function() lag = LocalPlayer:GetNetworkPing() end)
lag = math.clamp(lag, 0, 0.25)
if cross then
local lat = math.abs(cross.pos.Z - gz)
local hy = cross.pos.Y - goal.ground
if lat <= goal.half + 1.5 and hy <= (goal.top - goal.ground) + 1.0 and hy >= -0.5 then
local hit = first or cross
local hd = (goal.x - hit.pos.X) * goal.side
local tx = goal.x + inward.X * math.clamp(hd, 1.2, 14)
local tz = math.clamp(hit.pos.Z, gz - (goal.half - 1), gz + (goal.half - 1))
return {
kind = "save",
look = pos,
path = list,
from = pos,
at = now,
side = goal.side,
lag = lag,
cross = cross,
hit = hit,
goal = goal,
speed = speed,
dist = depthNow,
alert = true,
target = Vector3.new(tx, rp.Y, tz),
}
end
end
local claim = cfg.Gather and not selfRecent and F.KeeperClaimPoint(list, goal, cfg)
if claim then
local sprint = F.SprintBase()
local cx, cz = claim.pos.X - rp.X, claim.pos.Z - rp.Z
local mine = math.max(math.sqrt(cx * cx + cz * cz) - 2.4, 0) / sprint
local rival = math.huge
for _, e in ipairs(F.MannequinSnapshot()) do
if e.model ~= char and type(e.team) == "string" and e.team ~= myTeam then
local rx, rz = claim.pos.X - e.pos.X, claim.pos.Z - e.pos.Z
local t = math.max(math.sqrt(rx * rx + rz * rz) - 3, 0) / 31
if t < rival then rival = t end
end
end
if mine <= claim.t + 0.3 and mine + 0.1 < rival then
return {
kind = "claim",
look = pos,
path = list,
from = pos,
at = now,
side = goal.side,
lag = lag,
hit = claim,
goal = goal,
speed = speed,
dist = depthNow,
alert = true,
target = Vector3.new(claim.pos.X, rp.Y, claim.pos.Z),
}
end
end
local sample = list[math.min(#list, 33)]
local focus = sample and sample.pos or pos
return { kind = "hold", target = spotFor(focus), look = pos }
end
local depthIn = (goal.x - pos.X) * goal.side
local inArea = depthIn >= 0 and depthIn <= 23 and math.abs(pos.Z - gz) <= 34
if cfg.Gather and not selfRecent and inArea and pos.Y - BV.groundBallY(pos) <= 4 then
local sprint = F.SprintBase()
local mdx, mdz = pos.X - rp.X, pos.Z - rp.Z
local mine = math.max(math.sqrt(mdx * mdx + mdz * mdz) - 2.6, 0) / sprint
local rival = math.huge
for _, model in ipairs(Services.CollectionService:GetTagged("MannequinCharacter")) do
if model ~= char and model:IsA("Model") then
local team = model:GetAttribute("Team")
local r = model:FindFirstChild("Root")
if type(team) == "string" and team ~= myTeam and r and r:IsA("BasePart") then
local rdx, rdz = pos.X - r.Position.X, pos.Z - r.Position.Z
local t = math.max(math.sqrt(rdx * rdx + rdz * rdz) - 3, 0) / 31
if t < rival then rival = t end
end
end
end
if mine + 0.15 < rival then
return {
kind = "gather",
target = Vector3.new(pos.X + vel.X * 0.12, rp.Y, pos.Z + vel.Z * 0.12),
look = pos,
}
end
end
return { kind = "hold", target = spotFor(pos), look = pos }
end
function MystrixHub.Functions.StartKeeper()
local F = MystrixHub.Functions
F.StopKeeper()
if not F.SilentAimModules() then return false end
F.KeeperDiveEnv()
F.KeeperDivesModule()
local cfg = getgenv().MystrixKeeper
local st = {
Acc = 1,
Plan = nil,
Controlling = false,
DiveNext = 0,
PokeNext = 0,
SlideNext = 0,
Moving = false,
Dir = Vector3.zero,
RushUntil = 0,
Fast = false,
}
MystrixHub.KeeperState = st
local function downed(char)
local bodyState = char:GetAttribute("BodyState")
if bodyState ~= nil and bodyState ~= "Animated" then return true end
local mod = F.MannequinClientModule()
if mod then
local ok, anim = pcall(mod.getAnimator, char)
if ok and anim and anim.body and anim.body.active then return true end
end
return false
end
local function release()
if st.Controlling and st.Cm and st.Cm.Parent then
st.Cm.MovingDirection = Vector3.zero
end
st.Controlling = false
st.Plan = nil
st.Tgt = nil
st.Moving = false
st.Dir = Vector3.zero
st.Face = nil
end
local function refresh()
local char = LocalPlayer.Character
if not char then return false end
local team = char:GetAttribute("Team")
if team ~= "Blue" and team ~= "Red" then return false end
if downed(char) or F.MatchPaused(char) then return false end
local root = char:FindFirstChild("Root")
local cm = char:FindFirstChildOfClass("ControllerManager")
local ball = F.GetBall()
local goal = F.KeeperGoal()
if not (root and cm and ball and goal) then return false end
local plan = F.KeeperPlan(char, root, ball, goal)
if not plan then return false end
st.Char, st.Root, st.Cm, st.Ball, st.Plan = char, root, cm, ball, plan
st.Fast = plan.kind == "save" or plan.kind == "rush" or plan.kind == "claim" or plan.alert == true
return true
end
local function steer(target, dt)
local cur = st.Face
if not cur or cur.Magnitude < 0.001 then
local look = st.Root.CFrame.LookVector
cur = Vector3.new(look.X, 0, look.Z)
if cur.Magnitude < 0.001 then
st.Face = target
return target
end
end
cur = cur.Unit
local angle = math.acos(math.clamp(cur:Dot(target), -1, 1))
local step = 12 * dt
if angle ~= angle or angle <= step then
st.Face = target
return target
end
local rotated = CFrame.Angles(0, cur:Cross(target).Y >= 0 and step or -step, 0) * cur
rotated = Vector3.new(rotated.X, 0, rotated.Z)
if rotated.Magnitude < 0.001 then
st.Face = target
return target
end
st.Face = rotated.Unit
return st.Face
end
local function drive(dt)
local plan, root, cm, char = st.Plan, st.Root, st.Cm, st.Char
if not (root.Parent and cm.Parent and char.Parent and LocalPlayer.Character == char) or downed(char) then
release()
return
end
local now = os.clock()
local rp = root.Position
local kind = plan.kind
local speed = F.SprintBase() * math.max(getgenv().MystrixSprint.Boost or 1, 1)
local active = cm.ActiveController
if active == nil or active.Name == "BodyIdleController" then
local gc = cm:FindFirstChild("GroundController")
if gc then cm.ActiveController = gc end
end
local goalT = plan.target
local tau = kind == "save" and 0.02 or (kind == "claim" and 0.03 or (kind == "rush" and 0.07 or 0.12))
if not st.Tgt or (st.Tgt - goalT).Magnitude > 25 then
st.Tgt = goalT
else
st.Tgt = st.Tgt:Lerp(goalT, 1 - math.exp(-dt / tau))
end
local tgt = st.Tgt
local dx, dz = tgt.X - rp.X, tgt.Z - rp.Z
local dist = math.sqrt(dx * dx + dz * dz)
if st.Moving then
if dist < 0.25 then st.Moving = false end
elseif dist > 0.6 then
st.Moving = true
end
if st.Moving and dist > 0.001 then
local mag = kind == "hold" and math.clamp(dist / (speed * 0.2), 0.15, 1) or 1
local want = Vector3.new(dx / dist, 0, dz / dist) * mag
st.Dir = st.Dir:Lerp(want, 1 - math.exp(-dt / 0.03))
cm.MovingDirection = st.Dir
cm.BaseMoveSpeed = math.max(cm.BaseMoveSpeed, speed)
else
st.Dir = Vector3.zero
cm.MovingDirection = Vector3.zero
end
local look = plan.look
if look then
local fx, fz = look.X - rp.X, look.Z - rp.Z
local fm = math.sqrt(fx * fx + fz * fz)
if fm > 1 then
cm.FacingDirection = steer(Vector3.new(fx / fm, 0, fz / fm), dt)
end
end
st.Controlling = true
local serverNow = workspace:GetServerTimeNow()
if cfg.Poke and now >= st.PokeNext then
local readyAt = LocalPlayer:GetAttribute("PokeReadyAt")
if not (type(readyAt) == "number" and readyAt > serverNow) then
local model, distance = F.FindPokeTarget()
if model and distance <= 6.2 then
F.FirePoke()
st.PokeNext = now + 0.25
end
end
end
if cfg.Dive and (kind == "save" or kind == "claim") and now >= st.DiveNext and char:GetAttribute("Role") == "Goalkeeper" then
local ballFlat = Vector3.new(plan.from.X - rp.X, 0, plan.from.Z - rp.Z).Magnitude
if ballFlat <= (cfg.CommitRange or 45) * (1 + (cfg.LongAggr or 0) * 0.3) then
local diveKind, rem, fireAt, lat, vec = F.KeeperDecide(plan, root, cm, now)
if diveKind and rem <= fireAt and rem >= -0.1 then
if F.KeeperDive(char, diveKind, vec) then
st.DiveNext = now + (diveKind == "Jump" and 0.7 or 1.4)
else
st.DiveNext = now + 0.04
end
end
end
end
if cfg.Dive and kind == "rush" and plan.carrier and plan.carrier.Parent and now >= st.SlideNext then
local cp = plan.carrier.Position
local sx, sz = cp.X - rp.X, cp.Z - rp.Z
local acts = F.KeeperActions()
if math.sqrt(sx * sx + sz * sz) <= 7.5 and F.KeeperReady(acts.Slide) then
local readyAt = LocalPlayer:GetAttribute("SlideReadyAt")
if not (type(readyAt) == "number" and readyAt > serverNow) then
F.KeeperFire(acts.Slide)
st.SlideNext = now + 2.2
end
end
end
end
RunService:BindToRenderStep("MystrixKeeper", Enum.RenderPriority.Input.Value + 12, function(dt)
if not cfg.Enabled then
release()
return
end
st.Acc += dt
local interval = (st.Plan and st.Plan.kind == "save") and F.Budget(0.016) or (st.Fast and F.Budget(0.03) or F.Budget(0.08))
if st.Acc >= interval then
st.Acc = 0
local ok, ready = pcall(refresh)
if not ok or not ready then
release()
return
end
end
if st.Plan then
if not pcall(drive, dt) then
release()
end
end
end)
MystrixHub.ConnectionController.Insert({ Disconnect = function() MystrixHub.Functions.StopKeeper() end })
return true
end
getgenv().MystrixAutoTricks = getgenv().MystrixAutoTricks or { Enabled = false, Range = 70 }
getgenv().MystrixAutoTricks.Auto = true
getgenv().MystrixAutoTricks.AirFamilies = {}
getgenv().MystrixAutoTricks.Skills = {}
getgenv().MystrixAutoTricks.Lob = false
getgenv().MystrixTrickFilter = getgenv().MystrixTrickFilter or { Hooked = false }
MystrixHub.TrickOptions = {
"Auto",
"Bicycle Kick",
"Volley",
"Side Volley",
"Header",
"Jump Header",
"Running Header",
"Diving Header",
"Lob",
"Ronaldo Chop",
"Cruyff Turn",
"Knock-On",
"Elastico",
"Rainbow Flick",
"Roulette",
"Step Over",
"Croqueta",
}
MystrixHub.TrickCatalog = {
["Bicycle Kick"] = { air = "Bicycle" },
["Volley"] = { air = "Volley" },
["Side Volley"] = { air = "SideVolley" },
["Header"] = { air = "Header" },
["Jump Header"] = { air = "JumpHeader" },
["Running Header"] = { air = "RunningHeader" },
["Diving Header"] = { air = "DivingHeader" },
["Lob"] = { lob = true },
["Ronaldo Chop"] = { skill = { kind = "Flick", dir = "Away" } },
["Cruyff Turn"] = { skill = { kind = "Flick", dir = "Down" } },
["Knock-On"] = { skill = { kind = "Flick", dir = "Up" } },
["Elastico"] = { skill = { kind = "Elastico", dir = "Away" } },
["Rainbow Flick"] = { skill = { kind = "Rainbow", dir = "Up" } },
["Roulette"] = { skill = { kind = "Roll", dir = "Away", half = "Bottom" } },
["Step Over"] = { skill = { kind = "Roll", dir = "Away", half = "Top" } },
["Croqueta"] = { skill = { kind = "Hold", dir = "Away" } },
}
function MystrixHub.Functions.ForceFor(seconds)
local F = MystrixHub.Force
if not F then
F = { Active = false, Until = 0 }
MystrixHub.Force = F
end
F.Until = math.max(F.Until, os.clock() + seconds)
if F.Active then return end
local SA = getgenv().MystrixSilentAim
local MP = getgenv().MystrixMaxPower
F.Active = true
SA.Enabled = true
MP.Enabled = true
task.spawn(function()
while os.clock() < F.Until do
task.wait(0.1)
end
SA.Enabled = SA.User == true
MP.Enabled = MP.User == true
F.Active = false
end)
end
MystrixHub.ShotSpots = {
["Top Right Corner"] = { 0.97, 0.95 },
["Bottom Right Corner"] = { 0.97, 0.04 },
["Top Left Corner"] = { -0.97, 0.95 },
["Bottom Left Corner"] = { -0.97, 0.04 },
["Top Center"] = { 0, 0.95 },
["Bottom Center"] = { 0, 0.04 },
["Upper Right"] = { 0.62, 0.82 },
["Upper Left"] = { -0.62, 0.82 },
["Lower Right"] = { 0.62, 0.16 },
["Lower Left"] = { -0.62, 0.16 },
["Right Post"] = { 0.97, 0.5 },
["Left Post"] = { -0.97, 0.5 },
["Middle"] = { 0, 0.4 },
}
function MystrixHub.Functions.SegGap(p, a, b)
local d = b - a
local dd = d:Dot(d)
local t = dd > 1e-9 and math.clamp((p - a):Dot(d) / dd, 0, 1) or 0
return (p - (a + d * t)).Magnitude
end
function MystrixHub.Functions.KeeperKit()
local H = MystrixHub
if H.KeeperKitData then return H.KeeperKitData end
if H.KeeperKitFail and os.clock() - H.KeeperKitFail < 5 then return nil end
local ok, kit = pcall(function()
local folder = Services.ReplicatedStorage:FindFirstChild("BotMatchKeeper")
local reachModule = folder and folder:FindFirstChild("Reach")
local configModule = folder and folder:FindFirstChild("Config")
if not (reachModule and configModule) then return nil end
local Reach = require(reachModule)
local Config = require(configModule)
local jumpLift = math.huge
pcall(function()
local sharedGame = Services.ReplicatedStorage.Shared.Game
local animation = sharedGame:FindFirstChild("MannequinAnimation")
local tuning = animation and animation:FindFirstChild("Tuning")
if tuning then
jumpLift = require(tuning).Dive.Jumping.Lift
end
end)
local dives, reachX = {}, {}
for _, dive in ipairs(Reach.dives) do
if dive.block or not (dive.lift > jumpLift + 0.001) then
local rows = {}
for key, v in ipairs(dive.at) do
local body = Vector3.new(v[7], v[8], 0)
local legs
if dive.block then
legs = Vector3.new(body.X, math.max(body.Y - 4, 0.3), 0)
else
legs = Vector3.new(body.X - math.min(math.max(body.X, 0) * 0.6, 4.2), math.max(body.Y - 3.8, 0.3), 0)
end
rows[key] = { Vector3.new(v[1], v[2], 0), Vector3.new(v[3], v[4], 0), Vector3.new(v[5], v[6], 0), body, legs }
reachX[key] = math.max(reachX[key] or 0, v[1], v[3], v[5])
end
dives[#dives + 1] = { rows = rows, power = dive.power, lift = dive.lift, block = dive.block }
end
end
if #dives == 0 then return nil end
for i = 2, #reachX do
reachX[i] = math.max(reachX[i], reachX[i - 1])
end
return {
dives = dives,
reachX = reachX,
step = Reach.STEP,
hand = Config.HandReach,
arm = Config.ArmReach,
body = Config.BodyReach,
leg = Config.LegReach,
shSpeed = Config.ShuffleSpeed,
shAccel = Config.ShuffleAccel,
react = Config.Reaction[1],
cfg = Config,
}
end)
if ok and type(kit) == "table" then
H.KeeperKitData = kit
return kit
end
H.KeeperKitFail = os.clock()
return nil
end
task.spawn(MystrixHub.Functions.KeeperKit)
function MystrixHub.Functions.KeeperSave(lat, y, T, dist)
local F = MystrixHub.Functions
local kit = F.KeeperKit()
T = math.max(T, 0)
lat = math.abs(lat)
if not kit then
local gap = lat - (4.8 + 15 * T) - math.max(y - 6.5, 0) * 0.5
return gap, gap <= 0 and 0.6 or 0
end
local cfg = kit.cfg
local accel, speed = kit.shAccel, kit.shSpeed
local q = speed / accel
local segGap = F.SegGap
local best = math.huge
local bestCost = 1
local need = math.huge
local p1 = 0
while p1 <= T + 1e-6 do
local moved = p1 <= q and 0.5 * accel * p1 * p1 or 0.5 * accel * q * q + speed * (p1 - q)
local pt = Vector3.new(math.max(lat - moved, 0), y, 0)
local tm = T - p1
for _, dive in ipairs(kit.dives) do
local rows = dive.rows
local n = #rows
local t = math.clamp(tm / kit.step, 0, n - 1)
local i = math.floor(t)
local a = t - i
local r1, r2 = rows[i + 1], rows[math.min(i + 2, n)]
local h1, h2 = r1[1]:Lerp(r2[1], a), r1[2]:Lerp(r2[2], a)
local e = r1[3]:Lerp(r2[3], a)
local b1, b2 = r1[4]:Lerp(r2[4], a), r1[5]:Lerp(r2[5], a)
local g = math.min((pt - h1).Magnitude, (pt - h2).Magnitude) - kit.hand
g = math.min(g, segGap(pt, h1, e) - kit.arm, segGap(pt, h2, e) - kit.arm, segGap(pt, e, b1) - kit.body, segGap(pt, b1, b2) - kit.leg)
local cost = dive.power + cfg.HighCost * dive.lift
if g < best then
best = g
bestCost = cost
end
if p1 == 0 and g <= 0 and not dive.block and cost < need then
need = cost
end
end
p1 += 0.08
end
local save = 0
if best <= 0 then
if need == math.huge then need = bestCost end
local t = math.clamp((dist - cfg.NearShot) / (cfg.FarShot - cfg.NearShot), 0, 1)
save = cfg.SaveEasy - (cfg.SaveEasy - cfg.SaveHard) * math.clamp(need, 0, 1) ^ cfg.HardCurve + cfg.DistantBonus * t
save = math.clamp(save, 0, 1)
if dist >= cfg.SureFrom then save = 1 end
end
return best, save
end
function MystrixHub.Functions.KeeperAt(goal, from, keeper, kit)
local cfg = kit and kit.cfg
if not cfg then return keeper end
local oX = -goal.out
local dx, dz = from.X - goal.x, from.Z - goal.z
local dist = math.sqrt(dx * dx + dz * dz)
local ux, uz = oX, 0
if dist > 1 then ux, uz = dx / dist, dz / dist end
if ux * oX < 0.35 then
local sign = uz >= 0 and 1 or -1
if math.abs(uz) < 0.001 then sign = 0 end
ux, uz = oX * 0.35, sign * 0.9367496997597597
end
local along = ux * oX
local t = math.clamp((dist - cfg.NearBall) / (cfg.FarBall - cfg.NearBall), 0, 1)
local depth = cfg.DepthNear + (cfg.DepthFar - cfg.DepthNear) * t
local zMax = goal.half - cfg.PostInset
local zOff = math.clamp(uz * depth / along, -zMax, zMax)
local ballDepth = (goal.x - from.X) * goal.out
local absZ = math.abs(from.Z - goal.z)
if ballDepth <= 0.5 then
depth = cfg.DepthTight
elseif absZ > 0.001 then
depth = math.clamp(math.abs(zOff) * ballDepth / absZ, cfg.DepthTight, depth)
end
local sx, sz = goal.x - goal.out * depth, goal.z + zOff
local mx, mz = sx - keeper.X, sz - keeper.Z
local md = math.sqrt(mx * mx + mz * mz)
local travel = cfg.MoveSpeed * (cfg.Reaction[1] + cfg.Reaction[2]) * 0.5
if md > travel then
local f = travel / md
mx, mz = mx * f, mz * f
end
return Vector3.new(keeper.X + mx, keeper.Y, keeper.Z + mz)
end
function MystrixHub.Functions.ShotTargets(goal, lob, radius)
local F = MystrixHub.Functions
local targets = SilentAimState.Targets
if targets and #targets > 0 then
local list = {}
for _, name in ipairs(targets) do
local p = F.ShotPoint(goal, name, radius)
if p then list[#list + 1] = p end
end
if #list > 0 then return list, true end
end
return F.ShotAutoList(goal, lob, radius), false
end
function MystrixHub.Functions.PitchSolve(env, gy, from, point, speed, minA, maxA, lob, dt, bx, bz, bn, deadline, center)
local F = MystrixHub.Functions
local dx, dz = point.X - from.X, point.Z - from.Z
local d = math.sqrt(dx * dx + dz * dz)
if d < 1 then return nil end
local ux, uz = dx / d, dz / d
local spin = Vector3.new(0, 0, 0)
local limitT = math.clamp(d / math.max(speed * 0.45, 6) + 0.8, 1, lob and 8 or 4.5)
local lo, hi, iters = minA, maxA, 11
if center then
lo, hi, iters = math.max(minA, center - 0.05), math.min(maxA, center + 0.05), 8
end
local best
for _ = 1, iters do
if deadline and best and os.clock() > deadline then break end
local th = (lo + hi) / 2
local ct = math.cos(th)
local vel = Vector3.new(ux * ct * speed, math.sin(th) * speed, uz * ct * speed)
local c, ft, blocked = F.ShotFly(env, gy, from, vel, spin, limitT, bx, bz, bn, dt)
if not c then
if th > 0.6 then hi = th else lo = th end
else
local err = c.Y - point.Y
local miss = math.abs(err)
if not best or miss < best.miss then
best = { vel = vel, miss = miss, ft = ft, blocked = blocked, c = c, th = th }
end
if miss < 0.04 then break end
if err > 0 then hi = th else lo = th end
end
end
if not best then return nil end
return best.vel, spin, best.miss, best.ft, best.blocked, best.c, best.th
end
function MystrixHub.Functions.ShotBounds(env)
local goal = env.Goal
local clear = env.Radius + 0.1
return goal.half - clear - 1.0, goal.ground + 0.3, goal.top - clear - 0.9
end
function MystrixHub.Functions.SilentAimKeeper(goal)
local keeper
local best = math.huge
for _, entry in ipairs(MystrixHub.Functions.MannequinSnapshot()) do
if entry.keeper and entry.model ~= goal.char and type(entry.team) == "string" and entry.team ~= goal.team then
local d = math.abs(entry.pos.X - goal.x)
if d < best then
best = d
keeper = entry.pos
end
end
end
return keeper
end
function MystrixHub.Functions.TrickBinding(key)
local bindings = MystrixHub.Bindings
if not bindings then
bindings = {}
MystrixHub.Bindings = bindings
MystrixHub.ConnectionController.Insert({ Disconnect = function()
for _, b in pairs(bindings) do
pcall(function() b:Destroy() end)
end
end })
end
local action = MystrixHub.Functions.GetKickAction(key)
if not action then return nil end
local binding = bindings[key]
if not (binding and binding.Parent == action) then
if binding then
pcall(function() binding:Destroy() end)
end
binding = Instance.new("InputBinding")
binding.Name = "MystrixTrick" .. key
binding.Type = Enum.InputBindingType.Scriptable
binding.Parent = action
bindings[key] = binding
end
return binding
end
function MystrixHub.Functions.TrickViewApply()
local V = MystrixHub.TrickView
local cam = workspace.CurrentCamera
if not (V and V.Active and cam) then return end
local cf = cam.CFrame
if not V.Saved then V.Saved = cf end
local pos = cf.Position
local target
if V.Mode == "away" then
target = pos + (V.Dir or Vector3.new(0, 0, -1)) * 20 + Vector3.new(0, 2, 0)
else
target = V.Point
end
if not target or (target - pos).Magnitude < 0.5 then return end
cam.CFrame = CFrame.lookAt(pos, target)
end
function MystrixHub.Functions.InstallTrickView()
if MystrixHub.TrickView then return end
local V = { Active = false, Mode = "goal", Until = 0 }
MystrixHub.TrickView = V
local names = { "MystrixViewEarly", "MystrixViewBegin", "MystrixViewEnd" }
local function restore()
local cam = workspace.CurrentCamera
if V.Saved and cam then
cam.CFrame = V.Saved
end
V.Saved = nil
end
for _, name in ipairs(names) do
pcall(function() RunService:UnbindFromRenderStep(name) end)
end
RunService:BindToRenderStep("MystrixViewEarly", Enum.RenderPriority.First.Value, restore)
RunService:BindToRenderStep("MystrixViewBegin", Enum.RenderPriority.Input.Value + 2, function()
if V.Active and os.clock() > V.Until then
V.Active = false
end
if V.Active then
MystrixHub.Functions.TrickViewApply()
end
end)
RunService:BindToRenderStep("MystrixViewEnd", Enum.RenderPriority.Input.Value + 9, restore)
MystrixHub.ConnectionController.Insert({ Disconnect = function()
for _, name in ipairs(names) do
pcall(function() RunService:UnbindFromRenderStep(name) end)
end
restore()
V.Active = false
MystrixHub.TrickView = nil
end })
end
function MystrixHub.Functions.TrickViewSet(mode, value, seconds)
local F = MystrixHub.Functions
F.InstallTrickView()
local V = MystrixHub.TrickView
V.Mode = mode
if mode == "away" then
V.Dir = value
else
V.Point = value
end
V.Active = true
V.Until = os.clock() + seconds
F.TrickViewApply()
end
function MystrixHub.Functions.TrickViewPush(st)
local F = MystrixHub.Functions
if st.Mode == "away" and st.Goal then
F.TrickViewSet("away", Vector3.new(-st.Goal.out, 0, 0), 0.3)
elseif st.Point then
F.TrickViewSet("goal", st.Point, 0.3)
end
end
function MystrixHub.Functions.TrickFire(key, point, hold)
local F = MystrixHub.Functions
local binding = F.TrickBinding(key)
if not binding then
F.Debug("kick action not found")
return false
end
F.ForceFor(2.5)
MystrixHub.TrickActive = true
MystrixHub.TrickKey = key
F.TrickViewSet("goal", point, hold + 0.8)
binding:Fire(true)
task.delay(hold, function()
F.TrickViewSet("goal", point, 0.8)
pcall(function() binding:Fire(false) end)
task.delay(0.9, function()
MystrixHub.TrickActive = false
MystrixHub.TrickKey = nil
end)
end)
F.Debug("fired " .. key)
return true
end
function MystrixHub.Functions.TrickReady()
local char = LocalPlayer.Character
if not char then return nil end
local team = char:GetAttribute("Team")
if team ~= "Blue" and team ~= "Red" then return nil end
if char:GetAttribute("Role") == "Goalkeeper" then return nil end
local bodyState = char:GetAttribute("BodyState")
if bodyState ~= nil and bodyState ~= "Animated" then return nil end
local hold = LocalPlayer:GetAttribute("KickoffHold")
if type(hold) == "number" and hold > workspace:GetServerTimeNow() then return nil end
local root = char:FindFirstChild("Root")
local ball = MystrixHub.Functions.GetBall()
if not (root and ball) then return nil end
local goal = MystrixHub.Functions.SilentAimGoal()
if not goal then return nil end
return char, root, ball, goal
end
function MystrixHub.Functions.AutoPossessed(st, S, T, goal, goalDist, now)
local F = MystrixHub.Functions
local SA = getgenv().MystrixSilentAim
local forced = T.Enabled and T.Auto == false
local lobForced = forced and T.Lob == true
if not (S.Enabled or lobForced) or goalDist > S.Range or goalDist < 3 then
st.Next = now + 0.3
return
end
local from = SA.BallView.getPosition()
if not from then return end
local budget = F.Budget(0.003)
local shot
if not lobForced then
shot = F.ShotBest(from, "Laced", false, budget)
if shot and shot.fallback then shot = nil end
end
local lob
local gap = 0
if lobForced then
lob = F.ShotBest(from, "Lofted", true, budget)
if lob and lob.fallback then lob = nil end
elseif T.Enabled and not forced and goalDist > 14 then
local keeper = F.SilentAimKeeper(goal)
gap = keeper and math.abs(keeper.X - goal.x) or 0
if gap > 8 or not shot then
lob = F.ShotBest(from, "Lofted", true, budget)
if lob and lob.fallback then lob = nil end
end
end
local useLob = lob ~= nil and (lobForced or shot == nil or gap > 8)
local result = useLob and lob or shot
if not result then
F.Debug("no clear shot from here")
st.Next = now + 0.35
return
end
MystrixHub.ShotLast = result
st.Next = now + 1.6
MystrixHub.ShotNext = now + 1.6
F.TrickFire(useLob and "KickLob" or "KickStrike", result.point, getgenv().MystrixMaxPower.Hooked and 0.06 or 0.46)
end
function MystrixHub.Functions.AutoAir(st, T, char, root, ball, goal, goalDist, now)
local F = MystrixHub.Functions
local SA = getgenv().MystrixSilentAim
if goalDist > T.Range then return end
local bp, rp = ball.Position, root.Position
local delta = Vector3.new(bp.X - rp.X, 0, bp.Z - rp.Z)
if delta.Magnitude > 90 then return end
local id = char:GetAttribute("DribbleId")
if ball:GetAttribute("ReleasedBy") == id then
local at = ball:GetAttribute("ReleasedAt")
if type(at) == "number" and workspace:GetServerTimeNow() - at < 0.8 then return end
end
local pos, vel = SA.BallView.freeState()
if typeof(pos) ~= "Vector3" or typeof(vel) ~= "Vector3" then return end
local gy = SA.BallView.groundBallY(pos)
if pos.Y - gy < 0.9 and math.abs(vel.Y) < 3 then return end
local best, bike, groundY, sampleNow, cands = F.TrickScanAir(st, root, goal)
if not best then return end
local cand, mode, family = F.TrickChoose(st, char, root, goal, best, bike, cands, groundY, sampleNow)
if not cand or not family then return end
local result = F.ShotBest(cand.pos, family, false, F.Budget(0.006), -0.95)
if not result or result.fallback then
st.Fail = st.Fail or {}
st.Fail[family] = now + 0.6
st.Next = now + 0.08
return
end
local binding = F.TrickBinding("KickStrike")
if not binding then
st.Next = now + 0.5
return
end
st.Point = result.point
st.Phase = "air"
st.Start = now
st.Mode = mode
st.LockFamily = family
st.Binding = binding
st.Goal = goal
st.Cand = { t = cand.t, at = now }
st.ScanAt = now + 0.08
st.Lost = 0
st.Seen = false
st.LastAir = family
MystrixHub.TrickActive = true
MystrixHub.ShotNext = now + 0.9
MystrixHub.TrickLock = { Name = family, Until = now + 1.6 }
F.ForceFor(2.2)
F.TrickViewPush(st)
binding:Fire(true)
F.Debug("holding for " .. family)
end
function MystrixHub.Functions.AutoStep(st, now)
local F = MystrixHub.Functions
if st.Phase == "tail" then
F.TrickViewPush(st)
local started = F.TrickStarted()
if started then
st.Seen = true
MystrixHub.TrickLock = nil
end
local over
if st.Seen then
over = (not started and now - st.ReleaseAt > 0.3) or now >= st.ReleaseAt + 2.2
else
over = now >= st.TailUntil
end
if over then
if not st.Seen then
st.Fail = st.Fail or {}
if st.LockFamily then st.Fail[st.LockFamily] = now + 0.9 end
MystrixHub.ShotNext = now
end
st.Phase = nil
st.LockFamily = nil
MystrixHub.TrickLock = nil
MystrixHub.TrickActive = false
st.Next = now + (st.Seen and 0.5 or 0.12)
end
return
end
local leads = {
Bicycle = 1.0,
DivingHeader = 0.95,
JumpHeader = 0.95,
RunningHeader = 0.85,
Header = 0.65,
Volley = 0.6,
SideVolley = 0.65,
}
local family = st.LockFamily
local release = false
local char, root, ball, goal = F.TrickReady()
if char then
st.Goal = goal
local possessor = ball:GetAttribute("Possessor")
if type(possessor) == "number" and possessor ~= 0 then
release = true
elseif now >= st.ScanAt then
st.ScanAt = now + 0.08
local best, bike, groundY, sampleNow, cands = F.TrickScanAir(st, root, goal)
local cand
if best then
cand = F.TrickChoose(st, char, root, goal, best, bike, cands, groundY, sampleNow)
end
if cand then
st.Lost = 0
st.Cand = { t = cand.t, at = now }
else
st.Lost += 1
if st.Lost >= 5 then release = true end
end
end
local elapsed = now - st.Start
local remaining = st.Cand.t - (now - st.Cand.at)
local minHold = getgenv().MystrixMaxPower.Hooked and 0.08 or 0.3
if elapsed >= minHold and remaining <= (leads[family] or 0.7) then release = true end
if elapsed >= 1.3 then release = true end
else
release = true
end
F.TrickViewPush(st)
if release then
pcall(function() st.Binding:Fire(false) end)
st.Phase = "tail"
st.ReleaseAt = now
st.TailUntil = now + 1.25
st.Seen = false
MystrixHub.ShotNext = now + 0.8
if MystrixHub.TrickLock then
MystrixHub.TrickLock.Until = now + 1.2
end
end
end
function MystrixHub.Functions.AutoTick(st)
local F = MystrixHub.Functions
local now = os.clock()
if st.Phase then
F.AutoStep(st, now)
return
end
local S = getgenv().MystrixAutoShoot
local T = getgenv().MystrixAutoTricks
if not (S.Enabled or T.Enabled) then return end
if now < st.Next or now < (MystrixHub.ShotNext or 0) then return end
local char, root, ball, goal = F.TrickReady()
if not char then
F.Debug("not ready: no match body, ball or goal")
return
end
if not F.SilentAimModules() then
F.Debug("kick modules missing")
return
end
local goalDist = Vector3.new(goal.x - root.Position.X, 0, goal.z - root.Position.Z).Magnitude
local id = char:GetAttribute("DribbleId")
local possessor = ball:GetAttribute("Possessor")
if type(possessor) == "number" and possessor ~= 0 then
if possessor ~= id then return end
if T.Enabled and F.AutoSkill(st, char, root, goalDist, now) then return end
F.AutoPossessed(st, S, T, goal, goalDist, now)
elseif T.Enabled then
if now < st.ScanAt then return end
st.ScanAt = now + 0.1
F.AutoAir(st, T, char, root, ball, goal, goalDist, now)
end
end
function MystrixHub.Functions.SkillModule()
local cached = MystrixHub.SkillRef
if cached then return cached end
local ok, mod = pcall(function()
local scripts = LocalPlayer:FindFirstChild("PlayerScripts")
local client = scripts and scripts:FindFirstChild("Client")
local gameFolder = client and client:FindFirstChild("Game")
local skill = gameFolder and gameFolder:FindFirstChild("SkillMoves")
local playback = skill and skill:FindFirstChild("Playback")
return playback and require(playback)
end)
if ok and type(mod) == "table" and type(mod.request) == "function" then
MystrixHub.SkillRef = mod
return mod
end
return nil
end
function MystrixHub.Functions.SkillThreat(char, root, range)
local team = char:GetAttribute("Team")
if type(team) ~= "string" then return nil end
local rp = root.Position
local vel = root.AssemblyLinearVelocity
local fx, fz = vel.X, vel.Z
local sp = math.sqrt(fx * fx + fz * fz)
if sp < 3 then
local look = root.CFrame.LookVector
fx, fz = look.X, look.Z
sp = math.sqrt(fx * fx + fz * fz)
if sp < 0.001 then return nil end
end
local ux, uz = fx / sp, fz / sp
local best
for _, e in ipairs(MystrixHub.Functions.MannequinSnapshot()) do
if e.model ~= char and type(e.team) == "string" and e.team ~= team then
local dx, dz = e.pos.X - rp.X, e.pos.Z - rp.Z
local d = math.sqrt(dx * dx + dz * dz)
if d > 0.5 and d <= range then
local ahead = (dx * ux + dz * uz) / d
if ahead > -0.15 and (not best or d < best.d) then
best = { d = d, ahead = ahead, side = ux * dz - uz * dx }
end
end
end
end
return best
end
function MystrixHub.Functions.SkillPick(speed, d, ahead, side, last)
local away = side > 0 and "Left" or "Right"
local list = {}
local function add(kind, dir, half, weight)
local key = kind .. dir .. (half or "")
if key == last then weight *= 0.18 end
if weight > 0 then
list[#list + 1] = { kind = kind, dir = dir, half = half, weight = weight }
end
end
if speed < 9 then
add("Flick", away, nil, 5)
add("Elastico", away, nil, 2)
if ahead > 0.45 then add("Hold", away, nil, 3) end
else
add("Elastico", away, nil, ahead > 0.5 and 6 or 4)
add("Roll", away, "Bottom", 5)
add("Roll", away, "Top", 4)
add("Flick", away, nil, ahead < 0.5 and 6 or 3)
if d < 7.5 and d > 3.2 and ahead > 0.62 and speed >= 14 and speed <= 36 then
add("Rainbow", "Up", nil, 7)
end
if speed < 22 and d < 6 then add("Flick", "Down", nil, 2) end
end
local sum = 0
for _, entry in ipairs(list) do sum += entry.weight end
if sum <= 0 then return nil end
local roll = math.random() * sum
for _, entry in ipairs(list) do
roll -= entry.weight
if roll <= 0 then return { kind = entry.kind, dir = entry.dir, half = entry.half } end
end
local e = list[#list]
return { kind = e.kind, dir = e.dir, half = e.half }
end
function MystrixHub.Functions.TrySkill(st, gesture, speed, now, cooldown)
if not gesture or now < (MystrixHub.SkillUntil or 0) then return false end
local play = MystrixHub.Functions.SkillModule()
if not play then return false end
if type(play.busy) == "function" then
local ok, busy = pcall(play.busy)
if not ok or busy then return false end
end
local ok, label = pcall(play.request, gesture, speed)
if not ok or not label then return false end
MystrixHub.SkillUntil = now + (cooldown or 0.75)
st.Last = gesture.kind .. gesture.dir .. (gesture.half or "")
MystrixHub.Functions.Debug("skill " .. tostring(label))
return true
end
function MystrixHub.Functions.AutoSkill(st, char, root, goalDist, now)
local F = MystrixHub.Functions
local T = getgenv().MystrixAutoTricks
local forced = T.Auto == false
if forced and #(T.Skills or {}) == 0 then return false end
if now < (st.SkillNext or 0) or goalDist < 18 then return false end
if MystrixHub.AutoDribble and getgenv().MystrixAutoDribble.Enabled then return false end
local vel = root.AssemblyLinearVelocity
local myVel = Vector3.new(vel.X, 0, vel.Z)
local speed = myVel.Magnitude
local look = root.CFrame.LookVector
local facing = speed > 4 and myVel / speed or Vector3.new(look.X, 0, look.Z)
if facing.Magnitude < 0.01 then return false end
local f = facing.Unit
local threats = F.DribbleThreats(char, root.Position, f, myVel, (T.Defender or 14) + 2)
local p = threats[1]
if not p then return false end
if p.ahead < -0.15 and p.d > 5 then return false end
if not (p.ttc <= 0.7 or p.d <= 8) then return false end
local gesture
if forced then
gesture = F.SkillForced(p.side)
else
local crowd = 0
for _, t in ipairs(threats) do
if t.d <= 14 then crowd += 1 end
end
gesture = F.DribblePick(speed, p, threats, crowd, st.Last, 2.8)
end
local rainbow = gesture and gesture.kind == "Rainbow"
local success = F.TrySkill(st, gesture, speed, now, rainbow and 1.1 or 0.8)
st.SkillNext = now + (success and (rainbow and 1.4 or 0.95) or 0.25)
if success then
st.Next = now + 0.5
return true
end
return false
end
function MystrixHub.Functions.AutoEngineStart()
local F = MystrixHub.Functions
if MystrixHub.Auto then return true end
if not MystrixHub.TrickMods then
pcall(function()
local sharedGame = Services.ReplicatedStorage:WaitForChild("Shared"):WaitForChild("Game")
local Kick = require(sharedGame:WaitForChild("Kick"))
local Dribble = require(sharedGame:WaitForChild("Dribble"))
local gameFolder = LocalPlayer:WaitForChild("PlayerScripts"):WaitForChild("Client"):WaitForChild("Game")
MystrixHub.TrickMods = {
Bicycle = Kick.Bicycle,
Families = Kick.Families,
Rules = Dribble.Rules,
Radius = Dribble.Rules.BALL_RADIUS,
GameCamera = require(gameFolder:WaitForChild("GameCamera")),
BallView = require(gameFolder:WaitForChild("BallView")),
}
end)
end
local st = { Acc = 0, Next = 0, ScanAt = 0, Mods = MystrixHub.TrickMods }
MystrixHub.Auto = st
F.InstallTrickView()
st.Conn = RunService.Heartbeat:Connect(function(dt)
st.Acc += dt
local slow = F.Budget(1) < 1 and 1.5 or 1
if st.Acc < (st.Phase and 0.04 or 0.12) * slow then return end
st.Acc = 0
local S, T = getgenv().MystrixAutoShoot, getgenv().MystrixAutoTricks
if not st.Phase and not (S.Enabled or T.Enabled) then return end
local ok, err = pcall(F.AutoTick, st)
if not ok then
F.Debug("error: " .. tostring(err))
if st.Phase == "air" then
pcall(function() st.Binding:Fire(false) end)
st.Phase = nil
MystrixHub.TrickActive = false
st.Next = os.clock() + 1
end
end
end)
MystrixHub.ConnectionController.Insert(st.Conn)
MystrixHub.ConnectionController.Insert({ Disconnect = function()
MystrixHub.Functions.AutoEngineStop()
end })
return true
end
function MystrixHub.Functions.AutoEngineStop()
local st = MystrixHub.Auto
MystrixHub.Auto = nil
if st then
if st.Conn then
pcall(function() st.Conn:Disconnect() end)
end
if st.Binding and st.Phase == "air" then
pcall(function() st.Binding:Fire(false) end)
end
end
MystrixHub.Functions.ReleaseAllBindings()
end
function MystrixHub.Functions.TrickScanAir(st, root, goal)
local F = MystrixHub.Functions
local SA = getgenv().MystrixSilentAim
local BV = SA.BallView
local state, shift = BV.freeSim()
if not state then return nil end
local ball = BV.getBall()
if not ball then return nil end
local params = SA.Flight.params(ball)
local groundY = BV.groundBallY(state.pos)
local list = F.ShotPredict(params, state.pos, state.vel, state.spin, groundY, 1.5, 1 / 30)
local rp = root.Position
local rvel = root.AssemblyLinearVelocity
local rv = Vector3.new(rvel.X, 0, rvel.Z)
local mouth = { x = goal.x, z = goal.z, halfWidth = goal.half, top = goal.top, ground = goal.ground, out = goal.out }
local best, bike
local cands = {}
for _, e in ipairs(list) do
local p = e.pos
if (goal.x - p.X) * goal.out < 0 then break end
local h = p.Y - groundY
if e.t >= 0.2 and h >= 0.9 and h <= 14.2 then
local reach = rp + rv * math.min(e.t, 0.6)
local dx, dz = p.X - reach.X, p.Z - reach.Z
local r = math.min(5 + 14 * e.t, 13)
if dx * dx + dz * dz <= r * r then
local cand = { t = e.t, pos = p, h = h }
cands[#cands + 1] = cand
best = best or cand
if not bike and h >= 8.2 and h <= 11.3 and st.Mods and st.Mods.Bicycle.inZone(Vector3.new(p.X, 0, p.Z), { mouth }, 1.5) then
bike = cand
end
end
end
end
if not best then return nil end
return best, bike, groundY, workspace:GetServerTimeNow() - shift, cands
end
function MystrixHub.Functions.TrickBicycleOk(st, char, root, goal, sampleNow, groundY)
local M = st.Mods
if not M then return true end
local ok, result = pcall(function()
local cm = char:FindFirstChild("ControllerManager")
local gc = cm and cm:FindFirstChild("GroundController")
if not (cm and gc) then return true end
local look = root.CFrame.LookVector
local pos = root.Position
local vel = root.AssemblyLinearVelocity
local mouth = { x = goal.x, z = goal.z, halfWidth = goal.half, top = goal.top, ground = goal.ground, out = goal.out }
local aim = M.Bicycle.aimFor(pos, Vector3.new(-goal.out, 0, 0), mouth)
local locked = M.GameCamera.isLocked()
local data = {
now = sampleNow,
pos = Vector3.new(pos.X, 0, pos.Z),
vel = Vector3.new(vel.X, 0, vel.Z),
facing = Vector3.new(look.X, 0, look.Z),
leg = 2,
maxLead = 1.45,
canTurn = not locked,
target = cm.MovingDirection * cm.BaseMoveSpeed,
topSpeed = cm.BaseMoveSpeed,
accelTime = gc.AccelerationTime,
decelTime = gc.DecelerationTime,
turn = (not locked) and M.Rules.Turn or nil,
ballAt = function(t)
local p, v = M.BallView.freeSample(t)
return p, v
end,
pitchY = groundY - M.Radius,
aimDir = aim.dir,
aimPoint = aim.point,
family = M.Families.Bicycle,
zone = function(a)
return M.Bicycle.inZone(a, { mouth })
end,
}
return M.Bicycle.find(data) ~= nil
end)
return ok and result == true
end
function MystrixHub.Functions.StartAutoTricks()
pcall(MystrixHub.Functions.InstallTrickFilter)
return MystrixHub.Functions.AutoEngineStart()
end
function MystrixHub.Functions.StopAutoTricks()
MystrixHub.TrickLock = nil
if not getgenv().MystrixAutoShoot.Enabled then
MystrixHub.Functions.AutoEngineStop()
end
end
getgenv().MystrixSilentAim.Targets = {}
getgenv().MystrixSilentAim.TargetKey = "Auto"
getgenv().MystrixSilentAim.Range = 300
MystrixHub.ShotIgnore = { SideFoot = true, PushPass = true, VolleyPass = true, VolleyPush = true }
MystrixHub.ShotLobs = { Lofted = true, Chip = true }
MystrixHub.ShotSeeds = {}
MystrixHub.ShotCache = {}
MystrixHub.ShotCursor = {}
MystrixHub.ShotFamily = nil
MystrixHub.ShotFamilyAt = 0
MystrixHub.PreviewCache = nil
MystrixHub.ShotHint = nil
MystrixHub.DebugOn = false
function MystrixHub.Functions.SetSilentTargets(value)
local SA = getgenv().MystrixSilentAim
local list = {}
local auto = false
if type(value) == "table" then
for k, v in pairs(value) do
local name = type(v) == "string" and v or (type(k) == "string" and v == true and k) or nil
if name then
if name == "Auto" then auto = true end
list[#list + 1] = name
end
end
elseif type(value) == "string" then
if value == "Auto" then auto = true end
list[1] = value
end
if auto or #list == 0 then
SA.Targets = {}
SA.TargetKey = "Auto"
else
table.sort(list)
SA.Targets = list
SA.TargetKey = table.concat(list, ",")
end
table.clear(MystrixHub.ShotCache)
end
function MystrixHub.Functions.Debug(message)
if not MystrixHub.DebugOn then return end
local now = os.clock()
if now - (MystrixHub.DebugAt or 0) < 1.2 then return end
MystrixHub.DebugAt = now
warn("[Mystrix Hub] " .. tostring(message))
end
function MystrixHub.Functions.ShotEnv()
local F = MystrixHub.Functions
local SA = getgenv().MystrixSilentAim
if not F.SilentAimModules() then return nil end
local ball = SA.BallView.getBall()
if not ball then return nil end
local goal = F.SilentAimGoal()
if not goal then return nil end
if not SA.Radius then
local ok, r = pcall(function()
return require(Services.ReplicatedStorage:WaitForChild("Shared"):WaitForChild("Game"):WaitForChild("Dribble")).Rules.BALL_RADIUS
end)
SA.Radius = (ok and type(r) == "number") and math.clamp(r, 0.5, 2) or 1.1
end
local env = MystrixHub.ShotEnvCache
local now = os.clock()
if not env or env.Ball ~= ball or now - env.At > 0.5 then
env = { Ball = ball, Params = SA.Flight.params(ball), At = now }
MystrixHub.ShotEnvCache = env
end
env.Goal = goal
env.Radius = SA.Radius
return env
end
function MystrixHub.Functions.ShotBodies(goal, lob)
local bx, bz, n = {}, {}, 0
if lob then return bx, bz, 0 end
for _, entry in ipairs(MystrixHub.Functions.MannequinSnapshot()) do
if entry.model ~= goal.char and not entry.keeper then
n += 1
bx[n] = entry.pos.X
bz[n] = entry.pos.Z
end
end
return bx, bz, n
end
function MystrixHub.Functions.ShotSolve(env, gy, from, point, speed, curve, minA, maxA, key, bx, bz, bn, lob, stepDt, iters, deadline)
local F = MystrixHub.Functions
local fx, fz = point.X - from.X, point.Z - from.Z
local d = math.sqrt(fx * fx + fz * fz)
if d < 2 then return nil end
local dx, dz = fx / d, fz / d
local side = Vector3.new(-dz, 0, dx)
local spin = Vector3.new(0, curve, 0)
local limitT = math.clamp(d / math.max(speed * 0.45, 6) + 0.8, 1, lob and 8 or 4.5)
local dt = stepDt or (lob and 1 / 45 or 1 / 60)
local gravity = env.Params.gravity
local pY = point.Y
local pL = point.X * side.X + point.Z * side.Z
local seeds = MystrixHub.ShotSeeds
local seed = seeds[key]
if seed and ((seed[3] - from).Magnitude > 8 or math.abs(seed[4] - speed) > 2 or math.abs(seed[5] - curve) > 2) then
seed = nil
end
if not seed then
local hint = MystrixHub.ShotHint
if hint
and hint[12] == lob
and (hint[3] - from).Magnitude < 8
and math.abs(hint[4] - speed) < 2
and math.abs(hint[5] - curve) < 2
and hint[10] * dx + hint[11] * dz > 0.7 then
seed = hint
end
end
local th, ps, a11, a12, a21, a22
if seed then
th, ps, a11, a12, a21, a22 = seed[1], seed[2], seed[6], seed[7], seed[8], seed[9]
else
local q = d / speed * 1.12
th = math.atan2(pY - from.Y + gravity * 0.5 * q * q, math.max(d, 1))
ps = 0
if curve ~= 0 then
local mag = math.min(0.5164 * math.abs(curve) / speed, 0.3) * 0.0541 * 0.213 * speed * speed * (env.Params.curve or 1)
local tf = d / (speed * 0.8)
ps = -(curve > 0 and 1 or -1) * math.clamp(0.5 * mag * tf * tf / d, 0, 0.45)
end
a11, a12, a21, a22 = d * 1.05, 0, 0, -d
end
local maxIter = iters or 8
local bestMiss = math.huge
local bestVel, bestT, bestB, bestC, bestTh, bestPs
local pu1, pu2, pg1, pg2
local nils = 0
for i = 1, maxIter do
if deadline and i > 1 and os.clock() > deadline then break end
th = math.clamp(th, minA, maxA)
local cs, sn = math.cos(ps), math.sin(ps)
local fdx, fdz = dx * cs + dz * sn, -dx * sn + dz * cs
local ct = math.cos(th)
local vel = Vector3.new(fdx * ct * speed, math.sin(th) * speed, fdz * ct * speed)
local c, ft, blocked = F.ShotFly(env, gy, from, vel, spin, limitT, bx, bz, bn, dt)
if not c then
nils += 1
pu1 = nil
th += (nils % 2 == 1) and 0.12 or -0.26
else
local g1 = c.Y
local g2 = c.X * side.X + c.Z * side.Z
local r1, r2 = g1 - pY, g2 - pL
local miss = math.sqrt(r1 * r1 + r2 * r2)
if miss < bestMiss then
bestMiss, bestVel, bestT, bestB, bestC, bestTh, bestPs = miss, vel, ft, blocked, c, th, ps
end
if miss < 0.08 then break end
if pu1 then
local du1, du2 = th - pu1, ps - pu2
local dd = du1 * du1 + du2 * du2
if dd > 1e-8 then
local e1 = (g1 - pg1) - (a11 * du1 + a12 * du2)
local e2 = (g2 - pg2) - (a21 * du1 + a22 * du2)
a11 += e1 * du1 / dd
a12 += e1 * du2 / dd
a21 += e2 * du1 / dd
a22 += e2 * du2 / dd
end
end
pu1, pu2, pg1, pg2 = th, ps, g1, g2
local det = a11 * a22 - a12 * a21
if det > -d * d * 0.05 then
a11, a12, a21, a22 = d * 1.05, 0, 0, -d
det = a11 * a22
end
local s1 = -(a22 * r1 - a12 * r2) / det
local s2 = -(-a21 * r1 + a11 * r2) / det
local m = math.max(math.abs(s1), math.abs(s2))
if m > 0.25 then
s1, s2 = s1 * 0.25 / m, s2 * 0.25 / m
end
th += s1
ps = math.clamp(ps + s2, -0.7, 0.7)
end
end
if not bestVel then return nil end
seeds[key] = { bestTh, bestPs, from, speed, curve, a11, a12, a21, a22 }
MystrixHub.ShotHint = { bestTh, bestPs, from, speed, curve, a11, a12, a21, a22, dx, dz, lob }
return bestVel, spin, bestMiss, bestT, bestB, bestC
end
function MystrixHub.Functions.DribbleThreats(char, rp, f, myVel, range)
local team = char:GetAttribute("Team")
local serverNow = workspace:GetServerTimeNow()
local list = {}
for _, model in ipairs(Services.CollectionService:GetTagged("MannequinCharacter")) do
if model ~= char and model:IsA("Model") and model:GetAttribute("Team") ~= team and model:GetAttribute("AIGoalie") == nil then
local state = model:GetAttribute("BodyState")
local r = model:FindFirstChild("Root")
if r and r:IsA("BasePart") and (state == nil or state == "Animated") then
local rel = r.Position - rp
local flat = Vector3.new(rel.X, 0, rel.Z)
local d = flat.Magnitude
if d > 1 and d <= range then
local dir = flat / d
local ahead = f:Dot(dir)
if ahead > -0.15 or d <= 6.5 then
local ov = r.AssemblyLinearVelocity
local vel = Vector3.new(ov.X, 0, ov.Z)
local closing = (myVel - vel):Dot(dir)
local ttc = closing > 1 and math.max(d - 2.8, 0) / closing or math.huge
local ready = true
local plr = Players:GetPlayerFromCharacter(model)
if plr then
local ra = plr:GetAttribute("PokeReadyAt")
if type(ra) == "number" and ra > serverNow + 0.2 then ready = false end
end
list[#list + 1] = {
model = model,
d = d,
dir = dir,
ahead = ahead,
side = f.X * dir.Z - f.Z * dir.X,
closing = closing,
ttc = ttc,
ready = ready,
eff = d - math.max(closing, 0) * 0.25,
}
end
end
end
end
end
table.sort(list, function(a, b) return a.eff < b.eff end)
return list
end
function MystrixHub.Functions.TrickStarted()
local F = MystrixHub.Functions
local mod = F.MannequinClientModule()
local char = LocalPlayer.Character
if not (mod and char) then return false end
local ok, anim = pcall(mod.getAnimator, char)
if not (ok and anim) then return false end
for _, key in ipairs({ "kickS", "headS", "bikeS", "diveS" }) do
local s = anim[key]
if s and not s.done then return true end
end
return false
end
function MystrixHub.Functions.DribblePick(speed, p, threats, crowd, last, rare)
rare = rare or 1
local sideSum = 0
for _, t in ipairs(threats) do
if t.d <= 14 and t.ahead > -0.3 then
sideSum += (t.side >= 0 and 1 or -1) / math.max(t.d, 1)
end
end
if sideSum == 0 then sideSum = p.side end
local away = sideSum > 0 and "Left" or "Right"
local d, ahead = p.d, p.ahead
local list = {}
local function add(kind, dir, half, weight)
local key = kind .. dir .. (half or "")
if key == last then weight *= 0.18 end
if weight > 0 then
list[#list + 1] = { kind = kind, dir = dir, half = half, weight = weight }
end
end
if ahead < -0.15 then
add("Hold", away, nil, 6)
add("Roll", away, "Bottom", 5)
add("Flick", away, nil, 3)
elseif speed < 8 then
add("Flick", away, nil, 5)
add("Elastico", away, nil, 3)
if ahead > 0.45 then add("Hold", away, nil, 4) end
if d < 5 then add("Flick", "Down", nil, 2) end
else
if d <= 4.2 then
add("Roll", away, "Bottom", 6)
add("Elastico", away, nil, 5)
add("Flick", away, nil, 4)
if speed < 22 then add("Flick", "Down", nil, 3) end
else
add("Elastico", away, nil, ahead > 0.5 and 6 or 4)
add("Roll", away, "Bottom", 5)
add("Roll", away, "Top", 4)
add("Flick", away, nil, ahead < 0.5 and 6 or 3)
end
local wide = rare > 1
if d < (wide and 9 or 7.5) and d > (wide and 3 or 3.2) and ahead > (wide and 0.5 or 0.62) and speed >= (wide and 12 or 14) and speed <= (wide and 38 or 36) then
add("Rainbow", "Up", nil, (crowd >= 2 and 9 or 7) * rare)
end
if crowd >= 2 and d < 8 then
add("Hold", away, nil, 3)
end
if math.abs(p.side) > 0.7 then
add("Roll", away, "Top", 4)
end
end
local sum = 0
for _, e in ipairs(list) do sum += e.weight end
if sum <= 0 then return nil end
local roll = math.random() * sum
for _, e in ipairs(list) do
roll -= e.weight
if roll <= 0 then return { kind = e.kind, dir = e.dir, half = e.half } end
end
local e = list[#list]
return { kind = e.kind, dir = e.dir, half = e.half }
end
function MystrixHub.Functions.ShotGate(from)
local F = MystrixHub.Functions
if F.CallPassFor(from.X, from.Z) then return nil end
local goal = F.SilentAimGoal()
if not goal then return nil end
if (from.X - goal.x) * goal.out >= 0 then return nil end
local dx, dz = goal.x - from.X, goal.z - from.Z
local dist = math.sqrt(dx * dx + dz * dz)
if dist < 1.5 then return nil end
local range = SilentAimState.Range or 300
if range < 300 and dist > range then return nil end
return goal
end
getgenv().MystrixCallPass = getgenv().MystrixCallPass or { Enabled = false, Offside = true, GoalRange = 25 }
function MystrixHub.Functions.CallPassTarget()
local F = MystrixHub.Functions
local cfg = getgenv().MystrixCallPass
local now = os.clock()
local char = LocalPlayer.Character
local cache = MystrixHub.CallPassCache
if cache and cache.Char == char and now - cache.At < 0.08 then
return cache.Root
end
local root = char and char:FindFirstChild("Root")
local team = char and char:GetAttribute("Team")
local best
if root and type(team) == "string" then
local goal = F.SilentAimGoal()
local ball = F.GetBall()
local line
if cfg.Offside and goal then
local ballPos = ball and ball.Position or root.Position
local top1, top2 = -math.huge, -math.huge
for _, e in ipairs(F.MannequinSnapshot()) do
if e.model ~= char and type(e.team) == "string" and e.team ~= team then
local p = e.pos.X * goal.out
if p > top1 then
top2 = top1
top1 = p
elseif p > top2 then
top2 = p
end
end
end
line = math.max(top2, ballPos.X * goal.out) + 0.5
end
local look = root.CFrame.LookVector
local face = Vector3.new(look.X, 0, look.Z)
face = face.Magnitude > 0.01 and face.Unit or Vector3.new(0, 0, -1)
local bestScore = math.huge
for _, model in ipairs(Services.CollectionService:GetTagged("MannequinCharacter")) do
if model ~= char and model:IsA("Model") and model:GetAttribute("Team") == team then
local call = model:GetAttribute("Call")
local r = model:FindFirstChild("Root")
local state = model:GetAttribute("BodyState")
if type(call) == "number" and call ~= 0 and r and r:IsA("BasePart") and (state == nil or state == "Animated") then
local offside = line and goal and r.Position.X * goal.out > line
if not offside then
local diff = r.Position - root.Position
local flat = Vector3.new(diff.X, 0, diff.Z)
local d = flat.Magnitude
if d >= 3 then
local angle = math.acos(math.clamp(face:Dot(flat.Unit), -1, 1))
local score = angle * 12 + d * 0.08
if score < bestScore then
bestScore = score
best = r
end
end
end
end
end
end
end
MystrixHub.CallPassCache = { At = now, Char = char, Root = best }
return best
end
function MystrixHub.Functions.CallPassFor(x, z)
local F = MystrixHub.Functions
local cfg = getgenv().MystrixCallPass
if not cfg.Enabled then return nil end
local r = F.CallPassTarget()
if not (r and r.Parent) then return nil end
local goal = F.SilentAimGoal()
if goal then
local gx, gz = goal.x - x, goal.z - z
if gx * gx + gz * gz <= cfg.GoalRange * cfg.GoalRange then return nil end
end
return r
end
function MystrixHub.Functions.CallPassDir(x, z)
local r = MystrixHub.Functions.CallPassFor(x, z)
if not r then return nil end
local v = r.AssemblyLinearVelocity
local dx = r.Position.X + v.X * 0.5 - x
local dz = r.Position.Z + v.Z * 0.5 - z
local m = math.sqrt(dx * dx + dz * dz)
if m < 1.5 then return nil end
return Vector3.new(dx / m, 0, dz / m)
end
function MystrixHub.Functions.KickAimDir(x, z, intent)
local F = MystrixHub.Functions
local dir = F.CallPassDir(x, z)
if dir then return dir end
local state = getgenv().MystrixSilentAim
if state.Enabled and state.OnlyGoalShots ~= true and (intent == "Shoot" or intent == "Lob") then
return F.KickGoalDir(x, z)
end
return nil
end
function MystrixHub.Functions.ApplyTackleHitbox()
local HB = getgenv().MystrixHitbox
local pickup = HB.Pickup
if not pickup then return end
local add = HB.Enabled and HB.Size * 0.4 or 0
pickup.Table.FootReach = pickup.FootReach + add
pickup.Table.BodyReach = pickup.BodyReach + add
end
function MystrixHub.Functions.InstallTackleHitbox()
local HB = getgenv().MystrixHitbox
if HB.Hooked then return true end
local ok, Dribble = pcall(function()
return require(Services.ReplicatedStorage:WaitForChild("Shared"):WaitForChild("Game"):WaitForChild("Dribble"))
end)
if not ok or type(Dribble) ~= "table" or type(Dribble.Contacts) ~= "table" then return false end
local Contacts = Dribble.Contacts
local pickupTable = Dribble.Rules and Dribble.Rules.Pickup
if type(pickupTable) == "table" and (not HB.Pickup or HB.Pickup.Table ~= pickupTable) then
HB.Pickup = { Table = pickupTable, FootReach = pickupTable.FootReach, BodyReach = pickupTable.BodyReach }
end
local orig = Contacts.hitPad
local function wrapper(part)
local base = orig and orig(part) or 0
local cfg = getgenv().MystrixHitbox
local H = getgenv().MystrixHub
if not (cfg.Enabled and H) then return base end
local char = LocalPlayer.Character
if not char or part.Parent ~= char or not H.HitboxParts[part.Name] then return base end
local ball = H.Functions.GetBall()
local possessor = ball and ball:GetAttribute("Possessor")
if type(possessor) ~= "number" or possessor == 0 or possessor == char:GetAttribute("DribbleId") then return base end
return math.max(base, cfg.Size)
end
Contacts.hitPad = wrapper
HB.Hooked = true
MystrixHub.ConnectionController.Insert({ Disconnect = function()
if Contacts.hitPad == wrapper then
Contacts.hitPad = orig
end
local p = getgenv().MystrixHitbox.Pickup
if p then
p.Table.FootReach = p.FootReach
p.Table.BodyReach = p.BodyReach
end
end })
return true
end
function MystrixHub.Functions.ShotPoint(goal, mode, radius)
local spot = MystrixHub.ShotSpots[mode]
if not spot then return nil end
radius = radius or 0.84
local zl = goal.half - radius - 1.5
local y0 = goal.ground + radius + 0.15
local y1 = goal.top - radius - 1.3
return Vector3.new(goal.x, y0 + (y1 - y0) * spot[2], goal.z + goal.out * zl * spot[1])
end
function MystrixHub.Functions.ShotAutoList(goal, lob, radius)
radius = radius or 0.84
local cache = goal.Lists
if not cache then
cache = {}
goal.Lists = cache
end
local slot = lob and 1 or 2
local hit = cache[slot]
if hit and hit.radius == radius then return hit.list end
local zl = goal.half - radius - 1.5
local y0 = goal.ground + radius + 0.15
local y1 = goal.top - radius - 1.3
local zs = { -0.97, -0.88, -0.76, -0.62, -0.46, -0.3, -0.12, 0.12, 0.3, 0.46, 0.62, 0.76, 0.88, 0.97 }
local ys = lob and { 0.55, 0.7, 0.84, 0.95 } or { 0.04, 0.16, 0.3, 0.48, 0.66, 0.82, 0.95 }
local list = {}
for _, zf in ipairs(zs) do
for _, yf in ipairs(ys) do
list[#list + 1] = Vector3.new(goal.x, y0 + (y1 - y0) * yf, goal.z + zl * zf)
end
end
cache[slot] = { radius = radius, list = list }
return list
end
function MystrixHub.Functions.ShotFly(env, gy, from, vel, spin, limitT, bx, bz, bn, stepDt, kp)
local Flight = SilentAimState.Flight
local params = env.Params
local goal = env.Goal
local gx, gz, out = goal.x, goal.z, goal.out
local radius = env.Radius
local q = (goal.top - goal.ground) / 8.714285714285714
local pr = 0.2143 * q
local postZ = goal.half + pr
local barY = goal.top + pr
local reachR = radius + pr + 0.05
local airStep, rollStep = Flight.airStep, Flight.rollStep
local bounce, toGround, bounceMin = Flight.bounce, Flight.toGround, Flight.BOUNCE_MIN
local pos, v, s = from, vel, spin
local rolling = false
if pos.Y <= gy + 0.05 and v.Y <= bounceMin then
rolling = true
pos = Vector3.new(pos.X, gy, pos.Z)
v, s = toGround(v, s)
end
local dt = stepDt or 1 / 60
local t = 0
local blocked = false
local framed = false
local fx, fz = from.X, from.Z
local step = 0
while t < limitT do
local np, nv, ns
if rolling then
np, nv, ns = rollStep(pos, v, s, dt, params)
if nv.X * nv.X + nv.Z * nv.Z < 0.04 then
return nil, t, blocked, framed
end
else
np, nv, ns = airStep(pos, v, s, dt, params)
if np.Y < gy and nv.Y < 0 then
local k = math.clamp((pos.Y - gy) / math.max(pos.Y - np.Y, 1e-6), 0, 1)
local hp, hv, hs = airStep(pos, v, s, dt * k, params)
hp = Vector3.new(hp.X, gy, hp.Z)
local bv, bs = bounce(hv, hs, params)
if bv.Y < bounceMin then
bv, bs = toGround(bv, bs)
rolling = true
np, nv, ns = rollStep(hp, bv, bs, dt * (1 - k), params)
else
np, nv, ns = airStep(hp, bv, bs, dt * (1 - k), params)
end
end
end
if kp and not kp.t then
local d1 = (pos.X - kp.x) * kp.fx + (pos.Z - kp.z) * kp.fz - kp.ahead
local d2 = (np.X - kp.x) * kp.fx + (np.Z - kp.z) * kp.fz - kp.ahead
if d1 > 0 and d2 <= 0 then
local a = d1 / (d1 - d2)
kp.t = t + dt * a
kp.pos = pos:Lerp(np, a)
end
end
if (np.X - gx) * out >= 0 then
local dxs = np.X - pos.X
local a = dxs ~= 0 and math.clamp((gx - pos.X) / dxs, 0, 1) or 1
local cp = pos:Lerp(np, a)
local hx, hy, hz = np.X - pos.X, np.Y - pos.Y, np.Z - pos.Z
local hm = math.sqrt(hx * hx + hz * hz)
local ez = cp.Z - gz
if hm > 1e-6 and cp.Y <= barY + radius + 0.5 then
local uz = hz / hm
local ax = math.abs(hx / hm)
local d1 = postZ - ez
local d2 = -postZ - ez
local e1 = (d1 * uz < 0) and math.abs(d1) * ax or math.abs(d1)
local e2 = (d2 * uz < 0) and math.abs(d2) * ax or math.abs(d2)
if e1 < reachR or e2 < reachR then framed = true end
end
local hn = math.sqrt(hx * hx + hy * hy)
if hn > 1e-6 and math.abs(ez) <= postZ then
local dy = barY - cp.Y
local uyn = hy / hn
local uxn = math.abs(hx) / hn
local eb = (dy * uyn < 0) and math.abs(dy) * uxn or math.abs(dy)
if eb < reachR then framed = true end
end
return cp, t + dt * a, blocked, framed
end
if bn > 0 and not blocked and np.Y - gy < 7 then
step += 1
if step % 2 == 0 then
local ox, oz = np.X - fx, np.Z - fz
if ox * ox + oz * oz > 16 then
for i = 1, bn do
local ex, ez = bx[i] - np.X, bz[i] - np.Z
if ex * ex + ez * ez < 5.8 then
blocked = true
break
end
end
end
end
end
pos, v, s = np, nv, ns
t += dt
end
return nil, t, blocked, framed
end
function MystrixHub.Functions.ShotBest(from, family, lob, budget, minAngle, mode)
local F = MystrixHub.Functions
local SA = SilentAimState
local env = F.ShotEnv()
if not env then return nil end
mode = mode or "warm"
local goal = env.Goal
local params = env.Params
local radius = env.Radius
local gy = SA.BallView.groundBallY(from)
local pitchY = gy - radius
local fam = SA.Families[family]
local cap = 125
if fam and fam.speed then
local top = math.max(fam.speed[2], fam.shotSpeed and fam.shotSpeed[2] or 0)
cap = top * (fam.header and 1 or 1.05) * 0.97
end
local dxg, dzg = goal.x - from.X, goal.z - from.Z
local flatD = math.sqrt(dxg * dxg + dzg * dzg)
local speed = cap
if lob then
local factor = 1.2 + 0.35 * math.clamp(flatD / 90, 0, 1)
speed = math.clamp(math.sqrt(params.gravity * math.max(flatD, 12)) * factor, 22, cap)
end
local minA = minAngle or (lob and 0.35 or -0.9)
local maxA = lob and 1.3 or 0.8
local kit = F.KeeperKit()
local keeperNow = F.SilentAimKeeper(goal)
local kpos = keeperNow and F.KeeperAt(goal, from, keeperNow, kit) or nil
local kx = kpos and kpos.X or goal.x - goal.out * 6
local kz = kpos and kpos.Z or goal.z
local oX = -goal.out
local bx, bz, bn = F.ShotBodies(goal, lob)
local slow = F.DeviceScale() > 3
local curveOn = SA.AutoCurve == true and not lob and flatD >= 8 and not (fam and fam.header) and (mode == "strike" or not slow)
local k = math.min(math.clamp(30 + flatD * 0.5, 40, 70) * (SA.CurveAmount or 1), 72)
local zLim, yMin, yMax = F.ShotBounds(env)
local react = kit and math.max(kit.cfg.Reaction[1] - 0.03, 0.1) or 0.2
local now = os.clock()
local deadline = budget and (now + budget) or nil
local points, targeted = F.ShotTargets(goal, lob, radius)
local cache = MystrixHub.ShotCache
local light = mode ~= "strike"
local simDt = lob and 1 / 45 or 1 / 60
if light then
simDt = lob and 1 / 30 or 1 / 40
end
local candIters = light and 6 or 10
local tol = 0.45
local best, fallback, loose
local function faceFor(vel)
local m = math.sqrt(vel.X * vel.X + vel.Z * vel.Z)
local fx, fz = oX, 0
if m > 5 and (vel.X / m) * oX < -0.2 then
fx, fz = -vel.X / m, -vel.Z / m
end
local d = fx * oX
if d < 0.3 then
fx = fx + oX * (0.3 - d)
local l = math.sqrt(fx * fx + fz * fz)
fx, fz = fx / l, fz / l
end
return fx, fz
end
local function evaluate(p, curve, dl)
local vel, spin, miss, ft, blocked, c, extra
local key
if curve == 0 then
vel, spin, miss, ft, blocked, c, extra = F.PitchSolve(env, gy, from, p, speed, minA, maxA, lob, simDt, bx, bz, bn, dl)
else
local sign = curve > 0 and 1 or -1
key = ((((math.floor(p.Z * 2) + 2000) * 4096 + (math.floor(p.Y * 2) + 2000)) * 8 + (sign + 1) * 2 + (lob and 1 or 0)) * 2 + (goal.out > 0 and 1 or 0))
local cdl = dl
if dl and mode == "strike" then
cdl = math.max(dl, os.clock() + math.max(budget or 0.012, 0.012) * 0.5)
end
vel, spin, miss, ft, blocked, c = F.ShotSolve(env, gy, from, p, speed, curve, minA, maxA, key, bx, bz, bn, lob, simDt, candIters, cdl)
end
if not vel then return nil end
local dz = math.abs(c.Z - goal.z)
if dz > goal.half - 0.8 or c.Y < yMin or c.Y > goal.top - 0.4 then return nil end
local fx, fz = faceFor(vel)
local kp = { x = kx, z = kz, fx = fx, fz = fz, ahead = 0.8 }
local _, _, _, framed = F.ShotFly(env, gy, from, vel, spin, ft + 0.5, bx, bz, 0, simDt, kp)
local mp, mt = kp.pos or c, kp.t or ft
local lat = (mp.X - kx) * -fz + (mp.Z - kz) * fx
local gap, save = F.KeeperSave(lat, mp.Y - pitchY, mt - react, flatD)
local pg
if gap >= 1.2 then
pg = 1
elseif gap <= 0 then
pg = 1 - save
else
pg = (1 - save) + save * gap / 1.2
end
local edge = math.min(zLim - dz, yMax - c.Y)
local penalty = 1
if blocked then penalty *= 0.1 end
if framed then penalty *= 0.05 end
local score = pg * penalty * 100 + math.min(gap, 3) * 1.5 + math.min(edge, 1.5) * 2 - ft - miss * 8
return {
vel = vel,
spin = spin,
point = p,
curve = curve,
miss = miss,
time = ft,
blocked = blocked,
framed = framed,
cross = c,
key = key,
th = extra,
gap = gap,
pg = pg,
edge = edge,
score = score,
strict = edge >= 0 and miss <= tol and not framed,
}
end
local function take(e)
if not e then return end
if e.strict and not e.blocked then
if not best or e.score > best.score then best = e end
elseif e.strict or e.framed then
e.fallback = true
if not fallback or e.score > fallback.score then fallback = e end
elseif targeted or e.miss <= 2.5 then
e.fallback = true
e.score = -e.miss
if not loose or e.score > loose.score then loose = e end
end
end
local function inward(p)
return Vector3.new(p.X, goal.ground + (p.Y - goal.ground) * 0.82, goal.z + (p.Z - goal.z) * 0.6)
end
local function coarse(p)
local dx = p.X - from.X
local f = math.abs(dx) > 1 and math.clamp((kx - goal.out * 0.8 - from.X) / dx, 0, 1) or 1
local mz = from.Z + (p.Z - from.Z) * f
local my = from.Y + (p.Y - from.Y) * f
local ddz = p.Z - from.Z
local d = math.sqrt(dx * dx + ddz * ddz)
local tf = d / (speed * (lob and 0.6 or 0.85)) * f
local avail = math.max(tf - react, 0)
local reach
if kit then
local q = kit.shSpeed / kit.shAccel
local moved = avail <= q and 0.5 * kit.shAccel * avail * avail or 0.5 * kit.shAccel * q * q + kit.shSpeed * (avail - q)
local idx = math.clamp(math.floor(avail / kit.step) + 2, 1, #kit.reachX)
reach = moved + kit.reachX[idx] + kit.hand
else
reach = 4.8 + 15 * avail
end
return math.abs(mz - kz) - reach + math.max(math.abs(my - pitchY - 3.2) - 1.8, 0) * 0.6
end
local key = string.format("%s|%s|%d|%s|%s|%d", tostring(family), tostring(lob), math.floor(goal.x), tostring(curveOn), SA.TargetKey or "Auto", math.floor(minA * 100))
local plan = cache[key]
if plan and (now - plan.at > 2 or (plan.from - from).Magnitude > 30) then
plan = nil
cache[key] = nil
end
local settled = false
if plan then
local entry = evaluate(plan.point, plan.curve, nil)
if entry and entry.strict and not entry.blocked then
entry.score += 1
take(entry)
settled = entry.pg >= 0.95 and entry.edge >= 0.4
else
cache[key] = nil
end
end
if not settled then
local ranked = {}
for i, p in ipairs(points) do
ranked[i] = { point = p, score = coarse(p), i = i }
end
table.sort(ranked, function(a, b)
if a.score ~= b.score then return a.score > b.score end
return a.i < b.i
end)
local M = math.min(#ranked, targeted and #ranked or 14)
if M > 0 then
local cursors = MystrixHub.ShotCursor
local count = mode == "strike" and M or (mode == "preview" and 1 or math.min(M, 3))
local first = mode == "strike" and 1 or (cursors[key] or 1)
local tried = 0
for j = 0, count - 1 do
local item = ranked[(first - 1 + j) % M + 1]
local dl = (mode ~= "strike" or best or fallback or loose) and deadline or nil
local e = evaluate(item.point, 0, dl)
take(e)
if e and e.framed then
take(evaluate(inward(item.point), 0, dl))
end
if curveOn then
local weak = (not e) or (not e.strict) or e.gap < 1.5 or e.blocked
if j < 3 or (weak and j < 8) then
take(evaluate(item.point, k, dl))
take(evaluate(item.point, -k, dl))
if weak then
take(evaluate(item.point, k * 0.5, dl))
take(evaluate(item.point, -k * 0.5, dl))
end
end
end
tried += 1
if not targeted and best and best.pg >= 0.97 and best.edge >= 0.8 then break end
if deadline and os.clock() > deadline and (best or fallback or loose or mode ~= "strike") then break end
end
if mode ~= "strike" then
cursors[key] = (first - 1 + tried) % M + 1
end
end
end
local result = best or fallback or loose
if not result then
cache[key] = nil
return nil
end
if result.strict and not result.blocked then
cache[key] = { point = result.point, curve = result.curve, from = from, at = now }
end
if mode == "strike" then
local vel, spin, miss, ft, blocked, c
if result.curve == 0 then
vel, spin, miss, ft, blocked, c = F.PitchSolve(env, gy, from, result.point, speed, minA, maxA, lob, (slow and 1 / 60 or 1 / 120), bx, bz, bn, nil, result.th)
elseif result.key then
vel, spin, miss, ft, blocked, c = F.ShotSolve(env, gy, from, result.point, speed, result.curve, minA, maxA, result.key, bx, bz, bn, lob, slow and 1 / 60 or (lob and 1 / 90 or 1 / 120), 8, nil)
end
if vel and c then
local dz = math.abs(c.Z - goal.z)
if dz <= goal.half - 0.8 and c.Y >= yMin and c.Y <= goal.top - 0.4 and miss <= math.max(result.miss + 0.3, 0.6) then
result.vel = vel
result.spin = spin
result.miss = miss
result.time = ft
result.blocked = blocked
result.cross = c
end
end
end
result.from = from
result.lob = lob
result.goalX = goal.x
result.at = now
result.born = now
MystrixHub.ShotLast = result
return result
end
function MystrixHub.Functions.ShotFallback(from, family, lob)
local F = MystrixHub.Functions
local SA = SilentAimState
local goal = F.SilentAimGoal()
if not goal then return nil end
local env = F.ShotEnv()
local fam = SA.Families and SA.Families[family]
local cap = 125
if fam and fam.speed then
local top = math.max(fam.speed[2], fam.shotSpeed and fam.shotSpeed[2] or 0)
cap = top * (fam.header and 1 or 1.05) * 0.97
end
local dx, dz = goal.x - from.X, goal.z - from.Z
local flatD = math.sqrt(dx * dx + dz * dz)
if flatD < 1 then return nil end
local gravity = env and env.Params.gravity or 46
local speed = cap
if lob then
local factor = 1.2 + 0.35 * math.clamp(flatD / 90, 0, 1)
speed = math.clamp(math.sqrt(gravity * math.max(flatD, 12)) * factor, 22, cap)
end
local minA = lob and 0.35 or -0.9
local maxA = lob and 1.3 or 0.8
local radius = env and env.Radius or 0.84
local points, targeted = F.ShotTargets(goal, lob, radius)
local keeper = F.SilentAimKeeper(goal)
local kz = keeper and keeper.Z or goal.z
local ordered = {}
for i, p in ipairs(points) do
ordered[i] = { p = p, d = targeted and 0 or math.abs(p.Z - kz), i = i }
end
table.sort(ordered, function(a, b)
if a.d ~= b.d then return a.d > b.d end
return a.i < b.i
end)
if env and SA.BallView then
local gy = SA.BallView.groundBallY(from)
local deadline = os.clock() + F.Budget(0.012)
local bestVel, bestSpin, bestMiss
bestMiss = math.huge
for _, item in ipairs(ordered) do
local vel, spin, miss = F.PitchSolve(env, gy, from, item.p, speed, minA, maxA, lob, 1 / 45, {}, {}, 0, nil)
if vel and miss < bestMiss then
bestVel, bestSpin, bestMiss = vel, spin, miss
end
if bestMiss < 0.5 or (bestVel and os.clock() > deadline) then break end
end
if bestVel then
return { vel = bestVel, spin = bestSpin }
end
end
local p = ordered[1].p
local px, pz = p.X - from.X, p.Z - from.Z
local pd = math.sqrt(px * px + pz * pz)
if pd < 1 then return nil end
local t = pd / (speed * 0.7)
local ang = math.clamp(math.atan2(p.Y - from.Y + gravity * 0.5 * t * t, math.max(pd, 1)), minA, maxA)
local vel = Vector3.new(px / pd * math.cos(ang) * speed, math.sin(ang) * speed, pz / pd * math.cos(ang) * speed)
return { vel = vel, spin = Vector3.new(0, 0, 0) }
end
function MystrixHub.Functions.IsOriginalGoalShot(from, vel, spin)
local F = MystrixHub.Functions
if typeof(from) ~= "Vector3" or typeof(vel) ~= "Vector3" then return false end
if typeof(spin) ~= "Vector3" then spin = Vector3.zero end
local goal = F.ShotGate(from)
if not goal then return false end
local tol = math.clamp(SilentAimState.GoalTolerance or 50, 0, 100) / 100
local gx, gz = goal.x - from.X, goal.z - from.Z
local gm = math.sqrt(gx * gx + gz * gz)
local vm = math.sqrt(vel.X * vel.X + vel.Z * vel.Z)
if gm < 0.001 or vm < 0.001 then return false end
local cosAngle = (vel.X * gx + vel.Z * gz) / (vm * gm)
if cosAngle < math.cos(math.rad(12 + tol * 78)) then return false end
local lateral
local topLimit = goal.top + 12 + tol * 20
local okEnv, env = pcall(F.ShotEnv)
if okEnv and env and env.Params and SilentAimState.BallView then
local okGy, gy = pcall(SilentAimState.BallView.groundBallY, from)
if not okGy or type(gy) ~= "number" then
gy = goal.ground + (env.Radius or 1)
end
local seconds = math.clamp(math.abs(goal.x - from.X) / math.max(math.abs(vel.X) * 0.55, 8) + 0.8, 0.8, 6)
local okFly, hit = pcall(F.ShotFly, env, gy, from, vel, spin, seconds, {}, {}, 0, 1 / 60)
if okFly and hit then
if hit.Y > topLimit then return false end
lateral = math.abs(hit.Z - goal.z)
end
end
if not lateral then
local t = (goal.x - from.X) / vel.X
if t <= 0 then
return tol >= 0.5
end
lateral = math.abs(from.Z + vel.Z * t - goal.z)
end
return lateral <= goal.half + 8 + tol * 40
end
function MystrixHub.Functions.SilentAimRedirect(from, vel, spin, family)
local F = MystrixHub.Functions
local SA = SilentAimState
local stats = SA.Stats
if not stats then
stats = { calls = 0, redirected = 0, last = "" }
SA.Stats = stats
end
stats.calls += 1
if type(family) ~= "string" or MystrixHub.ShotIgnore[family] then
stats.last = "ignored family " .. tostring(family)
return nil
end
if not F.ShotGate(from) then
stats.last = "gate"
return nil
end
if SA.OnlyGoalShots == true then
local ok, valid = pcall(F.IsOriginalGoalShot, from, vel, spin)
if not ok or valid ~= true then
stats.last = "not goal-bound"
stats.skipped = (stats.skipped or 0) + 1
SA.Pending = nil
return nil
end
end
local now = os.clock()
local last = SA.StrikeCache
if last and last.family == family and now - last.at < 0.35 and (last.from - from).Magnitude < 0.5 then
stats.redirected += 1
stats.last = "cached"
return last.vel, last.spin
end
local pend = SA.Pending
if pend and pend.family == family and now - pend.at < 1.2 and (pend.from - from).Magnitude < 0.8 then
SA.Pending = nil
SA.StrikeCache = { from = from, family = family, vel = pend.vel, spin = pend.spin, at = now }
stats.redirected += 1
stats.last = "plan"
return pend.vel, pend.spin
end
local nv, ns = F.SilentAimSolve(from, family)
if nv then
SA.StrikeCache = { from = from, family = family, vel = nv, spin = ns, at = now }
stats.redirected += 1
stats.last = "ok"
return nv, ns
end
stats.last = "no solution"
return nil
end
function MystrixHub.Functions.SilentAimSolve(from, family)
local F = MystrixHub.Functions
local SA = SilentAimState
local lob = MystrixHub.ShotLobs[family] == true
local ok, result = pcall(F.ShotBest, from, family, lob, F.Budget(0.012), nil, "strike")
if not ok then
SA.LastError = tostring(result)
result = nil
end
if not (result and result.vel) then
local ok2, fb = pcall(F.ShotFallback, from, family, lob)
if ok2 then
result = fb
else
SA.LastError = tostring(fb)
result = nil
end
end
if result and result.vel then
return result.vel, result.spin
end
return nil
end
function MystrixHub.Functions.SilentAimPlan(plan)
local F = MystrixHub.Functions
local SA = SilentAimState
local family = plan.family
if type(family) ~= "string" or MystrixHub.ShotIgnore[family] then return nil end
local from = plan.ball
if typeof(from) ~= "Vector3" or not F.ShotGate(from) then return nil end
if SA.OnlyGoalShots == true then
local checkVel = plan.vel
if typeof(checkVel) ~= "Vector3" then
if typeof(plan.dir) ~= "Vector3" then return nil end
checkVel = Vector3.new(plan.dir.X, plan.dir.Y, plan.dir.Z) * 60
end
local ok, valid = pcall(F.IsOriginalGoalShot, from, checkVel, plan.spin)
if not ok or valid ~= true then return nil end
end
local vel, spin = F.SilentAimSolve(from, family)
if not vel then return nil end
SA.Pending = { from = from, family = family, vel = vel, spin = spin, at = os.clock() }
return vel, spin
end
function MystrixHub.Functions.InstallPlanSync()
local SA = getgenv().MystrixSilentAim
if SA.PlanHooked then return true end
local getMethod, setMethod = getnamecallmethod, setnamecallmethod
if hookmetamethod and getMethod and setMethod then
local ok = pcall(function()
local old
old = hookmetamethod(game, "__namecall", newcclosure(function(self, ...)
local method = getMethod()
if method ~= "FireServer" then
setMethod(method)
return old(self, ...)
end
local H = getgenv().MystrixHub
local FF = H and H.Functions
local on = getgenv().MystrixSilentAim.Enabled
if not (FF and on) then
setMethod(method)
return old(self, ...)
end
local okc, copy = pcall(FF.PlanSyncCopy, (...))
setMethod(method)
if okc and copy then
return old(self, copy, select(2, ...))
end
return old(self, ...)
end))
if type(old) ~= "function" then error("no original") end
end)
if ok then
SA.PlanHooked = true
return true
end
end
if hookfunction then
local ok = pcall(function()
local fire = Instance.new("RemoteEvent").FireServer
local old
old = hookfunction(fire, newcclosure(function(self, ...)
local H = getgenv().MystrixHub
local FF = H and H.Functions
if FF and getgenv().MystrixSilentAim.Enabled then
local okc, copy = pcall(FF.PlanSyncCopy, (...))
if okc and copy then
return old(self, copy, select(2, ...))
end
end
return old(self, ...)
end))
if type(old) ~= "function" then error("no original") end
end)
if ok then
SA.PlanHooked = true
return true
end
end
return false
end
function MystrixHub.Functions.CurrentFamily()
local name = MystrixHub.ShotFamily
if name and os.clock() - (MystrixHub.ShotFamilyAt or 0) < 0.6 then
return name
end
return nil
end
function MystrixHub.Functions.PreviewAim(from, vel, spin)
local F = MystrixHub.Functions
local SA = getgenv().MystrixSilentAim
if not F.SilentAimModules() then return nil end
if SA.OnlyGoalShots == true and not F.IsOriginalGoalShot(from, vel, spin) then return nil end
local goal = F.ShotGate(from, vel)
if not goal then return nil end
local flat = Vector3.new(vel.X, 0, vel.Z)
local fm = flat.Magnitude
local family, lob, minAngle
lob = false
local auto = MystrixHub.Auto
if auto and auto.Phase == "air" then
local gy = SA.BallView.groundBallY(from)
family = auto.Mode == "away" and "Bicycle" or (from.Y - gy <= 2.4 and "Volley" or "RunningHeader")
minAngle = -0.95
elseif MystrixHub.TrickActive then
family = MystrixHub.TrickKey == "KickLob" and "Lofted" or "Laced"
lob = family == "Lofted"
else
family = F.CurrentFamily()
if family then
if MystrixHub.ShotIgnore[family] then return nil end
lob = MystrixHub.ShotLobs[family] == true
elseif fm > 1 and vel.Y / fm > 0.62 then
family, lob = "Lofted", true
else
family = "Laced"
end
end
local now = os.clock()
MystrixHub.PreviewWant = { family = family, lob = lob, minAngle = minAngle, at = now }
local cache = MystrixHub.PreviewCache
local c = cache and cache[family .. (minAngle and "|a" or "")]
if c and c.goalX == goal.x and now - c.at < 0.6 and (c.from - from).Magnitude < 8 then
return c.vel, c.spin
end
return nil
end
function MystrixHub.Functions.StartShotTick()
local F = MystrixHub.Functions
F.InstallPreviewSpoof()
if MystrixHub.ShotTickConn then return end
local acc = 0
local pause = 0.1
MystrixHub.ShotTickConn = RunService.Heartbeat:Connect(function(dt)
acc += dt
if acc < pause then return end
acc = 0
pause = 0.1
local SA = SilentAimState
if not SA.Enabled then return end
local char = LocalPlayer.Character
if not char then return end
local id = char:GetAttribute("DribbleId")
local ball = F.GetBall()
if not ball or type(id) ~= "number" or ball:GetAttribute("Possessor") ~= id then return end
if not F.SilentAimModules() then return end
local pos = SA.BallView.getPosition()
if not pos or not F.ShotGate(pos) then return end
local want = MystrixHub.PreviewWant
local family, lob, minAngle
if want and os.clock() - want.at < 0.5 then
family, lob, minAngle = want.family, want.lob, want.minAngle
else
family = F.CurrentFamily() or "Laced"
if MystrixHub.ShotIgnore[family] then family = "Laced" end
lob = MystrixHub.ShotLobs[family] == true
end
local t0 = os.clock()
local ok, result = pcall(F.ShotBest, pos, family, lob, F.Budget(0.004), minAngle, "preview")
local cache = MystrixHub.PreviewCache
if not cache then
cache = {}
MystrixHub.PreviewCache = cache
end
local pkey = family .. (minAngle and "|a" or "")
if ok and result then
cache[pkey] = {
at = os.clock(),
from = pos,
goalX = result.goalX,
vel = result.vel,
spin = result.spin,
}
else
cache[pkey] = nil
end
pause = math.clamp((os.clock() - t0) * 6, 0.1, 0.5)
end)
MystrixHub.ConnectionController.Insert(MystrixHub.ShotTickConn)
end
function MystrixHub.Functions.InstallPickTrack()
local SA = getgenv().MystrixSilentAim
if SA.PickHooked then return end
local ok, Select = pcall(function()
return require(Services.ReplicatedStorage:WaitForChild("Shared"):WaitForChild("Game"):WaitForChild("Kick")).Select
end)
if not ok or type(Select) ~= "table" or type(Select.pick) ~= "function" then return end
local installed = MystrixHub.Functions.HookFunction(Select, "pick", function(callOrig)
return function(self, forced)
local H = getgenv().MystrixHub
local input = self
if H and type(self) == "table" then
H.KickIntent = self.intent
H.KickIntentAt = os.clock()
pcall(function()
local char = LocalPlayer.Character
local root = char and char:FindFirstChild("Root")
if not root then return end
local p = root.Position
local dir = H.Functions.KickAimDir(p.X, p.Z, self.intent)
if dir then
local copy = table.clone(self)
copy.aimDir = dir
copy.travel = dir
copy.facing = dir
copy.sideStepping = false
input = copy
end
end)
end
local result, second = callOrig(input, forced)
if type(result) == "table" and type(result.family) == "table" and type(result.family.name) == "string" and H then
H.ShotFamily = result.family.name
H.ShotFamilyAt = os.clock()
end
return result, second
end
end)
if installed then
SA.PickHooked = true
end
end
function MystrixHub.Functions.InstallSilentAim()
local F = MystrixHub.Functions
local SA = getgenv().MystrixSilentAim
SA.Redirect = F.SilentAimRedirect
local ok, DribbleClient = pcall(function()
return require(LocalPlayer:WaitForChild("PlayerScripts"):WaitForChild("Client"):WaitForChild("Game"):WaitForChild("DribbleClient"))
end)
if not (ok and type(DribbleClient) == "table") then
return false
end
if SA.HookedModule ~= DribbleClient then
SA.Hooked = false
SA.HookedModule = nil
SA.PickHooked = nil
SA.PlanAimHooked = nil
SA.PreviewShowHooked = nil
SA.PreviewShowHooking = nil
SA.BallView = nil
SA.Flight = nil
SA.Families = nil
SA.KeeperRules = nil
SA.Radius = nil
MystrixHub.ShotEnvCache = nil
MystrixHub.GoalCache = nil
end
F.SilentAimModules()
F.InstallPickTrack()
pcall(F.InstallPlanAim)
if not SA.Hooked then
local installed = 0
for _, name in ipairs({ "strike", "strikeFree" }) do
if type(DribbleClient[name]) == "function" then
local hooked = F.HookFunction(DribbleClient, name, function(callOrig)
return function(from, vel, spin, family, t)
if SA.Enabled and SA.Redirect and type(family) == "string" and typeof(from) == "Vector3" and typeof(vel) == "Vector3" then
local rok, newVel, newSpin = pcall(SA.Redirect, from, vel, spin, family)
if rok then
if newVel then
SA.LastVel = newVel
SA.LastAt = os.clock()
vel = newVel
spin = newSpin or spin
local H = getgenv().MystrixHub
if H then H.ShotLast = nil end
end
else
SA.LastError = tostring(newVel)
end
end
return callOrig(from, vel, spin, family, t)
end
end)
if hooked then
installed += 1
end
end
end
SA.Hooked = installed > 0
SA.HookedModule = SA.Hooked and DribbleClient or nil
end
pcall(F.InstallPlanSync)
F.StartShotTick()
return SA.Hooked == true
end
function MystrixHub.Functions.KickGoalDir(x, z)
local F = MystrixHub.Functions
local goal = F.SilentAimGoal()
if not goal then return nil end
if (x - goal.x) * goal.out >= 0 then return nil end
local dx, dz = goal.x - x, goal.z - z
local m = math.sqrt(dx * dx + dz * dz)
if m < 1.5 then return nil end
local range = SilentAimState.Range or 300
if range < 300 and m > range then return nil end
return Vector3.new(dx / m, 0, dz / m)
end
function MystrixHub.Functions.InstallPlanAim()
local SA = getgenv().MystrixSilentAim
if SA.PlanAimHooked then return end
local ok, Plan = pcall(function()
return require(Services.ReplicatedStorage:WaitForChild("Shared"):WaitForChild("Game"):WaitForChild("Kick")).Plan
end)
if not ok or type(Plan) ~= "table" or type(Plan.find) ~= "function" then return end
local installed = MystrixHub.Functions.HookFunction(Plan, "find", function(callOrig)
return function(self, ...)
local H = getgenv().MystrixHub
if H and type(self) == "table" and typeof(self.pos) == "Vector3" and H.KickIntent and os.clock() - (H.KickIntentAt or 0) < 0.15 then
local ball = self.pos
if type(self.ballAt) == "function" and self.now then
local bok, bp = pcall(self.ballAt, self.now)
if bok and typeof(bp) == "Vector3" then ball = bp end
end
local dir = H.Functions.KickAimDir(ball.X, ball.Z, H.KickIntent)
if dir then
self.aimDir = dir
end
end
return callOrig(self, ...)
end
end)
if installed then
SA.PlanAimHooked = true
end
end
function MystrixHub.Functions.InstallPreviewSpoof()
local SA = getgenv().MystrixSilentAim
if SA.PreviewShowHooked or SA.PreviewShowHooking then return end
SA.PreviewShowHooking = true
task.spawn(function()
local ok, KP = pcall(function()
local game_ = LocalPlayer:WaitForChild("PlayerScripts"):WaitForChild("Client"):WaitForChild("Game")
return require(game_:WaitForChild("KickPreview", 10))
end)
if not (ok and type(KP) == "table" and type(KP.show) == "function") then
SA.PreviewShowHooking = false
return
end
local orig = KP.show
local function wrapper(strike, ...)
local state = getgenv().MystrixSilentAim
if state.Enabled and state.Spoof ~= false and type(strike) == "table" and typeof(strike.from) == "Vector3" and typeof(strike.vel) == "Vector3" then
local view = MystrixHub.TrickView
local locked = view ~= nil and view.Active == true
local rok, nv, ns = pcall(MystrixHub.Functions.PreviewAim, strike.from, strike.vel, strike.spin)
if rok and nv then
local copy = table.clone(strike)
copy.vel = nv
copy.spin = ns or strike.spin
if locked then copy.turn = false end
state.PreviewLastVel = nv
return orig(copy, ...)
end
if locked then
local copy = table.clone(strike)
copy.turn = false
return orig(copy, ...)
end
end
return orig(strike, ...)
end
KP.show = wrapper
SA.PreviewShowHooked = true
SA.PreviewShowHooking = false
MystrixHub.ConnectionController.Insert({ Disconnect = function()
if KP.show == wrapper then
KP.show = orig
end
SA.PreviewShowHooked = false
end })
end)
end
function MystrixHub.Functions.ShotPredict(params, pos, vel, spin, gy, horizon, dt)
local Flight = getgenv().MystrixSilentAim.Flight
local list = {}
local v, s = vel, spin
local rolling = false
local t = 0
local n = 0
while t < horizon do
local np, nv, ns
if rolling then
np, nv, ns = Flight.rollStep(pos, v, s, dt, params)
else
np, nv, ns = Flight.airStep(pos, v, s, dt, params)
if np.Y < gy and nv.Y < 0 then
np = Vector3.new(np.X, gy, np.Z)
local bv, bs = Flight.bounce(nv, ns, params)
if bv.Y < Flight.BOUNCE_MIN then
bv, bs = Flight.toGround(bv, bs)
rolling = true
end
nv, ns = bv, bs
end
end
pos, v, s = np, nv, ns
t += dt
n += 1
list[n] = { t = t, pos = pos }
end
return list
end
getgenv().MystrixTracker = getgenv().MystrixTracker or { Enabled = false, Rate = 0.25, Color = Color3.fromRGB(43, 255, 172) }
function MystrixHub.Functions.TrackerModules()
local T = getgenv().MystrixTracker
if T.BallSim and T.World then return true end
pcall(function()
local g = Services.ReplicatedStorage:WaitForChild("Shared"):WaitForChild("Game")
local bs = g:WaitForChild("BallSim")
T.BallSim = require(bs)
T.World = require(bs:WaitForChild("World"))
end)
return T.BallSim ~= nil and T.World ~= nil
end
function MystrixHub.Functions.TrackerTrace(ev)
local F = MystrixHub.Functions
local T = getgenv().MystrixTracker
local BallSim, World = T.BallSim, T.World
local data = World.get()
if T.FrameSrc ~= data.frames then
local copy = {}
for key, frame in pairs(data.frames) do
copy[key] = frame.touched and setmetatable({ touched = false }, { __index = frame }) or frame
end
T.FrameSrc = data.frames
T.FrameCopy = copy
end
local world = { groundY = data.groundY, frames = T.FrameCopy, bodies = {} }
local params = World.params()
local flight = World.FLIGHT
local step = BallSim.STEP * 2
local gy = data.groundY
local goal = F.SilentAimGoal()
local event = BallSim.fromEvent(flight, ev, gy)
local pts = { { p = event.pos, t = event.t } }
local last = event.pos
local airborne = event.pos.Y - gy > 1.2
local landing
for _ = 1, 260 do
if BallSim.resting(event, flight) then break end
event = BallSim.step(flight, event, step, params, world, false, 0, nil)
local p = event.pos
if p.Y - gy > 1.2 then airborne = true end
local crossed = goal ~= nil and (p.X - goal.x) * goal.out >= 0
local touched = airborne and (p.Y - gy <= 0.06 or event.rolling)
if (crossed or touched or (p - last).Magnitude >= 1.8) and (p - last).Magnitude > 0.05 then
pts[#pts + 1] = { p = p, t = event.t }
last = p
end
if touched then
landing = Vector3.new(p.X, gy - params.radius + 0.1, p.Z)
break
end
if crossed or #pts > 56 then break end
end
return pts, landing
end
function MystrixHub.Functions.StopBallTracker()
pcall(function() RunService:UnbindFromRenderStep("MystrixBallTracker") end)
local T = getgenv().MystrixTracker
if T.Base then
pcall(function() T.Base:Destroy() end)
T.Base = nil
end
end
function MystrixHub.Functions.StartBallTracker()
local F = MystrixHub.Functions
F.StopBallTracker()
if not F.SilentAimModules() or not F.TrackerModules() then return false end
local T = getgenv().MystrixTracker
local SA = getgenv().MystrixSilentAim
local BV = SA.BallView
local COUNT = 56
local base = Instance.new("Part")
base.Name = "MystrixTracker"
base.Anchored = true
base.CanCollide = fStay safe
Never paste your .ROBLOSECURITY cookie anywhere, and use an alt account with scripts.

Universal