local Players = game:GetService("Players") local RunService = game:GetService("RunService") local LocalPlayer = Players.LocalPlayer local character, humanoid, root local function updateVars(newChar) character = newChar humanoid = character:WaitForChild("Humanoid") root = character:WaitForChild("HumanoidRootPart") end if LocalPlayer.Character then updateVars(LocalPlayer.Character) end LocalPlayer.CharacterAdded:Connect(updateVars) local main = Instance.new("ScreenGui") main.Name = "TarekScripter_AntiSlap_Beta_" .. math.random(100, 999) main.ResetOnSpawn = false main.Parent = LocalPlayer:WaitForChild("PlayerGui") local Frame = Instance.new("Frame", main) Frame.BackgroundColor3 = Color3.fromRGB(18, 18, 24) Frame.Position = UDim2.new(0.1, 0, 0.38, 0) Frame.Size = UDim2.new(0, 240, 0, 75) Frame.Active = true Frame.Draggable = true Frame.BorderSizePixel = 0 local FrameCorner = Instance.new("UICorner", Frame) FrameCorner.CornerRadius = UDim.new(0, 10) local FrameStroke = Instance.new("UIStroke", Frame) FrameStroke.Color = Color3.fromRGB(140, 40, 255) FrameStroke.Thickness = 1.5 local TitleLabel = Instance.new("TextLabel", Frame) TitleLabel.BackgroundTransparency = 1 TitleLabel.Position = UDim2.new(0, 12, 0, 6) TitleLabel.Size = UDim2.new(0, 160, 0, 22) TitleLabel.Text = "tarekscripter anti slap(beta)" TitleLabel.TextColor3 = Color3.fromRGB(220, 220, 255) TitleLabel.Font = Enum.Font.GothamBold TitleLabel.TextSize = 12 TitleLabel.TextXAlignment = Enum.TextXAlignment.Left local closebutton = Instance.new("TextButton", Frame) closebutton.Name = "Close" closebutton.Text = "×" closebutton.Position = UDim2.new(1, -26, 0, 6) closebutton.Size = UDim2.new(0, 20, 0, 20) closebutton.BackgroundColor3 = Color3.fromRGB(255, 60, 80) closebutton.TextColor3 = Color3.fromRGB(255, 255, 255) closebutton.Font = Enum.Font.GothamBold closebutton.TextSize = 14 closebutton.BorderSizePixel = 0 local CloseCorner = Instance.new("UICorner", closebutton) CloseCorner.CornerRadius = UDim.new(0, 6) local mini = Instance.new("TextButton", Frame) mini.Name = "mini" mini.Text = "−" mini.Position = UDim2.new(1, -50, 0, 6) mini.Size = UDim2.new(0, 20, 0, 20) mini.BackgroundColor3 = Color3.fromRGB(45, 45, 60) mini.TextColor3 = Color3.fromRGB(255, 255, 255) mini.Font = Enum.Font.GothamBold mini.TextSize = 14 mini.BorderSizePixel = 0 local MiniCorner = Instance.new("UICorner", mini) MiniCorner.CornerRadius = UDim.new(0, 6) local antiSlapBtn = Instance.new("TextButton", Frame) antiSlapBtn.Name = "antiSlapBtn" antiSlapBtn.Text = "OFF" antiSlapBtn.Position = UDim2.new(0, 10, 0, 36) antiSlapBtn.Size = UDim2.new(1, -20, 0, 28) antiSlapBtn.BackgroundColor3 = Color3.fromRGB(35, 35, 45) antiSlapBtn.TextColor3 = Color3.fromRGB(255, 80, 80) antiSlapBtn.Font = Enum.Font.GothamBold antiSlapBtn.TextSize = 13 antiSlapBtn.BorderSizePixel = 0 local BtnCorner = Instance.new("UICorner", antiSlapBtn) BtnCorner.CornerRadius = UDim.new(0, 8) local BtnStroke = Instance.new("UIStroke", antiSlapBtn) BtnStroke.Color = Color3.fromRGB(255, 80, 80) BtnStroke.Thickness = 1 local antiSlapEnabled = false local autoFlying = false local bv = nil local maxStudsDistance = 5 local PlayerModule = require(LocalPlayer.PlayerScripts:WaitForChild("PlayerModule")) local Controls = PlayerModule:GetControls() local function stopFly() autoFlying = false if bv then bv:Destroy() bv = nil end if humanoid then humanoid.PlatformStand = false local anim = character:FindFirstChild("Animate") if anim then anim.Disabled = false end end end local function triggerAutoFly() if autoFlying or not root or not humanoid then return end autoFlying = true local anim = character:FindFirstChild("Animate") if anim then anim.Disabled = true end for _, track in pairs(humanoid:GetPlayingAnimationTracks()) do track:Stop(0) end humanoid.PlatformStand = true bv = Instance.new("BodyVelocity", root) bv.MaxForce = Vector3.new(1e6, 1e6, 1e6) bv.Velocity = Vector3.new(0, 0, 0) task.delay(0.2, function() stopFly() end) end local function checkThreats() if not antiSlapEnabled or autoFlying or not root then return end for _, player in pairs(Players:GetPlayers()) do if player ~= LocalPlayer and player.Character then local enemyChar = player.Character local enemyRoot = enemyChar:FindFirstChild("HumanoidRootPart") local tool = enemyChar:FindFirstChildOfClass("Tool") if enemyRoot and tool then local enemyLookVector = enemyRoot.CFrame.LookVector local distanceToEnemy = (root.Position - enemyRoot.Position).Magnitude local vectorToMe = (root.Position - enemyRoot.Position).Unit local dotProduct = enemyLookVector:Dot(vectorToMe) if distanceToEnemy <= maxStudsDistance and dotProduct > 0.5 then triggerAutoFly() break end end end end end RunService.RenderStepped:Connect(function() checkThreats() if autoFlying and root and bv and humanoid then local cam = workspace.CurrentCamera local moveVector = Controls:GetMoveVector() local currentSpeed = humanoid.WalkSpeed if moveVector.Magnitude > 0 then local forward = cam.CFrame.LookVector * -moveVector.Z local side = cam.CFrame.RightVector * moveVector.X bv.Velocity = (forward + side).Unit * currentSpeed else bv.Velocity = Vector3.new(0, 0, 0) end humanoid.PlatformStand = true end end) antiSlapBtn.MouseButton1Click:Connect(function() antiSlapEnabled = not antiSlapEnabled if antiSlapEnabled then antiSlapBtn.Text = "ON" antiSlapBtn.TextColor3 = Color3.fromRGB(80, 255, 140) BtnStroke.Color = Color3.fromRGB(80, 255, 140) antiSlapBtn.BackgroundColor3 = Color3.fromRGB(20, 45, 30) else antiSlapBtn.Text = "OFF" antiSlapBtn.TextColor3 = Color3.fromRGB(255, 80, 80) BtnStroke.Color = Color3.fromRGB(255, 80, 80) antiSlapBtn.BackgroundColor3 = Color3.fromRGB(35, 35, 45) stopFly() end end) closebutton.MouseButton1Click:Connect(function() stopFly() main:Destroy() end) local isMini = false mini.MouseButton1Click:Connect(function() isMini = not isMini antiSlapBtn.Visible = not isMini TitleLabel.Visible = not isMini Frame.Size = isMini and UDim2.new(0, 90, 0, 32) or UDim2.new(0, 240, 0, 75) mini.Text = isMini and "+" or "−" end)