Mr_3242

Find Who Slapped (Op script)

May 23rd, 2026 (edited)
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.57 KB | Gaming | 0 0
  1. -- Fixing the script right now
  2.  
  3.  
  4.  
  5. local Players = game:GetService("Players")
  6. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  7. local TweenService = game:GetService("TweenService")
  8.  
  9. local LocalPlayer = Players.LocalPlayer
  10.  
  11. ------------------------------------------------
  12. -- UI LIBRARY
  13. ------------------------------------------------
  14. local UI = loadstring(game:HttpGet(
  15.     "https://pastebin.com/raw/4NHU7v35",
  16.     true
  17. ))()
  18.  
  19. local Window = UI:CreateWindow("Find Who Slapped")
  20.  
  21. ------------------------------------------------
  22. -- STATE
  23. ------------------------------------------------
  24. local AutoDodge = false
  25. local NotifyEnabled = false
  26. local DodgeLoop = false
  27. local Showing = false
  28.  
  29. ------------------------------------------------
  30. -- REMOTES (your own game)
  31. ------------------------------------------------
  32. local Events = ReplicatedStorage:WaitForChild("Events")
  33. local DodgeRemote = Events:WaitForChild("Dodge")
  34. local HitRemote = Events:WaitForChild("Hit")
  35.  
  36. ------------------------------------------------
  37. -- TOGGLES (NOW RELIABLE)
  38. ------------------------------------------------
  39.  
  40. ------------------------------------------------
  41. -- HIT BUTTON
  42. ------------------------------------------------
  43.  
  44. Window:AddButton({
  45.     text = "Perfect Hit",
  46.     callback = function()
  47.         HitRemote:FireServer(0.9)
  48.     end
  49. })
  50.  
  51. Window:AddToggle({
  52.     text = "Auto Dodge",
  53.     state = false,
  54.     callback = function(v)
  55.         AutoDodge = v
  56.         DodgeLoop = v
  57.     end
  58. })
  59.  
  60. Window:AddToggle({
  61.     text = "Notify Who Slapped You",
  62.     state = false,
  63.     callback = function(v)
  64.         NotifyEnabled = v
  65.     end
  66. })
  67.  
  68. ------------------------------------------------
  69. -- AUTO DODGE LOOP
  70. ------------------------------------------------
  71. task.spawn(function()
  72.     local keys = {
  73.         "A","B","C","D","E","F","G","H","I","J",
  74.         "K","L","M","N","O","P","Q","R","S","T",
  75.         "U","V","W","X","Y","Z"
  76.     }
  77.  
  78.     local i = 1
  79.  
  80.     while true do
  81.         task.wait()
  82.  
  83.         if DodgeLoop then
  84.             DodgeRemote:FireServer(keys[i])
  85.  
  86.             i += 1
  87.             if i > #keys then
  88.                 i = 1
  89.             end
  90.         end
  91.     end
  92. end)
  93.  
  94. ------------------------------------------------
  95. -- NOTIFICATION GUI
  96. ------------------------------------------------
  97. local Gui = Instance.new("ScreenGui")
  98. Gui.Name = "HitNotifyGui"
  99. Gui.ResetOnSpawn = false
  100. Gui.Parent = LocalPlayer:WaitForChild("PlayerGui")
  101.  
  102. local Frame = Instance.new("Frame")
  103. Frame.Size = UDim2.new(0, 460, 0, 70)
  104. Frame.Position = UDim2.new(0.5, 0, 0.18, -100)
  105. Frame.AnchorPoint = Vector2.new(0.5, 0.5)
  106. Frame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  107. Frame.BackgroundTransparency = 0.15
  108. Frame.Visible = false
  109. Frame.Parent = Gui
  110.  
  111. Instance.new("UICorner", Frame).CornerRadius = UDim.new(0, 14)
  112.  
  113. local Avatar = Instance.new("ImageLabel")
  114. Avatar.Size = UDim2.new(0, 52, 0, 52)
  115. Avatar.Position = UDim2.new(0, 10, 0.5, 0)
  116. Avatar.AnchorPoint = Vector2.new(0, 0.5)
  117. Avatar.BackgroundTransparency = 1
  118. Avatar.Parent = Frame
  119.  
  120. Instance.new("UICorner", Avatar).CornerRadius = UDim.new(1, 0)
  121.  
  122. local Text = Instance.new("TextLabel")
  123. Text.Size = UDim2.new(1, -80, 1, 0)
  124. Text.Position = UDim2.new(0, 72, 0, 0)
  125. Text.BackgroundTransparency = 1
  126. Text.TextColor3 = Color3.fromRGB(255, 80, 80)
  127. Text.Font = Enum.Font.GothamBold
  128. Text.TextScaled = true
  129. Text.TextXAlignment = Enum.TextXAlignment.Left
  130. Text.Parent = Frame
  131.  
  132. ------------------------------------------------
  133. -- SHOW NOTIFICATION
  134. ------------------------------------------------
  135. local function Show(attacker)
  136.     if not NotifyEnabled then return end
  137.     if Showing then return end
  138.  
  139.     Showing = true
  140.  
  141.     Text.Text = attacker.Name .. " slapped you!"
  142.  
  143.     Avatar.Image = Players:GetUserThumbnailAsync(
  144.         attacker.UserId,
  145.         Enum.ThumbnailType.HeadShot,
  146.         Enum.ThumbnailSize.Size100x100
  147.     )
  148.  
  149.     Frame.Visible = true
  150.  
  151.     TweenService:Create(Frame, TweenInfo.new(0.25), {
  152.         Position = UDim2.new(0.5, 0, 0.18, 0)
  153.     }):Play()
  154.  
  155.     task.wait(3)
  156.  
  157.     TweenService:Create(Frame, TweenInfo.new(0.25), {
  158.         Position = UDim2.new(0.5, 0, 0.18, -100)
  159.     }):Play()
  160.  
  161.     task.wait(0.25)
  162.  
  163.     Frame.Visible = false
  164.     Showing = false
  165. end
  166.  
  167. ------------------------------------------------
  168. -- DAMAGE DETECTION (CLOSEST PLAYER)
  169. ------------------------------------------------
  170. local function Hook(char)
  171.     local hum = char:WaitForChild("Humanoid")
  172.     local root = char:WaitForChild("HumanoidRootPart")
  173.  
  174.     local last = hum.Health
  175.  
  176.     hum.HealthChanged:Connect(function(hp)
  177.         if not NotifyEnabled then
  178.             last = hp
  179.             return
  180.         end
  181.  
  182.         if hp < last then
  183.             local closest, dist = nil, math.huge
  184.  
  185.             for _, p in ipairs(Players:GetPlayers()) do
  186.                 if p ~= LocalPlayer and p.Character and p.Character:FindFirstChild("HumanoidRootPart") then
  187.                     local d = (p.Character.HumanoidRootPart.Position - root.Position).Magnitude
  188.                     if d < dist then
  189.                         dist = d
  190.                         closest = p
  191.                     end
  192.                 end
  193.             end
  194.  
  195.             if closest then
  196.                 Show(closest)
  197.             end
  198.         end
  199.  
  200.         last = hp
  201.     end)
  202. end
  203.  
  204. if LocalPlayer.Character then
  205.     Hook(LocalPlayer.Character)
  206. end
  207.  
  208. LocalPlayer.CharacterAdded:Connect(Hook)
  209.  
  210. ------------------------------------------------
  211. -- LABEL
  212. ------------------------------------------------
  213. Window:AddLabel({
  214.     text = "TikTok: Mr_3242"
  215. })
  216.  
  217. UI:Init()
Tags: delta
Advertisement
Add Comment
Please, Sign In to add comment