clubstar54

Janken

Apr 22nd, 2016
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. Player = script.Parent.Parent
  2. Char = Player.Character
  3. Torso = Char.Torso
  4. rs,ls,root,neck = Torso["Right Shoulder"],Torso["Left Shoulder"],Char.HumanoidRootPart.RootJoint,Torso.Neck
  5. Go = false
  6. On = false
  7.  
  8. function fakeJoint(joint)
  9. local Part0 = joint.Part0
  10. joint.Part0 = nil
  11. local Joint = Instance.new("Motor6D",game.JointsService)
  12. Joint.Part0 = Part0
  13. Joint.Part1 = joint.Part1
  14. Joint.C0 = joint.C0
  15. Joint.C1 = joint.C1
  16. return Joint
  17. end
  18.  
  19. Tool = Instance.new("Tool",Player.Backpack)
  20. Tool.Name = "Janken"
  21. Tool.CanBeDropped = false
  22. Tool.RequiresHandle = false
  23.  
  24. Tool.Activated:connect(function()
  25. if Go then return end
  26. Go = true
  27. On = true
  28. local RS = fakeJoint(rs)
  29. local LS = fakeJoint(ls)
  30. local Body = fakeJoint(root)
  31. local Neck = fakeJoint(neck)
  32. RS.C0 = rs.C0*CFrame.Angles(math.rad(15),math.rad(70),math.rad(45))
  33. LS.C0 = ls.C0*CFrame.Angles(math.rad(15),math.rad(-70),math.rad(-40))
  34. Body.C0 = root.C0*CFrame.Angles(0,0,math.rad(-45))
  35. Neck.C0 = neck.C0*CFrame.Angles(0,0,math.rad(45))
  36. wait(2)
  37. local Part = Instance.new("Part",Char)
  38. Part.Transparency = 0.2
  39. Part.BrickColor = BrickColor.new("Bright yellow")
  40. if Char.Name == "clubstar54" then
  41. Part.BrickColor = BrickColor.new("Really red")
  42. end
  43. Part.Material = "Neon"
  44. Part.CanCollide = false
  45. Part.TopSurface = "Smooth"
  46. Part.BottomSurface = "Smooth"
  47. Part.FormFactor = "Custom"
  48. Part.Size = Vector3.new(1.8,1.8,1.8)
  49. local Mesh = Instance.new("SpecialMesh",Part)
  50. Mesh.MeshType = "Sphere"
  51. Mesh.Scale = Vector3.new(1,0.9,1)
  52. local W = Instance.new("Weld",game.JointsService)
  53. W.Part0 = Char["Right Arm"]
  54. W.Part1 = Part
  55. W.C0 = CFrame.new(0,-1,0)
  56. spawn(function()
  57. while On do wait()
  58. W.C0 = W.C0*CFrame.Angles(0.5,0.5,0.5)
  59. end
  60. end)
  61. wait(1.5)
  62. Part.Touched:connect(function(Hit)
  63. if Hit.Parent:findFirstChild("Humanoid") ~= nil then
  64. local vHuman = Hit.Parent.Humanoid
  65. if vHuman.Parent ~= Char and vHuman.Parent:findFirstChild(Char.Name) == nil then
  66. local Tag = Instance.new("ObjectValue",vHuman.Parent)
  67. Tag.Name = Char.Name
  68. game.Debris:AddItem(Tag,8)
  69. vHuman.Sit = true
  70. Hit.Velocity = Torso.CFrame.lookVector * 50
  71. vHuman:TakeDamage(45)
  72. spawn(function()
  73. repeat wait() until not On
  74. Tag:Destroy()
  75. end)
  76. end
  77. end
  78. end)
  79. LS:Destroy()
  80. Body:Destroy()
  81. Neck:Destroy()
  82. ls.Part0 = Torso
  83. root.Part0 = Char.HumanoidRootPart
  84. neck.Part0 = Torso
  85. RS.C0 = rs.C0*CFrame.Angles(0,0,math.rad(90))
  86. wait(5)
  87. On = false
  88. Part:Destroy()
  89. wait(1)
  90. RS:Destroy()
  91. rs.Part0 = Torso
  92. wait(4)
  93. Go = false
  94. end)
Advertisement
Add Comment
Please, Sign In to add comment