Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- debounce = false
- script.Parent.Activated:connect(function(activetee)
- if debounce == false then
- debounce = true
- local pchar = script.Parent.Parent
- local defsped = 16
- local defjump = 50
- local anim = script.Animation
- local animfrick = anim.AnimationId
- local phum = pchar.Humanoid:LoadAnimation(anim)
- phum:Play()
- pchar.RightUpperArm.CanCollide = false
- pchar.RightLowerArm.CanCollide = false
- pchar.RightHand.CanCollide = false
- pchar.HumanoidRootPart.CanCollide = false
- pchar.Humanoid.WalkSpeed = 8
- pchar.Humanoid.JumpPower = 8
- wait(0.3)
- pchar.RightUpperArm.CanCollide = true
- pchar.RightLowerArm.CanCollide = true
- pchar.RightHand.CanCollide = true
- pchar.HumanoidRootPart.CanCollide = true
- pchar.Humanoid.WalkSpeed = defsped
- pchar.Humanoid.JumpPower = defjump
- debounce2 = false
- script.Parent.Handle.Touched:connect(function(hit)
- if debounce2 == false then
- debounce2 = true
- if hit.Name == pchar.Name then
- else
- local crit = math.random(1,5)
- if crit == 1 then
- local hum1 = hit.Parent:FindFirstChild("Humanoid")
- if hum1 then
- hum1:TakeDamage(15)
- else
- end
- else
- local hum1 = hit.Parent:FindFirstChild("Humanoid")
- if hum1 then
- hum1:TakeDamage(5)
- else
- end
- end
- end
- wait(0.7)
- debounce2 = false
- end
- end)
- wait(0.7)
- debounce = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement