Advertisement
astronaut32

antibow

Jan 10th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.31 KB | None | 0 0
  1. me = game.Players.PabloRV
  2.  
  3. local h = Instance.new("HopperBin",me.Backpack)
  4. h.Name = "PL thing"
  5. script.Parent = h
  6.  
  7. sp = script.Parent
  8. eq = false
  9.  
  10. function weld(w, p, p0, p1, a, b, c, x, y, z)
  11. w.Parent = p
  12. w.Part0 = p0
  13. w.Part1 = p1
  14. w.C1 = CFrame.fromEulerAnglesXYZ(a,b,c) * CFrame.new(x,y,z)
  15. end
  16.  
  17. function prop(part, parent, collide, tran, ref, x, y, z, color)
  18. part.Parent = parent
  19. part.formFactor = 0
  20. part.CanCollide = collide
  21. part.Transparency = tran
  22. part.Reflectance = ref
  23. part.Size = Vector3.new(x,y,z)
  24. part.BrickColor = BrickColor.new(color)
  25. part:BreakJoints()
  26. end
  27.  
  28. function mesh(mesh, parent, x, y, z, type)
  29. mesh.Parent = parent
  30. mesh.Scale = Vector3.new(x, y, z)
  31. mesh.MeshType = type
  32. end
  33.  
  34. bricka = Instance.new("Part")
  35. prop(bricka,me.Character,false,1,0,1,1,1,"Grey")
  36.  
  37. brickb = Instance.new("Part")
  38. prop(brickb,me.Character,false,1,0,1,1,1,"Grey")
  39.  
  40. wel = Instance.new("Weld")
  41. weld(wel,me.Character.Torso,me.Character.Torso,bricka,0,0,0,0.7,-0.5,0)
  42.  
  43. wel2 = Instance.new("Weld")
  44. weld(wel2,me.Character.Torso,me.Character.Torso,brickb,0,0,0,-1,-0.5,0)
  45.  
  46. larm = Instance.new("Weld")
  47. weld(larm,bricka,nil,nil,-1.57,0.67,0,-0.3,0,1.2)
  48.  
  49. rarm = Instance.new("Weld")
  50. weld(rarm,brickb,nil,nil,-1.57,-0.4,0,-0.2,0,0)
  51.  
  52. wand = Instance.new("Model",sp)
  53. wand.Name = "Wand"
  54.  
  55. main = Instance.new("Part")
  56. prop(main, wand, false, 0, 0, 1, 2, 1, "Reddish brown")
  57. mame = Instance.new("SpecialMesh")
  58. mesh(mame, main, 0.45, 1, 0.45, "Head")
  59.  
  60. white = Instance.new("Part")
  61. prop(white, wand, false, 0, 0, 1, 1, 1, "Reddish brown")
  62. wime = Instance.new("SpecialMesh")
  63. mesh(wime, white, 0.43, 1.8, 0.43, "Head")
  64.  
  65.  
  66. wite = Instance.new("Part")
  67. prop(wite, wand, false, 0, 0, 1, 1, 1, "Reddish brown")
  68. wie = Instance.new("SpecialMesh")
  69. mesh(wie, wite, 0.43, 1.8, 0.43, "Head")
  70.  
  71. mainstring = Instance.new("Part")
  72. prop(mainstring, wand, false, 0, 0, 1, 1, 1, "White")
  73. str = Instance.new("SpecialMesh")
  74. mesh(str, mainstring, 0.1, 4.5, 0.1, "Head")
  75.  
  76. string1 = Instance.new("Part")
  77. prop(string1, wand, false, 1, 0, 1, 1, 1, "White")
  78. stri1 = Instance.new("SpecialMesh")
  79. mesh(stri1, string1, 0.1, 2.47, 0.1, "Head")
  80.  
  81. string2 = Instance.new("Part")
  82. prop(string2, wand, false, 1, 0, 1, 1, 1, "White")
  83. stri2 = Instance.new("SpecialMesh")
  84. mesh(stri2, string2, 0.1, 2.47, 0.1, "Head")
  85.  
  86. arrow = Instance.new("Part")
  87. prop(arrow, wand, false, 0, 0, 1, 1, 4, "Brown")
  88. arr = Instance.new("SpecialMesh")
  89. mesh(arr, arrow, 0.25, 0.25, 1, "Brick")
  90.  
  91. armwelds = {}
  92.  
  93. function shoot(left,right)
  94. for i=1, 8 do
  95. left.C0 = left.C0 * CFrame.fromEulerAnglesXYZ(0,0.04,0) * CFrame.new(0,0,0)
  96. right.C0 = right.C0 * CFrame.fromEulerAnglesXYZ(0,-0.08,0) * CFrame.new(-0.02,0,0.04)
  97. wait()
  98. end
  99. string2.Transparency = 0
  100. string1.Transparency = 0
  101. mainstring.Transparency = 1
  102. for i=1, 4 do
  103. left.C0 = left.C0 * CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  104. right.C0 = right.C0 * CFrame.fromEulerAnglesXYZ(0,-0.08,0) * CFrame.new(-0.02,0,0.04)
  105. wait()
  106. end
  107. wait(0.9)
  108. string2.Transparency = 1
  109. string1.Transparency = 1
  110. mainstring.Transparency = 0
  111. left.C0 = CFrame.new(0,0,0)
  112. right.C0 = CFrame.new(0,0,0)
  113. end
  114.  
  115. armh = {}
  116. function select(mouse)
  117. wand.Parent = me.Character
  118. local weld1 = Instance.new("Weld")
  119. weld(weld1,main,main,white,-0.6,0,0,0,-1.6,-0.5)
  120. local weld2 = Instance.new("Weld")
  121. weld(weld2,main,main,wite,0.6,0,0,0,1.6,-0.5)
  122. local weld3 = Instance.new("Weld")
  123. weld(weld3,main,main,mainstring,0,0,0,0,0,-1)
  124. local weld4 = Instance.new("Weld")
  125. weld(weld4,main,main,string1,-0.5,0,0,0,1,-1.4)
  126. local weld4 = Instance.new("Weld")
  127. weld(weld4,main,main,string2,0.5,0,0,0,-1,-1.45)
  128. local weld5 = Instance.new("Weld")
  129. weld(weld5,me.Character["Right Arm"],me.Character["Right Arm"],arrow,1.57,0,0,0,2.6,0)
  130.  
  131. larm.Part0 = larm.Parent
  132. larm.Part1 = me.Character["Left Arm"]
  133. rarm.Part0 = rarm.Parent
  134. rarm.Part1 = me.Character["Right Arm"]
  135. local armweld = Instance.new("Weld")
  136. weld(armweld,me.Character["Left Arm"],me.Character["Left Arm"],main,1.57,0,1,-0.3,1.1,0.2)
  137. table.insert(armwelds,armweld)
  138. mouse.Button1Down:connect(function()
  139. shoot(larm,rarm)
  140. end)
  141. end
  142.  
  143. function desel()
  144. wand.Parent = sp
  145. larm.Part0 = nil
  146. larm.Part1 = nil
  147. rarm.Part0 = nil
  148. rarm.Part1 = nil
  149. for i=1, #armwelds do
  150. armwelds[i]:remove()
  151. end
  152. end
  153.  
  154. sp.Selected:connect(select)
  155. sp.Deselected:connect(desel)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement