Bestmmm22

Untitled

Aug 27th, 2025
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.65 KB | None | 0 0
  1. -- Perfect Block & Anti SLAP Script
  2. -- Dibuat khusus sesuai permintaanmu <3
  3.  
  4. local Players = game:GetService("Players")
  5. local UserInputService = game:GetService("UserInputService")
  6. local RunService = game:GetService("RunService")
  7.  
  8. local player = Players.LocalPlayer
  9. local character = player.Character or player.CharacterAdded:Wait()
  10. local humanoid = character:WaitForChild("Humanoid")
  11. local rootPart = character:WaitForChild("HumanoidRootPart")
  12.  
  13. -- Config
  14. local PERFECT_BLOCK_RADIUS = 15
  15. local blocking = false
  16.  
  17. -- Fungsi untuk mulai block
  18. local function startBlock()
  19.     if not blocking then
  20.         blocking = true
  21.         -- Bisa diganti animasi / efek block disini
  22.         print("Blocking!")
  23.     end
  24. end
  25.  
  26. -- Fungsi untuk berhenti block
  27. local function stopBlock()
  28.     if blocking then
  29.         blocking = false
  30.         print("Stop Blocking!")
  31.     end
  32. end
  33.  
  34. -- Perfect Block (radius 15)
  35. RunService.RenderStepped:Connect(function()
  36.     for _, enemy in pairs(Players:GetPlayers()) do
  37.         if enemy ~= player and enemy.Character and enemy.Character:FindFirstChild("HumanoidRootPart") then
  38.             local enemyHRP = enemy.Character.HumanoidRootPart
  39.             local distance = (enemyHRP.Position - rootPart.Position).Magnitude
  40.            
  41.             if distance <= PERFECT_BLOCK_RADIUS then
  42.                 startBlock()
  43.                 return
  44.             end
  45.         end
  46.     end
  47.     stopBlock()
  48. end)
  49.  
  50. -- Anti SLAP (hapus ragdoll atau velocity berlebihan)
  51. humanoid.StateChanged:Connect(function(_, state)
  52.     if state == Enum.HumanoidStateType.Physics then
  53.         humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
  54.     end
  55. end)
  56.  
  57. character.DescendantAdded:Connect(function(desc)
  58.     if desc:IsA("BodyVelocity") or desc:IsA("BodyThrust") then
  59.         desc:Destroy()
  60.     end
  61. end)
Advertisement
Add Comment
Please, Sign In to add comment