Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Perfect Block & Anti SLAP Script
- -- Dibuat khusus sesuai permintaanmu <3
- local Players = game:GetService("Players")
- local UserInputService = game:GetService("UserInputService")
- local RunService = game:GetService("RunService")
- local player = Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local rootPart = character:WaitForChild("HumanoidRootPart")
- -- Config
- local PERFECT_BLOCK_RADIUS = 15
- local blocking = false
- -- Fungsi untuk mulai block
- local function startBlock()
- if not blocking then
- blocking = true
- -- Bisa diganti animasi / efek block disini
- print("Blocking!")
- end
- end
- -- Fungsi untuk berhenti block
- local function stopBlock()
- if blocking then
- blocking = false
- print("Stop Blocking!")
- end
- end
- -- Perfect Block (radius 15)
- RunService.RenderStepped:Connect(function()
- for _, enemy in pairs(Players:GetPlayers()) do
- if enemy ~= player and enemy.Character and enemy.Character:FindFirstChild("HumanoidRootPart") then
- local enemyHRP = enemy.Character.HumanoidRootPart
- local distance = (enemyHRP.Position - rootPart.Position).Magnitude
- if distance <= PERFECT_BLOCK_RADIUS then
- startBlock()
- return
- end
- end
- end
- stopBlock()
- end)
- -- Anti SLAP (hapus ragdoll atau velocity berlebihan)
- humanoid.StateChanged:Connect(function(_, state)
- if state == Enum.HumanoidStateType.Physics then
- humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
- end
- end)
- character.DescendantAdded:Connect(function(desc)
- if desc:IsA("BodyVelocity") or desc:IsA("BodyThrust") then
- desc:Destroy()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment