Advertisement
rubikz

Untitled

Aug 20th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. t = Instance.new("Tool")
  2. t.Parent = game.Players.RubikzCube.Backpack
  3. t.Name = "Claw"
  4.  
  5. local handlee = Instance.new("Part")
  6. handlee.Name = "Handle"
  7. handlee.Parent = t
  8. handlee.BrickColor = BrickColor.new("Really black")
  9. handlee.Size = Vector3.new(1, 1, 2)
  10. handlee.TopSurface = "Smooth"
  11. handlee.BottomSurface = "Smooth"
  12. handlee.Transparency = 0
  13. handlee.Reflectance = 0
  14. -----------------------------------------mesh
  15. m = Instance.new("BlockMesh")
  16. m.Parent = handlee
  17. m.Scale = Vector3.new(0.2, 0.2, 1)
  18. -----------------------------------------Brick2
  19. local brick3 = Instance.new("Part")
  20. brick3.Name = "Part"
  21. brick3.Parent = t
  22. brick3.formFactor = "Plate"
  23. brick3.BrickColor = BrickColor.new("Really black")
  24. brick3.Size = Vector3.new(1, 1, 2)
  25. brick3.TopSurface = "Smooth"
  26. brick3.BottomSurface = "Smooth"
  27. brick3.Transparency = 0
  28. brick3.Reflectance = 0
  29. -----------------------------------------mesh
  30. m = Instance.new("BlockMesh")
  31. m.Parent = brick3
  32. m.Scale = Vector3.new(0.2, 0.2, 1)
  33. -----------------------------------------weld
  34. w2 = Instance.new("Weld")
  35. w2.Parent = handlee
  36. w2.Part0 = brick3
  37. w2.Part1 = handlee
  38. w2.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) + Vector3.new(-0.3, 0, 0)
  39. -----------------------------------------Brick2
  40. local brick4 = Instance.new("Part")
  41. brick4.Name = "Part"
  42. brick4.Parent = t
  43. brick4.formFactor = "Plate"
  44. brick4.BrickColor = BrickColor.new("Really black")
  45. brick4.Size = Vector3.new(1, 1, 2)
  46. brick4.TopSurface = "Smooth"
  47. brick4.BottomSurface = "Smooth"
  48. brick4.Transparency = 0
  49. brick4.Reflectance = 0
  50. -----------------------------------------mesh
  51. m = Instance.new("BlockMesh")
  52. m.Parent = brick4
  53. m.Scale = Vector3.new(0.2, 0.2, 1)
  54. -----------------------------------------weld
  55. w2 = Instance.new("Weld")
  56. w2.Parent = handlee
  57. w2.Part0 = brick4
  58. w2.Part1 = handlee
  59. w2.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) + Vector3.new(0.3, 0, 0)
  60.  
  61. ---------------------Part 2
  62. ---------------------Part 2
  63. ---------------------Part 2
  64.  
  65. r = game:service("RunService")
  66.  
  67.  
  68. local damage = 100000
  69.  
  70.  
  71. local slash_damage = 100000
  72.  
  73.  
  74. sword = brick4
  75. Tool = t
  76.  
  77. function attack()
  78. local anim = Instance.new("StringValue")
  79. anim.Name = "toolanim"
  80. anim.Value = "Slash"
  81. anim.Parent = Tool
  82. end
  83.  
  84.  
  85. function swordUp()
  86. Tool.GripForward = Vector3.new(-1,0,0)
  87. Tool.GripRight = Vector3.new(0,1,0)
  88. Tool.GripUp = Vector3.new(0,0,1)
  89. end
  90.  
  91. function swordOut()
  92. Tool.GripForward = Vector3.new(0,0,1)
  93. Tool.GripRight = Vector3.new(0,-1,0)
  94. Tool.GripUp = Vector3.new(-1,0,0)
  95. end
  96.  
  97.  
  98.  
  99. Tool.Enabled = true
  100.  
  101. function onActivated()
  102.  
  103. if not Tool.Enabled then
  104. return
  105. end
  106.  
  107. Tool.Enabled = false
  108.  
  109. local character = Tool.Parent;
  110. local humanoid = character.Humanoid
  111. if humanoid == nil then
  112. print("Humanoid not found")
  113. return
  114. end
  115.  
  116.  
  117.  
  118. attack()
  119.  
  120. wait()
  121.  
  122. Tool.Enabled = true
  123. end
  124.  
  125.  
  126. function onEquipped()
  127.  
  128. end
  129.  
  130.  
  131. ------part 3
  132. ------part 3
  133. ------part 3
  134. function onTouched(hit)
  135. h = hit.Parent:findFirstChild("Humanoid")
  136. if h ~= nil then
  137. h:TakeDamage(25)
  138. end
  139. end
  140.  
  141.  
  142. Tool.Activated:connect(onActivated)
  143. Tool.Equipped:connect(onEquipped)
  144. sword.Touched:connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement