Advertisement
lafur

Untitled

Jan 18th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. local bin = script.Parent
  2.  
  3. function animate(torso)
  4. local m = torso:FindFirstChild("Right Shoulder")
  5. if m ~= nil then
  6. m.C0 = CFrame.fromEulerAnglesXYZ(-3.14, -4.71, 3.14) + Vector3.new(1, 0.5, 0)
  7. end
  8. m = torso:FindFirstChild("Left Shoulder")
  9. if m ~= nil then
  10. m.C0 = CFrame.fromEulerAnglesXYZ(3.14, 4.71, -3.14) + Vector3.new(-1, 0.5, 0)
  11. end
  12. m = torso:FindFirstChild("Left Hip")
  13. if m ~= nil then
  14. m.C0 = CFrame.fromEulerAnglesXYZ(3.14, 4.71, 3.14) + Vector3.new(-1, -1, 0)
  15. end
  16. m = torso:FindFirstChild("Right Hip")
  17. if m ~= nil then
  18. m.C0 = CFrame.fromEulerAnglesXYZ(3.14, -4.71, 3.14) + Vector3.new(1, -1, 0)
  19. end
  20. end
  21.  
  22. local debound = false
  23.  
  24. function onHit(hit)
  25. if hit.Parent ~= nil then
  26. local human = hit.Parent:FindFirstChild("Humanoid")
  27. if human ~= nil and debound == false then
  28. debound = true
  29. bin.BrickColor = BrickColor.new(21)
  30. bin.Size = Vector3.new(2, .4, 2)
  31. bin.CFrame = bin.Parent.Stand.CFrame + Vector3.new(0, -.2, 0)
  32. local torso = hit.Parent:FindFirstChild("Torso")
  33. if torso ~= nil then
  34. local weld = torso:FindFirstChild("Neck")
  35. if weld ~= nil then
  36. weld.C0 = CFrame.fromEulerAnglesXYZ(1.57, 3.14, 0) + Vector3.new(0, 1, 0)
  37. if torso:FindFirstChild("BodyGyro") ~= nil then
  38. torso.BodyGyro.Parent = nil
  39. end
  40. if torso:FindFirstChild("Gravity") ~= nil then
  41. torso.Gravity.Parent = nil
  42. animate(torso)
  43. end
  44. end
  45. end
  46. wait(3)
  47. bin.BrickColor = BrickColor.new(28)
  48. debound = false
  49. bin.Size = Vector3.new(2, .8, 2)
  50. bin.CFrame = bin.Parent.Stand.CFrame + Vector3.new(0, -.4, 0)
  51. end
  52. end
  53. end
  54.  
  55. bin.Touched:connect(onHit)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement