--!strict local Players = game:GetService("Players") local RunService = game:GetService("RunService") local CoreGui = game:GetService("CoreGui") or Players.LocalPlayer:WaitForChild("PlayerGui") local LocalPlayer = Players.LocalPlayer local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait() local Humanoid = Character:WaitForChild("Humanoid") local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart") -- Configuration Table local Config = { AntiFlingActive = true, VoidThreshold = -500, MaxSpeedThreshold = 50, MaxFlingSpeedThreshold = 150, MaxTeleportDistance = 100, ChatMessagesEnabled = true, -- ENABLED: Only for status updates UIName = "RXS_Antifling_UI", UITextColorOn = Color3.fromRGB(0, 255, 100), UITextColorOff = Color3.fromRGB(255, 0, 50), UITextOn = "RXS ANTIFLING: ON 🛡️", UITextOff = "RXS ANTIFLING: OFF ❌", VoidTeleportHeight = 20, } local lastStableCFrame = HumanoidRootPart.CFrame local lastPosition = HumanoidRootPart.Position local function notify(message, isPublic) -- Internal logging to console print("[RXS ANTIFLING] " .. message) -- Only send to public chat if explicitly marked as public if isPublic and Config.ChatMessagesEnabled then pcall(function() local TextChatService = game:GetService("TextChatService") local ChatService = game:GetService("Chat") local generalChannel = TextChatService:FindFirstChild("TextChannels") and TextChatService.TextChannels:FindFirstChild("RBXGeneral") if generalChannel then generalChannel:SendAsync(message) else ChatService:Chat(HumanoidRootPart, message, Enum.ChatColor.Red) end end) end end -- UI Setup if CoreGui:FindFirstChild(Config.UIName) then CoreGui[Config.UIName]:Destroy() end local ScreenGui = Instance.new("ScreenGui", CoreGui) ScreenGui.Name = Config.UIName ScreenGui.ResetOnSpawn = false local MainFrame = Instance.new("Frame", ScreenGui) MainFrame.Size = UDim2.new(0, 160, 0, 50) MainFrame.Position = UDim2.new(0.5, -80, 0.9, -25) MainFrame.BackgroundColor3 = Color3.fromRGB(10, 10, 12) MainFrame.BorderSizePixel = 2 MainFrame.BorderColor3 = Config.UITextColorOff MainFrame.Active = true local ToggleButton = Instance.new("TextButton", MainFrame) ToggleButton.Size = UDim2.new(1, 0, 1, 0) ToggleButton.BackgroundTransparency = 1 ToggleButton.Text = Config.AntiFlingActive and Config.UITextOn or Config.UITextOff ToggleButton.TextColor3 = Config.AntiFlingActive and Config.UITextColorOn or Config.UITextColorOff ToggleButton.TextSize = 13 ToggleButton.Font = Enum.Font.GothamBold -- Moveable Logic local dragging, dragStart, initialPosition, isDragging = false, Vector2.new(0, 0), UDim2.new(0, 0, 0, 0), false ToggleButton.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging, isDragging, dragStart, initialPosition = true, false, input.Position, MainFrame.Position end end) ToggleButton.InputChanged:Connect(function(input) if (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) and dragging then local delta = input.Position - dragStart if delta.Magnitude > 5 then isDragging = true end MainFrame.Position = UDim2.new(initialPosition.X.Scale, initialPosition.X.Offset + delta.X, initialPosition.Y.Scale, initialPosition.Y.Offset + delta.Y) end end) ToggleButton.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false if not isDragging then Config.AntiFlingActive = not Config.AntiFlingActive ToggleButton.Text = Config.AntiFlingActive and Config.UITextOn or Config.UITextOff ToggleButton.TextColor3 = Config.AntiFlingActive and Config.UITextColorOn or Config.UITextColorOff notify("RXS ANTIFLING: " .. (Config.AntiFlingActive and "ACTIVATED" or "DEACTIVATED"), true) end end end) local function eliteProtection() if not Config.AntiFlingActive or not HumanoidRootPart or Humanoid.Health <= 0 then return end for _, part in ipairs(Character:GetDescendants()) do if part:IsA("BasePart") then part.CanTouch, part.Massless = false, true end end local currentPosition, vel = HumanoidRootPart.Position, HumanoidRootPart.AssemblyLinearVelocity local speed = vel.Magnitude if speed > Config.MaxSpeedThreshold then HumanoidRootPart.AssemblyLinearVelocity, HumanoidRootPart.AssemblyAngularVelocity = vel.Unit * Config.MaxSpeedThreshold, Vector3.new(0, 0, 0) if speed > Config.MaxFlingSpeedThreshold then HumanoidRootPart.CFrame = lastStableCFrame notify("🛡️ Fling detected!", false) end else lastStableCFrame = HumanoidRootPart.CFrame end if (currentPosition - lastPosition).Magnitude > Config.MaxTeleportDistance and speed < 1 then HumanoidRootPart.CFrame = lastStableCFrame notify("🛡️ Teleport detected!", false) end lastPosition = currentPosition Humanoid:ChangeState(Enum.HumanoidStateType.Running) Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false) Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false) if Humanoid.Sit then Humanoid.Sit = false end if HumanoidRootPart.Position.Y < Config.VoidThreshold then HumanoidRootPart.CFrame = CFrame.new(HumanoidRootPart.Position.X, Config.VoidTeleportHeight, HumanoidRootPart.Position.Z) notify("🛡️ Void protection!", false) end end RunService.Heartbeat:Connect(eliteProtection) notify("🛡️ RXS ANTIFLING: ELITE EDITION ACTIVE!", true)