Advertisement
BenjaminPlays

Deflective Sword - ROBLOX

Sep 29th, 2020
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. function blow(hit)
  2. if (hit.Parent == nil) then return end --Happens when bullet hits a sword.--
  3.  
  4. local humanoid = hit.Parent:findFirstChild("Humanoid")
  5. local vCharacter = Tool.Parent
  6. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  7. local hum = vCharacter:findFirstChild("Humanoid") --If tool still held by character it will do final check if sword is in hand.--
  8.  
  9. local right_arm = vCharacter:FindFirstChild("Right Arm")
  10. if (right_arm) ~=nil) then
  11. local joint = right_arm:FindFirstChild("RightGrip")
  12. if (joint ~= nil and (joint.Part0 == sword or joint.Part == sword)) then
  13. tagHumanoid (humanoid, vPlayer)
  14. humanoid:TakeDamage(damage)
  15. wait (1)
  16. untagHumanoid(humanoid
  17. end
  18. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement