Advertisement
Dfgjfj

push system tool script (no hitbox)

Jan 25th, 2025
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. --// This script was writed by allvideo.
  2. local Debris = game:GetService("Debris")
  3.  
  4. local Cooldown = 5
  5. local Debounce = false
  6. local PushPower = 30
  7.  
  8. script.Parent.Activated:connect(function()
  9. local char = script.Parent.Parent
  10. if not Debounce and char and char:FindFirstChild("Humanoid") and char:FindFirstChild("HumanoidRootPart") then
  11. Debounce = true
  12. local Hum = char.Humanoid
  13. local rootpart = char.HumanoidRootPart
  14. local PushAnim = Instance.new("Animation")
  15. PushAnim.AnimationId = "rbxassetid://119810554"
  16. local loadanim = Hum:LoadAnimation(PushAnim)
  17. loadanim:Play()
  18. loadanim:AdjustSpeed(2.5)
  19. task.wait(0.3)
  20. local params = OverlapParams.new()
  21. params.FilterType = Enum.RaycastFilterType.Exclude
  22. params.FilterDescendantsInstances = {char}
  23. local HitboxTarget = workspace:GetPartBoundsInBox(rootpart.CFrame + (rootpart.CFrame.LookVector * 3.5),Vector3.new(5,5,5),params)
  24.  
  25. for i,v in next, HitboxTarget do
  26. if v.Parent and v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("HumanoidRootPart") then
  27. v.Parent.Humanoid.Sit = true
  28. local bodyVelocity = Instance.new("BodyVelocity")
  29. bodyVelocity.Velocity = (v.Parent.HumanoidRootPart.Position - rootpart.Position).unit * PushPower
  30. bodyVelocity.P = math.huge
  31. bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  32. bodyVelocity.Parent = v.Parent.HumanoidRootPart
  33.  
  34. Debris:AddItem(bodyVelocity,0.1)
  35. end
  36. end
  37. task.wait(Cooldown)
  38. Debounce = false
  39. end
  40. end)
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement