Azion V2 FANMADE
Key RequiredUniversal

Azion V2 FANMADE

Universal Scriptcadungogjoshua81cadungogjoshua81 53 views 4 executesUpdated Oct 3, 2026
5.0/ 5(1 votes)
10100% Positive
Lua Script•768 lines (18609 chars)
-- Azion V2 FANMADE by me, Credits to @RobloxScriptCreator, hes the Original CREATOR of the Azion.
local en = game:GetService("Players")
local eo = game:GetService("RunService")
local hb = game:GetService("UserInputService")
local af = en.LocalPlayer
local hc = require(af:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule"))
local ep = hc:GetControls()
local ap = Instance.new("ScreenGui")
ap.Name = "SFAiGui"
ap.ResetOnSpawn = false
ap.IgnoreGuiInset = true
ap.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
ap.Parent = af:WaitForChild("PlayerGui")
local l = Instance.new("TextButton")
l.Size = UDim2.new(0, 90, 0, 40)
l.Position = UDim2.new(0, 60, 0.5, 0)
l.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
l.TextColor3 = Color3.fromRGB(255, 255, 255)
l.Text = "AI: OFF"
l.Font = Enum.Font.GothamBold
l.TextSize = 14
l.BorderSizePixel = 0
l.ZIndex = 10
l.Parent = ap
local eq = Instance.new("UICorner"); eq.CornerRadius = UDim.new(0,8); eq.Parent = l
local co = Instance.new("UIStroke"); co.Color = Color3.fromRGB(80,80,80); co.Thickness = 1; co.Parent = l
local di, er, bd = false, nil, nil
l.InputBegan:Connect(function(ab)
	if ab.UserInputType == Enum.UserInputType.MouseButton1 or ab.UserInputType == Enum.UserInputType.Touch then
		di = true; er = ab.Position; bd = l.Position
		ab.Changed:Connect(function()
			if ab.UserInputState == Enum.UserInputState.End then di = false end
		end)
	end
end)
hb.InputChanged:Connect(function(ab)
	if di and (ab.UserInputType == Enum.UserInputType.MouseMovement or ab.UserInputType == Enum.UserInputType.Touch) then
		local d = ab.Position - er
		l.Position = UDim2.new(bd.X.Scale, bd.X.Offset + d.X, bd.Y.Scale, bd.Y.Offset + d.Y)
	end
end)
local aq = false
local ar, ah, ai, as
local o, w, j
local be = 0
local at = Vector3.new(0,0,0)
local bf = 0
local bg = nil
local cp = false
local hd = 0.01
local he = 100
local cq = 100
local hf = 20
local bh = nil
local u = Vector3.new(0,0,0)
local cr = Vector3.new(0,0,0)
local au = Vector3.new(0,0,0)
local hg = 0.22
local hh = 0.14
local es = 0.04
local hi = 0.22
local et = 5
local hj = 60
local eu = 0.55
local hk = 0.10
local ev = 5
local hl = 60
local av = nil
local cs = 0
local bi = 0
local hm = 7
local aw = false
local bj = 0
local bk = nil
local hn = 0.28
local ct = 0
local ho = 0.32
local aj = 0
local bl = false
local cu = nil
local bm = 0
local hp = 1.2
local hq = 0.9
local hr = 1.8
local bn = 0
local ax = false
local dj = 0
local ay = 0
local bo = 0
local bp = 0
local ew = 0.75
local ex = 1.80
local hs = 0.06
local ht = 0.18
local ac = 0
local ey = 0
local ez = 0
local fa = 0
local fb = 0
local dk = math.rad(1.8)
local dl = math.rad(1.2)
local dm = 0
local dn = 0
local fc = 0
local fd = 0
local dp = 0
local dq = 0
local cv = nil
local cw = nil
local dr = 0
local hu = 0.045
local hv = 2.5
local bq = {}
local hw = 0.035
local ak = math.pi
local cx = 0
local fe = 10
local br = false
local bs = 0
local bt = 0
local ff = Vector3.new(0,0,0)
local bv = false
local bw = 0
local fg = 1
local ag = nil
local az = 0
local hx = math.rad(50)
local bx = false
local ds = nil
local by = 0
local hy = 0.18
local hz = 0.40
local ia = 6
local ib = 13
local ic = {
	{true, 78},
	{false, 22},
}
local bz = 0
local dt = Vector3.new(0,0,0)
local id = 0.05
local ie = {
	{"left", 30},
	{"right", 30},
	{"forward", 15},
	{"back", 15},
	{"diag_fl", 5},
	{"diag_fr", 5},
}
local ca = RaycastParams.new()
ca.FilterType = Enum.RaycastFilterType.Exclude
local function e(a, b) return a + math.random() * (b - a) end
local function ig(p) return math.random() < p end
local function m(cy)
	local ba = 0
	for _, c in ipairs(cy) do ba = ba + c[2] end
	local r = math.random() * ba
	local du = 0
	for _, c in ipairs(cy) do
		du = du + c[2]
		if r <= du then return c[1] end
	end
	return cy[#cy][1]
end
local ih = {
	{"behind", 38},
	{"left", 27},
	{"back_left", 19},
	{"far_left", 9},
	{"chaos", 7},
}
local ii = {
	{"random_angle", 9},
	{"spin", 5},
	{"pool", 78},
}
local fh = {
	{Vector3.new(0,0,-1), 40},
	{Vector3.new(0,0,1), 20},
	{Vector3.new(-1,0,0), 12},
	{Vector3.new(1,0,0), 12},
	{Vector3.new(-1,0,-1).Unit, 14},
	{Vector3.new(1,0,-1).Unit, 14},
	{Vector3.new(-1,0,1).Unit, 5},
	{Vector3.new(1,0,1).Unit, 5},
}
local ij = {
	{0, 68},
	{1, 18},
	{2, 10},
	{3, 4},
}
local fi = {
	{55, 15},
	{70, 25},
	{90, 30},
	{110, 20},
	{130, 10},
}
local bb = {
	{1, 50},
	{-1, 50},
}
local ik = {
	{true, 22},
	{false, 78},
}
local il = {
	{true, 10},
	{false, 90},
}
local cz = 10
local da = 14
local dv = {}
for i=1,cz do
	local cb = (i-1) * (2*math.pi/cz)
	dv[i] = Vector3.new(math.cos(cb), 0, math.sin(cb))
end
local fj = {}
local dw = 0
local im = 0.06
local io = 5
local fk = 3
local ip = math.rad(16)
local fl = 0.82
local db = 0.09
local iq = 3.0
local ir = 1.4
local is = 0.8
local it = 0.6
local dc = nil
local cc = 0
local fm = 3.0
local fn = 6.5
local function fo()
	ey = e(5.5, 9.5)
	ez = e(11.0, 17.0)
	fa = e(4.0, 7.5)
	fb = e(8.5, 13.5)
	dk = math.rad(e(1.2, 2.8))
	dl = math.rad(e(0.8, 1.9))
	dm = math.random() * 200
	dn = math.random() * 200
	fc = math.random() * 200
	fd = math.random() * 200
	dp = e(2.5, 5.5)
	dq = math.rad(e(0.6, 1.8))
end
local function fp()
	local ad = m(ih)
	if ad == "behind" then
		ak = math.pi + e(-0.28, 0.28)
	elseif ad == "left" then
		ak = -math.pi / 2 + e(-0.40, 0.40)
	elseif ad == "back_left" then
		ak = -(math.pi * 0.72) + e(-0.24, 0.24)
	elseif ad == "far_left" then
		ak = -(math.pi * 0.88) + e(-0.18, 0.18)
	else
		ak = e(-math.pi, math.pi)
	end
	cx = e(0.9, 2.4)
	fe = e(7, 15)
end
local function iu(q)
	local t = math.clamp((q - et) / (hj - et), 0, 1)
	return es + (hi - es) * t + e(-0.008, 0.008)
end
local function iv(q)
	local t = math.clamp((q - ev) / (hl - ev), 0, 1)
	local b = eu + (hk - eu) * t
	return math.clamp(b + e(-0.04, 0.04), 0.05, 0.65)
end
local function iw(f)
	ac = ac + f
	local h = math.sin(ac * ey + dm) * dk + math.sin(ac * ez + dm * 1.3) * dk * 0.4
	local v = math.sin(ac * fa + dn) * dl + math.sin(ac * fb + dn * 0.7) * dl * 0.4
	local ix = math.sin(ac * dp + fc) * dq
	local iy = math.sin(ac * dp * 0.7 + fd) * dq * 0.5
	return h + ix, v + iy
end
local function fq(v, cb)
	local c, s = math.cos(cb), math.sin(cb)
	return Vector3.new(v.X*c - v.Z*s, 0, v.X*s + v.Z*c)
end
local function iz(al, am)
	if al - dw < im then return end
	dw = al
	ca.FilterDescendantsInstances = am and {o, am} or {o}
	for i=1,cz do
		local x = workspace:Raycast(j.Position, dv[i]*da, ca)
		fj[i] = x and (x.Position - j.Position).Magnitude or da
	end
end
local function ja(bc)
	local cd, fr = -math.huge, 1
	for i=1,cz do
		local f = bc:Dot(dv[i])
		if f > cd then cd = f; fr = i end
	end
	return (fj[fr] or da) / da
end
local function jb(bc, ce, dd, cf)
	local dx = bc:Dot(ce)
	local jc = ja(bc)
	local jd = bc:Dot(dd)
	local dy = cf and bc:Dot(cf) or 1
	return dx*iq + jc*ir + jd*is + dy*it
end
local function fs(ft, cg, cf, fu, ch, dz, dd, q)
	if ft <= 0 then return 0, nil end
	local fv = fu - cg
	local fw = Vector3.new(fv.X, 0, fv.Z)
	local ce = fw.Magnitude > 0.01 and fw.Unit or (cf or Vector3.new(0,0,1))
	local ea, fx = -math.huge, ce
	for b=1, fk do
		local je = (b - (fk+1)/2) * ip
		local eb = fq(ce, je)
		local an = jb(eb, ce, dd, cf)
		local jf = fu + ch * db + dz * (0.5 * db * db)
		local jg = ch + dz * db
		local jh = fs(ft-1, cg, eb, jf, jg, dz, dd, q * fl)
		local ba = an + q * fl * jh
		if ba > ea then ea = ba; fx = eb end
	end
	return ea, fx
end
local function ji(cg, am, fy)
	local al = tick()
	local jj = cv and (fy.Position - cv).Magnitude > hv
	if cw and not jj and (al - dr) < hu then
		return cw
	end
	ca.FilterDescendantsInstances = {o, am}
	local ec, fz = nil, math.huge
	for _, ao in ipairs(am:GetDescendants()) do
		if not ao:IsA("BasePart") then continue end
		local ch = ao.Position - cg
		local q = ch.Magnitude
		if q > 600 then continue end
		local ed = bq[ao]
		local x
		if ed and (al - ed.time) < hw then
			x = ed.result
		else
			x = workspace:Raycast(cg, ch, ca)
			bq[ao] = {result = x, time = al}
		end
		local an
		if x == nil then
			an = q
		elseif x.Instance and x.Instance:IsDescendantOf(am) then
			an = q * 0.5
		else
			an = q * 999
		end
		if an < fz then
			fz = an
			ec = (x and x.Instance and x.Instance:IsDescendantOf(am)) and x.Position or ao.Position
		end
	end
	for p in pairs(bq) do
		if not p.Parent then bq[p] = nil end
	end
	cv = fy.Position
	cw = ec
	dr = al
	return ec
end
local function jk(de)
	if ai then ai:Disconnect(); ai = nil end
	if not de then return end
	ai = de.Activated:Connect(function()
		if cp then return end
		cp = true
		local c = de.Parent
		local k = c and c:FindFirstChild("HumanoidRootPart")
		local h = c and c:FindFirstChildOfClass("Humanoid")
		if not k or not h or h.Health <= 0 then cp = false return end
		local df = h:LoadAnimation(de:FindFirstChildOfClass("Animation") or Instance.new("Animation"))
		df:Play()
		local ee = OverlapParams.new()
		ee.FilterDescendantsInstances = {c}
		ee.FilterType = Enum.RaycastFilterType.Exclude
		local ae = Instance.new("Part")
		ae.Size = Vector3.new(cq, cq, cq)
		ae.Shape = Enum.PartType.Ball
		ae.CFrame = k.CFrame * CFrame.new(0, 0, -(cq / 2))
		ae.Anchored = true; ae.CanCollide = false; ae.Transparency = 1
		ae.Parent = workspace
		local dx = workspace:GetPartsInPart(ae, ee)
		ae:Destroy()
		local ga = {}
		for _, ao in ipairs(dx) do
			local ad = ao:FindFirstAncestorOfClass("Model")
			if ad and not ga[ad] then
				local ef = ad:FindFirstChildOfClass("Humanoid")
				if ef and ef.Health > 0 then
					ga[ad] = true
					ef:TakeDamage(he)
				end
			end
		end
		task.delay(hd, function() cp = false end)
	end)
end
local function gb()
	o = af.Character
	if not o then return false end
	w = o:FindFirstChildOfClass("Humanoid")
	j = o:FindFirstChild("HumanoidRootPart")
	return w ~= nil and j ~= nil
end
local function eg()
	task.wait(0.2)
	if not gb() then return end
	local t = af.Backpack:FindFirstChildOfClass("Tool")
	if t then w:EquipTool(t); jk(t) end
end
local function gc()
	if ah then ah:Disconnect(); ah = nil end
	if not o then return end
	local t = o:FindFirstChildOfClass("Tool")
	if not t then return end
	ah = t.Unequipped:Connect(function()
		if aq then eg() end
	end)
end
local function jl()
	if not j then return nil end
	local g = j:FindFirstChild("_SFGyro")
	if not g then
		g = Instance.new("BodyGyro")
		g.Name = "_SFGyro"
		g.MaxTorque = Vector3.new(0, 4e5, 0)
		g.P = 8e4; g.D = 400
		g.CFrame = j.CFrame
		g.Parent = j
	end
	return g
end
local function jm()
	if j then
		local g = j:FindFirstChild("_SFGyro")
		if g then g:Destroy() end
	end
end
local function gd()
	if not j then return nil end
	local ge, cd = nil, math.huge
	for _, p in ipairs(en:GetPlayers()) do
		if p ~= af and p.Character then
			local gf = p.Character:FindFirstChild("HumanoidRootPart")
			local gg = p.Character:FindFirstChildOfClass("Humanoid")
			if gf and gg and gg.Health > 0 then
				local d = (gf.Position - j.Position).Magnitude
				if d < cd then cd = d; ge = p.Character end
			end
		end
	end
	return ge
end
local function jn(f)
	if not aq then return end
	if not o or not j or not w then return end
	local gh = gd()
	if not gh then return end
	local eh = gh:FindFirstChild("HumanoidRootPart")
	if not eh then return end
	bz = bz - f
	if bz <= 0 then
		bz = id
		local gi = Vector3.new(eh.Position.X - j.Position.X, 0, eh.Position.Z - j.Position.Z)
		local ci = gi.Magnitude > 0 and gi.Unit or Vector3.new(0,0,1)
		local dg = ci:Cross(Vector3.new(0,1,0))
		local cj = m(ie)
		local aa
		if cj == "left" then aa = -dg
		elseif cj == "right" then aa = dg
		elseif cj == "forward" then aa = ci
		elseif cj == "back" then aa = -ci
		elseif cj == "diag_fl" then aa = (ci - dg)
		else aa = (ci + dg) end
		if aa.Magnitude > 0.01 then aa = aa.Unit end
		dt = fq(aa, e(-0.12, 0.12))
	end
	w:Move(dt, false)
end
local function jo(f)
	if not gb() then return end
	local ck = gd()
	if not ck then
		w:Move(Vector3.new(0,0,0))
		bh = nil
		u = Vector3.new(0,0,0)
		cr = Vector3.new(0,0,0)
		au = Vector3.new(0,0,0)
		dc = nil
		ag = nil
		return
	end
	local k = ck:FindFirstChild("HumanoidRootPart")
	local gj = ck:FindFirstChildOfClass("Humanoid")
	if not k then return end
	local q = (k.Position - j.Position).Magnitude
	local ei = Vector3.new(k.Position.X - j.Position.X, 0, k.Position.Z - j.Position.Z)
	local n = ei.Magnitude > 0 and ei.Unit or Vector3.new(0,0,1)
	local gk = Vector3.new(0,0,0)
	if bh and f > 0 then gk = (k.Position - bh) / f end
	bh = k.Position
	u = u:Lerp(gk, hg)
	local jp = f > 0 and (u - cr) / f or Vector3.new(0,0,0)
	cr = u
	au = au:Lerp(jp, hh)
	local ej = u - n * u:Dot(n)
	local jq = ej.X * n.Z - ej.Z * n.X
	local gl = jq >= 0 and 1 or -1
	if cs ~= 0 and gl ~= cs and ej.Magnitude > 3 then
		bi = 1.0
	end
	cs = gl
	bi = math.max(0, bi - f * hm)
	local gm = Vector3.new(u.X, 0, u.Z).Magnitude
	if not aw and ct > 8 and gm < ct * ho then
		aw = true; bj = hn; bk = k.Position
	end
	ct = gm
	if aw then
		bj = bj - f
		if bj <= 0 then aw = false; bk = nil end
	end
	local jr = gj and gj.FloorMaterial == Enum.Material.Air
	local js = Vector3.new(0, -workspace.Gravity, 0)
	local cl = iu(q)
	local cm
	if aw and bk then
		cm = bk
	else
		cm = k.Position + u * cl + au * (0.5 * cl * cl)
		if jr then cm = cm + js * (0.5 * cl * cl) end
	end
	cx = cx - f
	if cx <= 0 then fp() end
	local z = Vector3.new(k.CFrame.LookVector.X, 0, k.CFrame.LookVector.Z)
	if z.Magnitude < 0.01 then z = -n else z = z.Unit end
	local ek = Vector3.new(z.Z, 0, -z.X).Unit
	if ag then
		local jt = ag.X*z.Z - ag.Z*z.X
		local ju = ag.X*z.X + ag.Z*z.Z
		local jv = math.atan2(jt, ju)
		az = az + jv
		if math.abs(az) >= hx then
			local jw = az > 0 and 1 or -1
			az = 0
			if m(ic) then
				local jx = -ek
				local jy = ek
				local gn = jw > 0 and jx or jy
				local go = k.Position + gn * e(ia, ib)
				local gp = Vector3.new(go.X - j.Position.X, 0, go.Z - j.Position.Z)
				ds = gp.Magnitude > 0.5 and gp.Unit or gn
				bx = true
				by = e(hy, hz)
			end
		end
	end
	ag = z
	local gq = (-z * math.cos(ak) + ek * math.sin(ak)) * fe
	local gr = Vector3.new(k.Position.X + gq.X, j.Position.Y, k.Position.Z + gq.Z)
	local gs = Vector3.new(gr.X - j.Position.X, 0, gr.Z - j.Position.Z)
	local gt = gs.Magnitude > 0.5 and gs.Unit or n
	bt = bt - f
	if br then
		bs = bs - f
		if bs <= 0 then br = false; bt = e(0.6, 1.8) end
	elseif bt <= 0 and ig(0.20) then
		br = true
		bs = e(0.08, 0.22)
		ff = (n + Vector3.new(m(bb) * e(0.2, 0.7), 0, 0)).Unit
	end
	bw = bw - f
	if bv and bw <= 0 then bv = false end
	by = by - f
	if bx and by <= 0 then bx = false end
	be = be - f
	bf = bf - f
	local y
	if br then
		y = ff
	elseif bx then
		y = ds
	elseif bv then
		local jz = Vector3.new(-n.Z, 0, n.X) * fg
		y = (n * 0.5 + jz * 0.85).Unit
	elseif bf > 0 and bg then
		y = bg
	else
		bg = nil
		if be <= 0 then
			be = e(0.025, 0.075)
			local el = m(ii)
			if el == "random_angle" then
				local df = e(0, math.pi * 2)
				at = Vector3.new(math.cos(df), 0, math.sin(df))
			elseif el == "spin" then
				bv = true; bw = e(0.15, 0.45)
				fg = m(bb)
				at = m(fh)
			else
				at = m(fh)
			end
			if m(ik) and w.FloorMaterial ~= Enum.Material.Air then
				w.Jump = true
			end
			if m(il) then
				local gu = Vector3.new(-n.Z, 0, n.X)
				bg = m(bb) > 0 and gu or -gu
				bf = e(0.08, 0.38)
			end
		end
		local ka = Vector3.new(n.Z, 0, -n.X)
		local dh = n * -at.Z + ka * at.X
		if dh.Magnitude > 0.01 then dh = dh.Unit end
		local gv = math.clamp((q - 5) / 16, 0, 1)
		y = dh * (1 - gv) + gt * gv
		if y.Magnitude > 0.01 then y = y.Unit end
	end
	local gw = Vector3.new(u.X, 0, u.Z)
	if gw.Magnitude > 1 and y.Magnitude > 0.1 then
		local dy = gw.Unit:Dot(y)
		if dy > 0.82 then
			aj = aj + hp * f
		else
			aj = math.max(0, aj - hq * f)
		end
	end
	if aj >= hr and not bl then
		bl = true; bm = 0; aj = 0
		local gx = Vector3.new(-n.Z, 0, n.X)
		cu = m(bb) > 0 and gx or -gx
	end
	if bl then
		y = cu
		bm = bm + f
		if bm >= e(0.25, 0.52) then bl = false; cu = nil end
	end
	w:Move(y, false)
	bn = bn - f
	if bn <= 0 and not ax then
		ax = true; ay = 0
		dj = e(hs, ht)
		bo = m(bb) * math.rad(m(fi))
		bp = m(ij)
		bn = e(ew, ex)
	end
	if ax then
		ay = ay + f
		if ay >= dj then
			ax = false
			if bp > 0 then
				bp = bp - 1
				ax = true; ay = 0
				dj = e(0.04, 0.13)
				bo = m(bb) * math.rad(m(fi))
			else
				bo = 0
			end
		end
	end
	cc = cc - f
	if cc <= 0 then
		fo()
		cc = e(fm, fn)
	end
	local kb = ji(j.Position, ck, k) or k.Position
	local kc = cm - k.Position
	local kd = kb + kc
	iz(tick(), ck)
	local _, gy = fs(io, j.Position, dc, kd, u, au, gt, 1)
	dc = gy
	local ke = math.min(1, iv(q) + bi * 0.45)
	local gz = CFrame.lookAt(j.Position, j.Position + gy * 10)
	if not av then av = gz end
	av = av:Lerp(gz, ke)
	local kf, kg = iw(f)
	local kh = av * CFrame.Angles(kg, kf + bo, 0)
	local ha = jl()
	if ha then ha.CFrame = kh end
	if ei.Magnitude <= hf then
		local em = o:FindFirstChildOfClass("Tool")
		if em and em.Parent == o then
			pcall(function() em:Activate() end)
		end
	end
	gc()
end
local function ki()
	bh = nil
	u = Vector3.new(0,0,0)
	cr = Vector3.new(0,0,0)
	au = Vector3.new(0,0,0)
	cs = 0; bi = 0
	aw = false; bj = 0; bk = nil
	ct = 0
	aj = 0; bl = false; cu = nil; bm = 0
	bf = 0; bg = nil
	bn = e(ew, ex)
	ax = false; bo = 0; ay = 0; bp = 0
	cv = nil; cw = nil; dr = 0
	bq = {}
	av = nil
	ac = 0
	cc = e(fm, fn)
	fo()
	fp()
	br = false; bs = 0; bt = 0
	bv = false; bw = 0
	dc = nil
	dw = 0
	ag = nil; az = 0
	bx = false; ds = nil; by = 0
	bz = 0; dt = Vector3.new(0,0,0)
end
local function kj(cn)
	aq = cn
	l.Text = cn and "AI: ON" or "AI: OFF"
	l.BackgroundColor3 = cn and Color3.fromRGB(0,170,70) or Color3.fromRGB(35,35,35)
	co.Color = cn and Color3.fromRGB(0,220,90) or Color3.fromRGB(80,80,80)
	be = 0
	ki()
	if cn then
		ep:Disable()
		eg()
		if ar then ar:Disconnect() end
		ar = eo.Heartbeat:Connect(function(f)
			if not aq then return end
			pcall(jo, f)
		end)
		if as then as:Disconnect() end
		as = eo.Heartbeat:Connect(function(f)
			pcall(jn, f)
		end)
	else
		if ar then ar:Disconnect(); ar = nil end
		if as then as:Disconnect(); as = nil end
		if ah then ah:Disconnect(); ah = nil end
		if ai then ai:Disconnect(); ai = nil end
		ep:Enable()
		jm()
		if w then w:Move(Vector3.new(0,0,0)) end
	end
end
l.MouseButton1Click:Connect(function() kj(not aq) end)
af.CharacterAdded:Connect(function(c)
	o = c
	w = c:WaitForChild("Humanoid")
	j = c:WaitForChild("HumanoidRootPart")
	if aq then
		task.wait(0.05)
		eg()
		gc()
	end
end)
if af.Character then
	o = af.Character
	w = o:FindFirstChildOfClass("Humanoid")
	j = o:FindFirstChild("HumanoidRootPart")
end

Features & Information

The AI behaves like an aggressive, predictive sword fighter. It constantly searches for the nearest living opponent and follows them as its main target. Instead of simply moving toward the opponent's current position, it watches how the opponent is moving and estimates their velocity and acceleration. It uses that information to predict where the opponent will be shortly, then moves and aims toward that predicted position. The AI tries to avoid moving in a completely straight line. It constantly changes its footwork using randomized behaviors such as strafing, circling, moving behind the opponent, moving to the side, moving diagonally, briefly hesitating, spinning, jumping, and suddenly changing direction. It has preferred attack-positioning behaviors. It often tries to get behind or beside the opponent instead of staying directly in front of them. Its preferred position is randomized, so its movement does not always look identical. The AI watches the opponent's movement and can react when the opponent suddenly slows down, changes direction, or turns. When this happens, it can temporarily change its movement pattern or reposition to another side. It also checks the surrounding space using directional sensing. This lets it determine which directions have more room and which directions are obstructed. It combines this information with its desired direction so it does not blindly move toward the opponent when that direction is unsafe or blocked. For aiming and facing, the AI does more than simply look directly at the opponent. It evaluates several nearby possible directions and recursively compares them for a short distance into the future. It prefers directions that keep the opponent in front of it, maintain useful positioning, have better clearance, and fit its current movement. Its turning is smoothed rather than instantly snapping toward the target. This makes its aim continuously adjust as the opponent moves. The AI also intentionally introduces small aim and movement variations. Its facing direction contains controlled random motion, so its aim is not perfectly identical every frame. Its movement contains momentum-like behavior. When it has been moving in a useful direction for a while, it can accumulate enough momentum in that direction to trigger a stronger side movement or repositioning maneuver. The AI periodically rerolls some of its movement and aiming parameters. This changes the exact timing, angle, jitter, and footwork pattern, making the behavior less repetitive. When the opponent gets close enough, the AI activates its weapon and attempts to attack. Overall, the behavior is: Observe opponent → track movement → predict future position → evaluate surrounding space → choose a combat direction → reposition around the opponent → adjust aim → attack when close → repeat continuously. The AI is not actually learning. It does not remember that a certain opponent beat one of its techniques and then permanently change its strategy. Its variety comes mainly from prediction, short-horizon directional evaluation, predefined behaviors, state changes, and weighted randomness. Its fighting style can therefore be described as: Aggressive + predictive + evasive + circling + randomized + short-term tactical.

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts