-- AntiFling Script local player = game.Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") -- GUI local screenGui = Instance.new("ScreenGui") screenGui.Name = "AntiFlingGui" screenGui.ResetOnSpawn = false screenGui.Parent = playerGui local toggleButton = Instance.new("TextButton") toggleButton.Size = UDim2.new(0, 50, 0, 50) toggleButton.Position = UDim2.new(0.5, -25, 0, -30) toggleButton.Text = "+" toggleButton.BackgroundColor3 = Color3.new(0, 0, 0) toggleButton.TextColor3 = Color3.new(1, 1, 1) toggleButton.Font = Enum.Font.SourceSansBold toggleButton.TextSize = 24 toggleButton.Parent = screenGui local uICorner = Instance.new("UICorner") uICorner.CornerRadius = UDim.new(0.5, 0) uICorner.Parent = toggleButton local protectionEnabled = true local function setCollision(character, enabled) if not character then return end for _, part in ipairs(character:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = enabled end end end local function updateProtection() for _, otherPlayer in ipairs(game.Players:GetPlayers()) do if otherPlayer ~= player and otherPlayer.Character then setCollision(otherPlayer.Character, not protectionEnabled) end end end task.spawn(function() while true do if protectionEnabled then updateProtection() end task.wait(1) end end) toggleButton.MouseButton1Click:Connect(function() protectionEnabled = not protectionEnabled if protectionEnabled then toggleButton.Text = "+" toggleButton.BackgroundColor3 = Color3.new(0, 0, 0) updateProtection() else toggleButton.Text = "-" toggleButton.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5) for _, otherPlayer in ipairs(game.Players:GetPlayers()) do if otherPlayer ~= player and otherPlayer.Character then setCollision(otherPlayer.Character, true) end end end end)