Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// This script was writed by allvideo.
- local Debris = game:GetService("Debris")
- local Cooldown = 5
- local Debounce = false
- local PushPower = 30
- script.Parent.Activated:connect(function()
- local char = script.Parent.Parent
- if not Debounce and char and char:FindFirstChild("Humanoid") and char:FindFirstChild("HumanoidRootPart") then
- Debounce = true
- local Hum = char.Humanoid
- local rootpart = char.HumanoidRootPart
- local PushAnim = Instance.new("Animation")
- PushAnim.AnimationId = "rbxassetid://119810554"
- local loadanim = Hum:LoadAnimation(PushAnim)
- loadanim:Play()
- loadanim:AdjustSpeed(2.5)
- task.wait(0.3)
- local hitbox = Instance.new("Part",workspace)
- hitbox.Name = "Hitbox"
- hitbox.Anchored = true
- hitbox.CanCollide = false
- hitbox.CFrame = rootpart.CFrame + (rootpart.CFrame.LookVector * 3.5)
- hitbox.Color = Color3.fromRGB(255,0,0)
- hitbox.Transparency = 0.5
- hitbox.Size = Vector3.new(5,5,5)
- local params = OverlapParams.new()
- params.FilterType = Enum.RaycastFilterType.Exclude
- params.FilterDescendantsInstances = {hitbox,char}
- local HitboxTarget = workspace:GetPartBoundsInBox(hitbox.CFrame,hitbox.Size,params)
- for i,v in next, HitboxTarget do
- if v.Parent and v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("HumanoidRootPart") then
- v.Parent.Humanoid.Sit = true
- local bodyVelocity = Instance.new("BodyVelocity")
- bodyVelocity.Velocity = (v.Parent.HumanoidRootPart.Position - rootpart.Position).unit * PushPower
- bodyVelocity.P = math.huge
- bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- bodyVelocity.Parent = v.Parent.HumanoidRootPart
- Debris:AddItem(bodyVelocity,0.1)
- end
- end
- task.wait(0.3)
- hitbox:Destroy()
- task.wait(Cooldown)
- Debounce = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement