SHARE
TWEET

no

a guest Jun 17th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ocal plr = game.Players.LocalPlayer local char = plr.Character or plr.CharacterAdded:wait() local tool = script.Parent local swing = tool:WaitForChild("Swing") local canattack = tool:WaitForChild("CanAttack") tool.Equipped:connect(function() local idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle) idle:Play() end) tool.Activated:connect(function() local choose = math.random(1,2) if choose == 1 then canattack.Value = false local s1animation = script.Parent.Parent.Humanoid:LoadAnimation(script.Punch1) swing:Play() s1animation:Play() elseif choose == 2 then canattack.Value = false local s2animation = script.Parent.Parent.Humanoid:LoadAnimation(script.Punch2) swing:Play() s2animation:Play() end end) tool.Deactivated:connect(function() canattack.Value = true end) tool.Unequipped:connect(function() local hum = char:WaitForChild("Humanoid") for _,anim in pairs(hum:GetPlayingAnimationTracks()) do anim:Stop() end end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top