Advertisement
memberhero

Untitled

May 8th, 2016
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.18 KB | None | 0 0
  1. local name = memberhero
  2.  
  3. local ld = game.Players[name].Character:findFirstChild("Axe")
  4. if ld then
  5. ld:remove()
  6. end
  7.  
  8. local me = game.Players[name]
  9.  
  10. pcall(function() me.Character:findFirstChild("Axe",true).Parent = nil end)
  11.  
  12.  
  13. axe = Instance.new("Model")
  14. axe.Parent = me.Character
  15. axe.Name = "Axe"
  16.  
  17. -------Arm connects------------------------------------------------------
  18.  
  19. brick1 = Instance.new("Part")
  20. brick1.Parent = axe
  21. brick1.Shape = "Ball"
  22. brick1.Size = Vector3.new(1,1,1)
  23. brick1.Transparency = 1
  24. mesh1 = Instance.new("SpecialMesh")
  25. mesh1.Parent = brick1
  26. mesh1.MeshType = "Sphere"
  27. mesh1.Scale = Vector3.new(1.3,1.3,1.3)
  28. brick2 = brick1:clone()
  29. brick2.Parent = axe
  30.  
  31. torsohold1 = Instance.new("Weld")
  32. torsohold1.Parent = me.Character.Torso
  33. torsohold1.Part0 = torsohold1.Parent
  34. torsohold1.Part1 = brick1
  35. torsohold1.C1 = CFrame.new(-1.5,-0.5,0)
  36.  
  37. torsohold2 = Instance.new("Weld")
  38. torsohold2.Parent = me.Character.Torso
  39. torsohold2.Part0 = torsohold2.Parent
  40. torsohold2.Part1 = brick2
  41. torsohold2.C1 = CFrame.new(1.5,-0.5,0)
  42.  
  43. rightoriginal = CFrame.fromEulerAnglesXYZ(-1.1,-0.7,-0.7) * CFrame.new(0.3,0.6,0.2)
  44. leftoriginal = CFrame.fromEulerAnglesXYZ(-1,0.6,0) * CFrame.new(-0.6,0.3,0.5)
  45.  
  46. rarm = me.Character["Right Arm"]
  47. larm = me.Character["Left Arm"]
  48.  
  49. rw = Instance.new("Weld")
  50. rw.Parent = brick1
  51. rw.Part0 = nil
  52. rw.Part1 = nil
  53. rw.C1 = rightoriginal
  54.  
  55. lw = Instance.new("Weld")
  56. lw.Parent = brick2
  57. lw.Part0 = nil
  58. lw.Part1 = nil
  59. lw.C1 = leftoriginal
  60.  
  61. wephold = Instance.new("Weld")
  62. wephold.Parent = me.Character.Torso
  63. wephold.Part0 = wephold.Parent
  64. wephold.Part1 = nil
  65. wephold.C1 = CFrame.new(0,0,-0.6) * CFrame.fromEulerAnglesXYZ(0,0,-2.5)
  66.  
  67. --Handles------------------------------------------------------------------------
  68.  
  69. function property(part, number, color)
  70. part.Parent = axe
  71. part.formFactor = 0
  72. part.TopSurface = 0
  73. part.BottomSurface = 0
  74. part.Name = "Handle"..number
  75. part.Size = Vector3.new(1,1,1)
  76. part.BrickColor = BrickColor.new(color)
  77. part.CanCollide = false
  78. end
  79.  
  80. function mesh(part, mesh, x, y, z)
  81. mesh.Scale = Vector3.new(x,y,z)
  82. mesh.Parent = part
  83. end
  84.  
  85. function weld(weld, part, part1, a, b, c, x, y, z)
  86. weld.Parent = part
  87. weld.Part0 = weld.Parent
  88. weld.Part1 = part1
  89. weld.C1 = CFrame.fromEulerAnglesXYZ(x,y,z) * CFrame.new(a,b,c)
  90. end
  91.  
  92. mainhandle = Instance.new("Part")
  93. property(mainhandle, 1, "Brown")
  94. mainhandle.Size = Vector3.new(1,4,1)
  95.  
  96. mesha = Instance.new("SpecialMesh")
  97. mesha.MeshType = "Head"
  98. mesh(mainhandle, mesha, 0.4, 1, 0.4)
  99.  
  100. wephold.Part1 = mainhandle
  101.  
  102. handlea = Instance.new("Part")
  103. property(handlea, 2, "Dark metallic")
  104. meshb = Instance.new("CylinderMesh")
  105. mesh(handlea, meshb, 0.85, 0.16, 0.85)
  106.  
  107. troll = {}
  108.  
  109. for i=-0.5, 0.6, 0.47 do
  110. handleb = Instance.new("Part")
  111. property(handleb, 3, "Dark grey metallic")
  112. handleb.Size = Vector3.new(2,1,1)
  113. handleb.CanCollide = true
  114. meshc = Instance.new("SpecialMesh")
  115. meshc.MeshType = "Brick"
  116. mesh(handleb, meshc, 1.5, 0.13, 0.8)
  117. waldy = Instance.new("Weld")
  118. weld(waldy, handlea, handleb, 0, 0, 0, 0, i, 0)
  119. table.insert(troll,handleb)
  120. end
  121.  
  122. handlec = Instance.new("Part")
  123. property(handlec, 4, "Dark metallic")
  124. meshd = Instance.new("SpecialMesh")
  125. mesh(handlec, meshd, 0.52,0.9,0.52)
  126.  
  127. --arm weapon weld-----------------------------------
  128.  
  129. armweld = Instance.new("Weld")
  130. weld(armweld, rarm, nil, 0, 1.1, 1.2, 1.57, 0, 2)
  131.  
  132. --Handle welds--------------------------------------
  133.  
  134. hweld1 = Instance.new("Weld")
  135. weld(hweld1, mainhandle, handlea, 0, -1.35, 0, 1.57, 0, 0)
  136.  
  137. hweld2 = Instance.new("Weld")
  138. weld(hweld2, handlea, handlec, 0, 0, 0, 1.57, 0, 0)
  139.  
  140. --blood effect------------------------------
  141.  
  142. function blood(part)
  143. for i=1, 4 do
  144. local b = Instance.new("Part")
  145. b.Parent = workspace
  146. b.formFactor = "Plate"
  147. b.Size = Vector3.new(1,0.4,1)
  148. b.BrickColor = BrickColor.new(21)
  149. b.TopSurface = 0
  150. b.BottomSurface = 0
  151. b.CanCollide = false
  152. b.Velocity = Vector3.new(math.random(-20,20),math.random(0,40),math.random(-20,20))
  153. b.RotVelocity = Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  154. local m = Instance.new("SpecialMesh")
  155. m.MeshType = "Brick"
  156. m.Parent = b
  157. m.Scale = Vector3.new(0.5,0.4,0.5)
  158. b.CFrame = CFrame.new(part.Position)
  159. b.Anchored = false
  160. b:breakJoints()
  161. coroutine.resume(coroutine.create(function()
  162. wait(3)
  163. b:remove()
  164. end))
  165. end
  166. end
  167.  
  168. sele = false
  169. --KILL FUNCTION-------------------------------------------
  170.  
  171. hitting = false
  172. swinging = false
  173.  
  174. troll[2].Touched:connect(function(hit)
  175. if hitting == false then return end
  176. local hu = hit.Parent:findFirstChild("Humanoid")
  177. if hu ~= nil then
  178. hu.Health = hu.Health - 10
  179. blood(hit)
  180. end
  181. end)
  182.  
  183. function att2(r,l,wp)
  184. swinging = true
  185. for i=1, 6 do
  186. r.C0 = r.C0 * CFrame.fromEulerAnglesXYZ(0.15,-0.3,-0.05)
  187. l.C0 = l.C0 * CFrame.fromEulerAnglesXYZ(0.3,-0.2,0)
  188. wp.C0 = wp.C0 * CFrame.fromEulerAnglesXYZ(0.2,0,0)
  189. wait(0.1)
  190. end
  191. r.C0 = CFrame.new(0,0,0)
  192. l.C0 = CFrame.new(0,0,0)
  193. wp.C0 = CFrame.new(0,0,0)
  194. swinging = false
  195. end
  196.  
  197. colors = {"Black", "Bright blue", "Light blue", "Navy blue", "Deep blue", "White"}
  198. numba = #colors
  199.  
  200. if script.Parent.className ~= "HopperBin" then
  201. h = Instance.new("HopperBin")
  202. h.Parent = game.Players[name].Backpack
  203. h.Name = "Ax"
  204. script.Parent = h
  205. end
  206.  
  207. bin = script.Parent
  208.  
  209. function selected(mouse)
  210. sele = true
  211. coroutine.resume(coroutine.create(function()
  212. while sele == true do
  213. wait()
  214. local koko = math.random(-400.0,400.0)/1000
  215. local kokoe = math.random(-400.0,400.0)/1000
  216. local kokoq = math.random(-400.0,400.0)/1000
  217. local k = Instance.new("Part")
  218. k.Parent = workspace
  219. k.formFactor = "Plate"
  220. k.Size = Vector3.new(1,0.4,1)
  221. k.TopSurface = 0
  222. k.BottomSurface = 0
  223. k.Transparency = 0.4
  224. k.Anchored = true
  225. k.CanCollide = false
  226. k.CFrame = handlea.CFrame * CFrame.new(kokoe,kokoq,koko)
  227. k.CFrame = k.CFrame * CFrame.Angles(math.random(-32,32)/10,math.random(-32,32)/10,math.random(-32,32)/10)
  228. k.BrickColor = BrickColor.new(colors[math.random(1,numba)])
  229. local po = Instance.new("SpecialMesh")
  230. po.Parent = k
  231. po.MeshType = "Sphere"
  232. local okok = math.random(15,40)/100
  233. po.Scale = Vector3.new(okok*1.2,okok*0.9,okok*1.1)
  234. coroutine.resume(coroutine.create(function()
  235. for i=1, 12 do
  236. wait()
  237. k.Transparency = k.Transparency + 0.05
  238. end
  239. k:remove()
  240. end))
  241. end
  242. end))
  243. rw.Part0 = rw.Parent
  244. rw.Part1 = rarm
  245. for i=1, 6 do
  246. wait(0.03)
  247. rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(-0.4,0,0.1)
  248. end
  249. for i=1, 6 do
  250. wait(0.03)
  251. rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(-0.12,0.1,-0.24)
  252. end
  253. armweld.Part1 = mainhandle
  254. wephold.Part0 = nil
  255. wephold.Part1 = nil
  256. wait(0.05)
  257. for i=1, 7 do
  258. wait(0.03)
  259. rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(0.3,0.25,0.1)
  260. end
  261. lw.Part0 = lw.Parent
  262. lw.Part1 = larm
  263. rw.C0 = CFrame.new(0,0,0)
  264. mouse.KeyDown:connect(function(key)
  265. if swinging then return end
  266. key = key:lower()
  267. if (key == "q") then
  268. swinging = true
  269. for i=1, 6 do
  270. rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(0.3,-0.1,-0.2)
  271. lw.C0 = lw.C0 * CFrame.fromEulerAnglesXYZ(0.08,0,0.12)
  272. wait(0.04)
  273. end
  274. wait(0.05)
  275. hitting = true
  276. for i=1, 6 do
  277. rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(-0.3,-0.02,0.4)
  278. lw.C0 = lw.C0 * CFrame.fromEulerAnglesXYZ(-0.15,0,-0.25)
  279. wait(0.03)
  280. end
  281. wait(0.1)
  282. hitting = false
  283. for i=1, 3 do
  284. rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(0.3,0.15,-0.1)
  285. lw.C0 = lw.C0 * CFrame.fromEulerAnglesXYZ(0.15,0.1,0.25)
  286. wait(0.03)
  287. end
  288. rw.C0 = CFrame.new(0,0,0)
  289. lw.C0 = CFrame.new(0,0,0)
  290. swinging = false
  291. elseif (key == "e") then
  292. function att2(rw,lw,armweld)
  293. end
  294. end
  295. end)
  296. end
  297.  
  298. function desel()
  299. sele = false
  300. lw.Part0 = nil
  301. lw.Part1 = nil
  302. for i=1, 7 do
  303. wait(0.03)
  304. rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(-0.2,-0.1,0.05)
  305. end
  306. for i=1, 5 do
  307. wait(0.03)
  308. rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(-0.3,-0.15,-0.2)
  309. end
  310. wait(0.03)
  311. rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(-0.2,0.2,0.2)
  312. wait(0.02)
  313. wephold.Part0 = wephold.Parent
  314. wephold.Part1 = mainhandle
  315. armweld.Part1 = nil
  316. wait(0.07)
  317. for i=1, 4 do
  318. wait(0.03)
  319. rw.C0 = rw.C0 * CFrame.fromEulerAnglesXYZ(0.3,0.25,0.1)
  320. end
  321. rw.C0 = CFrame.new(0,0,0)
  322. rw.Part0 = nil
  323. rw.Part1 = nil
  324. end
  325.  
  326. bin.Selected:connect(selected)
  327. bin.Deselected:connect(desel)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement