local plr = game:GetService("Players") local rs = game:GetService("RunService") local sg = game:GetService("StarterGui") local lp = plr.LocalPlayer local re = game.ReplicatedStorage.Knit.Knit.Services.NanamiService.RE local ra = re.RightActivated local fx = re.Effects local sweet = 0.70 local lead = 0.02 local slack = 0.005 local on = true local pend = nil local duck = "rbxassetid://71109437053861" local function notif(title, txt, ico, dur) task.spawn(function() local ok = false for _ = 1, 8 do ok = pcall(function() sg:SetCore("SendNotification", { Title = title, Text = txt, Icon = ico, Duration = dur or 5, }) end) if ok then break end task.wait(0.4) end end) end task.defer(function() notif("Auto Ratio", "By Dyinka", duck, 6) end) local function isMe(who) if not who then return false end if typeof(who) == "Instance" then return who == lp or (who:IsA("Model") and who.Name == lp.Name) end return false end local function pingS() local ok, st = pcall(function() return game:GetService("Stats") end) if not ok then return 0 end local net = st.Network local srv = net and net.ServerStatsItem local it = srv and srv["Data Ping"] if not it then return 0 end local ok2, s = pcall(function() return it:GetValueString() end) if not ok2 or type(s) ~= "string" then return 0 end local ms = tonumber(s:match("([%d%.]+)")) return ms and (ms / 1000) or 0 end fx.OnClientEvent:Connect(function(eff, who, tgt, gui, b, dur, sT) if not isMe(who) then return end if eff ~= "SpawnRatio" then return end if type(dur) ~= "number" or type(sT) ~= "number" then return end local p = pingS() local l = lead if p > 0 then l = math.max(lead, (p * 0.5) / dur + slack) end pend = sT + (sweet - l) * dur end) rs.Heartbeat:Connect(function() if not on or not pend then return end if workspace:GetServerTimeNow() >= pend then pend = nil ra:FireServer(nil) end end) getgenv().AutoRatio = { toggle = function(v) on = (v ~= false) end, sweet = function(v) sweet = v end, lead = function(v) lead = v end, }