Advertisement
Hebablazin

AxeWork

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