Advertisement
BINO2002

Untitled

Aug 10th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.55 KB | None | 0 0
  1.  
  2. --[[
  3.  
  4. Herex's Mechanic Gauntlets
  5.  
  6. Heyo, Fen's first 2014 script. If ever you want details of Herex, who he is, and his backstory,
  7.  
  8. just message me.
  9.  
  10. ]]
  11.  
  12. Player = game:GetService("Players").Ihaxsm
  13.  
  14. Character = Player.Character
  15.  
  16. PlayerGui = Player.PlayerGui
  17.  
  18. Backpack = Player.Backpack
  19.  
  20. Torso = Character.Torso
  21.  
  22. Head = Character.Head
  23.  
  24. Humanoid = Character.Humanoid
  25.  
  26. LeftArm = Character["Left Arm"]
  27.  
  28. LeftLeg = Character["Left Leg"]
  29.  
  30. RightArm = Character["Right Arm"]
  31.  
  32. RightLeg = Character["Right Leg"]
  33.  
  34. LS = Torso["Left Shoulder"]
  35.  
  36. LH = Torso["Left Hip"]
  37.  
  38. RS = Torso["Right Shoulder"]
  39.  
  40. RH = Torso["Right Hip"]
  41.  
  42. Neck = Torso.Neck
  43.  
  44. it=Instance.new
  45.  
  46. vt=Vector3.new
  47.  
  48. cf=CFrame.new
  49.  
  50. euler=CFrame.fromEulerAnglesXYZ
  51.  
  52. angles=CFrame.Angles
  53.  
  54. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  55.  
  56. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  57.  
  58. RootPart=Character.HumanoidRootPart
  59.  
  60. RootJoint=RootPart.RootJoint
  61.  
  62. RootCF=euler(-1.57,0,3.14)
  63.  
  64. attack = false
  65.  
  66. attackdebounce = false
  67.  
  68. MMouse=nil
  69.  
  70. combo=0
  71.  
  72. Mode="Normal"
  73.  
  74. throwcube=false
  75.  
  76. --player
  77.  
  78. player = nil
  79.  
  80. --save shoulders
  81.  
  82. RSH, LSH = nil, nil
  83.  
  84. --welds
  85.  
  86. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  87.  
  88. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  89.  
  90. local AnimJoints = {}
  91.  
  92. table.insert(AnimJoints,RW)
  93.  
  94. table.insert(AnimJoints,LW)
  95.  
  96.  
  97.  
  98.  
  99.  
  100. if Character:findFirstChild("Mechanic Gauntlets",true) ~= nil then
  101.  
  102. Character:findFirstChild("Mechanic Gauntlets",true).Parent = nil
  103.  
  104. end
  105.  
  106.  
  107.  
  108.  
  109.  
  110. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  111.  
  112. local fp = it("Part")
  113.  
  114. fp.formFactor = formfactor
  115.  
  116. fp.Parent = parent
  117.  
  118. fp.Reflectance = reflectance
  119.  
  120. fp.Transparency = transparency
  121.  
  122. fp.CanCollide = false
  123.  
  124. fp.Locked=true
  125.  
  126. fp.BrickColor = brickcolor
  127.  
  128. fp.Name = name
  129.  
  130. fp.Size = size
  131.  
  132. fp.Position = Torso.Position
  133.  
  134. fp.BottomSurface="Smooth"
  135.  
  136. fp.TopSurface="Smooth"
  137.  
  138. fp:BreakJoints()
  139.  
  140. return fp
  141.  
  142. end
  143.  
  144.  
  145.  
  146. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  147.  
  148. local mesh = it(Mesh)
  149.  
  150. mesh.Parent = part
  151.  
  152. if Mesh=="SpecialMesh" then
  153.  
  154. mesh.MeshType = meshtype
  155.  
  156. mesh.MeshId = meshid
  157.  
  158. end
  159.  
  160. mesh.Offset=offset
  161.  
  162. mesh.Scale=scale
  163.  
  164. return mesh
  165.  
  166. end
  167.  
  168.  
  169.  
  170. function weld(parent,part0,part1,c0)
  171.  
  172. local weld = it("Weld")
  173.  
  174. weld.Parent = parent
  175.  
  176. weld.Part0 = part0
  177.  
  178. weld.Part1 = part1
  179.  
  180. weld.C0 = c0
  181.  
  182. return weld
  183.  
  184. end
  185.  
  186.  
  187.  
  188. function SetWeld(weld, i, loops, origpos,origangle, nextpos,nextangle,smooth)
  189.  
  190. smooth = smooth or 1
  191.  
  192. local obj
  193.  
  194. for i, v in pairs(AnimJoints) do
  195.  
  196. if v[1] == weld then
  197.  
  198. obj = v
  199.  
  200. break
  201.  
  202. end
  203.  
  204. end
  205.  
  206. if not obj then
  207.  
  208. obj = {weld,NV}
  209.  
  210. table.insert(AnimJoints,obj)
  211.  
  212. end
  213.  
  214.  
  215.  
  216. local perc = (smooth == 1 and math.sin((math.pi/2)/loops*i)) or i/loops
  217.  
  218.  
  219.  
  220. local tox,toy,toz = 0,0,0
  221.  
  222. tox = math.abs(origangle.x - nextangle.x) *perc
  223.  
  224. toy = math.abs(origangle.y - nextangle.y) *perc
  225.  
  226. toz = math.abs(origangle.z - nextangle.z) *perc
  227.  
  228. tox = (origangle.x > nextangle.x and -tox) or tox
  229.  
  230. toy = (origangle.y > nextangle.y and -toy) or toy
  231.  
  232. toz = (origangle.z > nextangle.z and -toz) or toz
  233.  
  234.  
  235.  
  236. local tox2,toy2,toz2 = 0,0,0
  237.  
  238. tox2 = math.abs(origpos.x - nextpos.x) *perc
  239.  
  240. toy2 = math.abs(origpos.y - nextpos.y) *perc
  241.  
  242. toz2 = math.abs(origpos.z - nextpos.z) *perc
  243.  
  244. tox2 = (origpos.x > nextpos.x and -tox2) or tox2
  245.  
  246. toy2 = (origpos.y > nextpos.y and -toy2) or toy2
  247.  
  248. toz2 = (origpos.z > nextpos.z and -toz2) or toz2
  249.  
  250.  
  251.  
  252. obj[2] = Vector3.new(origangle.x + tox, origangle.y + toy, origangle.z + toz)
  253.  
  254. weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  255.  
  256. end
  257.  
  258.  
  259.  
  260. local Hitbox=part(3,nil,0,0,BrickColor.new("Really black"),"Hitbox",vt(1,1,1))
  261.  
  262. Hitbox.Anchored=true
  263.  
  264. Hitbox.Transparency=1
  265.  
  266. local modelzorz = Instance.new("Model")
  267.  
  268. modelzorz.Parent = Character
  269.  
  270. modelzorz.Name = "Mechanic Gauntlets"
  271.  
  272.  
  273.  
  274. --[[LEFT GAUNTLET]]--
  275.  
  276. local Lprt1=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Left Part1",vt(1,1,1))
  277.  
  278. local Lprt3=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part3",vt(1,1,1))
  279.  
  280. local Lprt5=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part5",vt(1,1,1))
  281.  
  282. local Lprt6=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part6",vt(1,1,1))
  283.  
  284. local Lprt7=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Left Part7",vt(1,1,1))
  285.  
  286. local Lprt8=part(3,modelzorz,0,0,BrickColor.new("Black"),"Left Part8",vt(1,1,1))
  287.  
  288. local Lprt9=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part9",vt(1,1,1))
  289.  
  290. local Lprt10=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part10",vt(1,1,1))
  291.  
  292. local Lprt11=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part11",vt(1,1,1))
  293.  
  294.  
  295.  
  296. Lmsh1=mesh("BlockMesh",Lprt1,"","",vt(0,0,0),vt(1.03,1,1.03))
  297.  
  298. Lmsh3=mesh("BlockMesh",Lprt3,"","",vt(0,0,0),vt(0.1,1.05,1.06))
  299.  
  300. Lmsh5=mesh("BlockMesh",Lprt5,"","",vt(0,0,0),vt(1.025,2,0.2))
  301.  
  302. Lmsh6=mesh("BlockMesh",Lprt6,"","",vt(0,0,0),vt(0.2,2,1.025))
  303.  
  304. Lmsh7=mesh("CylinderMesh",Lprt7,"","",vt(0,0,0),vt(0.4,0.2,0.4))
  305.  
  306. Lmsh8=mesh("CylinderMesh",Lprt8,"","",vt(0,0,0),vt(0.3,0.21,0.3))
  307.  
  308. Lmsh9=mesh("SpecialMesh",Lprt9,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.17,0.17,0.1))
  309.  
  310. Lmsh10=mesh("SpecialMesh",Lprt10,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.07,0.07,0.1))
  311.  
  312. Lmsh11=mesh("BlockMesh",Lprt11,"","",vt(0,0,0),vt(0.15,0.02,0.02))
  313.  
  314.  
  315.  
  316. local Lwld1=weld(Lprt1,Lprt1,LeftArm,euler(0,0,0)*cf(0,0.51,0))
  317.  
  318. local Lwld3=weld(Lprt3,Lprt3,Lprt1,euler(0,0,0)*cf(0.3,0,0))
  319.  
  320. local Lwld5=weld(Lprt5,Lprt5,Lprt1,euler(0,0,0)*cf(0,-0.55,0))
  321.  
  322. local Lwld6=weld(Lprt6,Lprt6,Lprt1,euler(0,0,0)*cf(0,-0.55,0))
  323.  
  324. local Lwld7=weld(Lprt7,Lprt7,Lprt1,euler(0,0,1.57)*cf(0.45,-1.2,0))
  325.  
  326. local Lwld8=weld(Lprt8,Lprt8,Lprt7,euler(0,0,0)*cf(0,0,0))
  327.  
  328. local Lwld9=weld(Lprt9,Lprt9,Lprt7,euler(1.57,0,0)*cf(-0.02,0.1,0))
  329.  
  330. local Lwld10=weld(Lprt10,Lprt10,Lprt7,euler(1.57,0,0)*cf(0,0.1,0))
  331.  
  332. local Lwld11=weld(Lprt11,Lprt11,Lprt7,euler(0,0,0)*cf(0.07,0.1,0))
  333.  
  334.  
  335.  
  336. numb=0.4
  337.  
  338. for i=1,4 do
  339.  
  340. local Lprt2=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part2",vt(1,1,1))
  341.  
  342. Lmsh2=mesh("BlockMesh",Lprt2,"","",vt(0,0,0),vt(1.06,1.05,0.1))
  343.  
  344. local Lwld2=weld(Lprt2,Lprt2,Lprt1,euler(0,0,0)*cf(0,0,numb))
  345.  
  346. local Lprt4=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Left Part4",vt(1,1,1))
  347.  
  348. Lmsh4=mesh("SpecialMesh",Lprt4,"Wedge","",vt(0,0,0),vt(0.09,0.1,0.3))
  349.  
  350. local Lwld4=weld(Lprt4,Lprt4,Lprt2,euler(1.57,-1.57,0)*cf(0.54,0.5,0))
  351.  
  352. numb=numb-0.275
  353.  
  354. end
  355.  
  356.  
  357.  
  358. numb=0
  359.  
  360. for i=1,4 do
  361.  
  362. local Lprt7=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Left Part7",vt(1,1,1))
  363.  
  364. Lmsh7=mesh("SpecialMesh",Lprt7,"Wedge","",vt(0,0,0),vt(0.2,0.1,0.3))
  365.  
  366. local Lwld7=weld(Lprt7,Lprt7,Lprt1,euler(1.57,0,3.14)*cf(0,-0.5,0.54)*euler(0,numb,0))
  367.  
  368. numb=numb+1.57
  369.  
  370. end
  371.  
  372.  
  373.  
  374. --[[RIGHT GAUNTLET]]--
  375.  
  376. local Rprt1=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Right Part1",vt(1,1,1))
  377.  
  378. local Rprt3=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part3",vt(1,1,1))
  379.  
  380. local Rprt5=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part5",vt(1,1,1))
  381.  
  382. local Rprt6=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part6",vt(1,1,1))
  383.  
  384. local Rprt7=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Right Part7",vt(1,1,1))
  385.  
  386. local Rprt8=part(3,modelzorz,0,0,BrickColor.new("Black"),"Right Part8",vt(1,1,1))
  387.  
  388. local Rprt9=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part9",vt(1,1,1))
  389.  
  390. local Rprt10=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part10",vt(1,1,1))
  391.  
  392. local Rprt11=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part11",vt(1,1,1))
  393.  
  394.  
  395.  
  396. Rmsh1=mesh("BlockMesh",Rprt1,"","",vt(0,0,0),vt(1.03,1,1.03))
  397.  
  398. Rmsh3=mesh("BlockMesh",Rprt3,"","",vt(0,0,0),vt(0.1,1.05,1.06))
  399.  
  400. Rmsh5=mesh("BlockMesh",Rprt5,"","",vt(0,0,0),vt(1.025,2,0.2))
  401.  
  402. Rmsh6=mesh("BlockMesh",Rprt6,"","",vt(0,0,0),vt(0.2,2,1.025))
  403.  
  404. Rmsh7=mesh("CylinderMesh",Rprt7,"","",vt(0,0,0),vt(0.4,0.2,0.4))
  405.  
  406. Rmsh8=mesh("CylinderMesh",Rprt8,"","",vt(0,0,0),vt(0.3,0.21,0.3))
  407.  
  408. Rmsh9=mesh("SpecialMesh",Rprt9,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.17,0.17,0.1))
  409.  
  410. Rmsh10=mesh("SpecialMesh",Rprt10,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.07,0.07,0.1))
  411.  
  412. Rmsh11=mesh("BlockMesh",Rprt11,"","",vt(0,0,0),vt(0.15,0.02,0.02))
  413.  
  414.  
  415.  
  416. local Rwld1=weld(Rprt1,Rprt1,RightArm,euler(0,3.14,0)*cf(0,0.51,0))
  417.  
  418. local Rwld3=weld(Rprt3,Rprt3,Rprt1,euler(0,0,0)*cf(0.3,0,0))
  419.  
  420. local Rwld5=weld(Rprt5,Rprt5,Rprt1,euler(0,0,0)*cf(0,-0.55,0))
  421.  
  422. local Rwld6=weld(Rprt6,Rprt6,Rprt1,euler(0,0,0)*cf(0,-0.55,0))
  423.  
  424. local Rwld7=weld(Rprt7,Rprt7,Rprt1,euler(0,0,1.57)*cf(0.45,-1.2,0))
  425.  
  426. local Rwld8=weld(Rprt8,Rprt8,Rprt7,euler(0,0,0)*cf(0,0,0))
  427.  
  428. local Rwld9=weld(Rprt9,Rprt9,Rprt7,euler(1.57,0,0)*cf(-0.02,0.1,0))
  429.  
  430. local Rwld10=weld(Rprt10,Rprt10,Rprt7,euler(1.57,0,0)*cf(0,0.1,0))
  431.  
  432. local Rwld11=weld(Rprt11,Rprt11,Rprt7,euler(0,0,0)*cf(0.07,0.1,0))
  433.  
  434.  
  435.  
  436. numb=0.4
  437.  
  438. for i=1,4 do
  439.  
  440. local Rprt2=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part2",vt(1,1,1))
  441.  
  442. Rmsh2=mesh("BlockMesh",Rprt2,"","",vt(0,0,0),vt(1.06,1.05,0.1))
  443.  
  444. local Rwld2=weld(Rprt2,Rprt2,Rprt1,euler(0,0,0)*cf(0,0,numb))
  445.  
  446. local Rprt4=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Right Part4",vt(1,1,1))
  447.  
  448. Rmsh4=mesh("SpecialMesh",Rprt4,"Wedge","",vt(0,0,0),vt(0.09,0.1,0.3))
  449.  
  450. local Rwld4=weld(Rprt4,Rprt4,Rprt2,euler(1.57,-1.57,0)*cf(0.54,0.5,0))
  451.  
  452. numb=numb-0.275
  453.  
  454. end
  455.  
  456.  
  457.  
  458. numb=0
  459.  
  460. for i=1,4 do
  461.  
  462. local Rprt7=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Right Part7",vt(1,1,1))
  463.  
  464. Rmsh7=mesh("SpecialMesh",Rprt7,"Wedge","",vt(0,0,0),vt(0.2,0.1,0.3))
  465.  
  466. local Rwld7=weld(Rprt7,Rprt7,Rprt1,euler(1.57,0,3.14)*cf(0,-0.5,0.54)*euler(0,numb,0))
  467.  
  468. numb=numb+1.57
  469.  
  470. end
  471.  
  472.  
  473.  
  474. if (script.Parent.className ~= "HopperBin") then
  475.  
  476. Tool = Instance.new("HopperBin")
  477.  
  478. Tool.Parent = Backpack
  479.  
  480. Tool.Name = "Mechanic Gauntlets"
  481.  
  482. script.Parent = Tool
  483.  
  484. end
  485.  
  486. Bin = script.Parent
  487.  
  488.  
  489.  
  490. local Bg = it("BodyGyro")
  491.  
  492. Bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  493.  
  494. Bg.P = 20e+003
  495.  
  496. Bg.Parent = nil
  497.  
  498.  
  499.  
  500. so = function(id,par,vol,pit)
  501.  
  502. coroutine.resume(coroutine.create(function()
  503.  
  504. local sou = Instance.new("Sound",par or workspace)
  505.  
  506. sou.Volume=vol
  507.  
  508. sou.Pitch=pit or 1
  509.  
  510. sou.SoundId=id
  511.  
  512. wait()
  513.  
  514. sou:play()
  515.  
  516. wait(6)
  517.  
  518. sou:Remove()
  519.  
  520. end))
  521.  
  522. end
  523.  
  524.  
  525.  
  526. function hideanim()
  527.  
  528. equipped=false
  529.  
  530. end
  531.  
  532.  
  533.  
  534. function equipanim()
  535.  
  536. equipped=true
  537.  
  538. Neck.C0=necko
  539.  
  540. for i = 0,1,0.1 do
  541.  
  542. wait()
  543.  
  544. LW.C0=cf(-1.5,0.5,0)*euler(0.2*i,1.57*i,0)
  545.  
  546. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  547.  
  548. RW.C0=cf(1.5,0.5,0)*euler(0.1*i,0,-0.2*i)
  549.  
  550. end
  551.  
  552. end
  553.  
  554.  
  555.  
  556. function attackone()
  557.  
  558. attack=true
  559.  
  560. local armprt=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part",vt(1,1,1))
  561.  
  562. armprt.Transparency=1
  563.  
  564. local armprtwld=weld(armprt,armprt,LeftArm,euler(0,0,0)*cf(0,1,0))
  565.  
  566. for i=0,1,0.2 do
  567.  
  568. wait()
  569.  
  570. ElecEffect(armprt.CFrame,1,1,1)
  571.  
  572. RootJoint.C0=RootCF*euler(0,0,0.2*i)
  573.  
  574. LW.C0=cf(-1.5,0.5,0)*euler((walkoffset1-walkoffset1*i)+.2,1.57,0)
  575.  
  576. LW.C1=cf(0, 0.5, 0)*euler(-0.2-0.4*i,0,0)
  577.  
  578. RW.C0=cf(1.5,0.5,0)*euler((walkoffset1-walkoffset1*i)+.1,0,-0.2+0.8*i)
  579.  
  580. end
  581.  
  582. local boom=part(3,workspace,0,0,BrickColor.new("Really black"),"Part",vt(1,1,1))
  583.  
  584. boom.Transparency=1
  585.  
  586. boom.Anchored=true
  587.  
  588. boom.CFrame=Head.CFrame*cf(0,-1,-4)
  589.  
  590. so("http://www.roblox.com/asset/?id=153092315",boom,1,0.5)
  591.  
  592. for i=0,1,0.2 do
  593.  
  594. wait()
  595.  
  596. ElecEffect(armprt.CFrame,1,1,1)
  597.  
  598. Neck.C0=necko*euler(0,0,0.6*i)
  599.  
  600. RootJoint.C0=RootCF*euler(0,0,0.2-0.8*i)
  601.  
  602. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.37*i,1.57,0)
  603.  
  604. LW.C1=cf(0, 0.5, 0)*euler(-0.6+0.2*i,0,0)
  605.  
  606. RW.C0=cf(1.5,0.5,0)*euler(0.1,0,0.6)
  607.  
  608. end
  609.  
  610. boommsh=mesh("SpecialMesh",boom,"Sphere","",vt(0,0,0),vt(2.5,2.5,2.5))
  611.  
  612. boom.Transparency=0.5
  613.  
  614. boom.Anchored=true
  615.  
  616. boom.CFrame=Head.CFrame*cf(0,-1,-4)
  617.  
  618. Hitbox.Parent=workspace
  619.  
  620. Hitbox.CFrame=boom.CFrame
  621.  
  622. con1=Hitbox.Touched:connect(function(hit) Damagefunc1(hit,1,5,0) end)
  623.  
  624. coroutine.resume(coroutine.create(function(Part,Mesh)
  625.  
  626. while Part.Parent~=nil do
  627.  
  628. wait()
  629.  
  630. derp=math.random()
  631.  
  632. Mesh.Scale=vt(2.5+derp,2.5+derp,2.5+derp)
  633.  
  634. ElecEffect(Part.CFrame,2,2,2)
  635.  
  636. MagicBlock(BrickColor.new("Really black"),Part.CFrame,1,1,1,0.1,0.1,0.1)
  637.  
  638. Hitbox.CFrame=boom.CFrame*cf(math.random(-1,0)+math.random(),math.random(-1,0)+math.random(),math.random(-1,0)+math.random())
  639.  
  640. end
  641.  
  642. end),boom,boommsh)
  643.  
  644. for i=0,1,0.2 do
  645.  
  646. wait()
  647.  
  648. LW.C0=cf(-1.5,0.5,0)*euler(1.57,1.57,0)
  649.  
  650. LW.C1=cf(0, 0.5, 0)*euler(-0.4+0.1*i,0,0)
  651.  
  652. end
  653.  
  654. coroutine.resume(coroutine.create(function(Part1,Part2,Part3,Con)
  655.  
  656. wait(2)
  657.  
  658. Con:disconnect()
  659.  
  660. Part2.Parent=nil
  661.  
  662. Part3.Parent=nil
  663.  
  664. Part1.Parent=nil
  665.  
  666. wait(1)
  667.  
  668. end),Hitbox,boom,armprt,con1)
  669.  
  670. --[[Hitbox.Parent=nil
  671.  
  672. con1:disconnect()
  673.  
  674. boom.Parent=nil
  675.  
  676. armprt.Parent=nil]]
  677.  
  678. attack=false
  679.  
  680. end
  681.  
  682.  
  683.  
  684. function attacktwo()
  685.  
  686. attack=true
  687.  
  688. for i=0,1,0.2 do
  689.  
  690. wait()
  691.  
  692. Neck.C0=necko*euler(0,0,0.6-0.6*i)
  693.  
  694. RootJoint.C0=RootCF*euler(0,0,-0.6+0.6*i)
  695.  
  696. LW.C0=cf(-1.5,0.5,0)*euler(1.57,1.57-1.57*i,0)
  697.  
  698. LW.C1=cf(0, 0.5, 0)*euler(-0.3+0.3*i,0,0)
  699.  
  700. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.47*i,0,0.6-0.6*i)
  701.  
  702. end
  703.  
  704. local boom=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part",vt(1,1,1))
  705.  
  706. boom.Transparency=0.5
  707.  
  708. boommsh=mesh("SpecialMesh",boom,"Sphere","",vt(0,0,0),vt(0,0,0))
  709.  
  710. local boomwld=weld(boom,boom,Head,euler(0,0,0)*cf(0,1,4))
  711.  
  712. con1=Hitbox.Touched:connect(function(hit) Damagefunc1(hit,5,10,20) end)
  713.  
  714. for i=0,1,0.2 do
  715.  
  716. wait()
  717.  
  718. ElecEffect(boom.CFrame,3,3,3)
  719.  
  720. LW.C0=cf(-1.5,0.5,0)*euler(1.57,0,0.1*i)
  721.  
  722. RW.C0=cf(1.5,0.5,0)*euler(1.57,0,-0.1*i)
  723.  
  724. boommsh.Scale=vt(0.5*(i*3),0.5*(i*3),0.5*(i*3))
  725.  
  726. Hitbox.CFrame=boom.CFrame
  727.  
  728. end
  729.  
  730. con1:disconnect()
  731.  
  732. boomwld.Parent=nil
  733.  
  734. boom.Anchored=true
  735.  
  736. coroutine.resume(coroutine.create(function(Part)
  737.  
  738. local c=game.Workspace:GetChildren()
  739.  
  740. for i=1,#c do
  741.  
  742. local hum=c[i]:findFirstChild("Humanoid")
  743.  
  744. if hum~=nil and hum.Health~=0 then
  745.  
  746. local head=c[i]:findFirstChild("Head")
  747.  
  748. if head~=nil then
  749.  
  750. local targ=head.Position - Part.Position
  751.  
  752. local mag=targ.magnitude
  753.  
  754. if mag<=10 and c[i].Name~=Player.Name then
  755.  
  756. attackdebounce=false
  757.  
  758. Damagefunc1(head,10,20,70)
  759.  
  760. end
  761.  
  762. end
  763.  
  764. end
  765.  
  766. end
  767.  
  768. so("http://www.roblox.com/asset/?id=2974249",Part,1,1)
  769.  
  770. so("http://www.roblox.com/asset/?id=1369158",Part,1,2)
  771.  
  772. numb=0
  773.  
  774. for i=0,20 do
  775.  
  776. wait()
  777.  
  778. MagicBlock(BrickColor.new("Really black"),Part.CFrame,0.5,0.5,0.5,1,1,1)
  779.  
  780. if numb>=8 then
  781.  
  782. MagicRing(BrickColor.new("Really black"),Part.CFrame,1,1,1,math.random(-50,50),math.random(-50,50),math.random(-50,50),0.5,0.5,0.5)
  783.  
  784. numb=0
  785.  
  786. end
  787.  
  788. numb=numb+1
  789.  
  790. end
  791.  
  792. end),boom)
  793.  
  794. for i=0,1,0.2 do
  795.  
  796. wait()
  797.  
  798. LW.C0=cf(-1.5,0.5,0)*euler(1.57,0,0.1-0.7*i)
  799.  
  800. RW.C0=cf(1.5,0.5,0)*euler(1.57,0,-0.1+0.7*i)
  801.  
  802. end
  803.  
  804. wait(0.2)
  805.  
  806. boom.Parent=nil
  807.  
  808. attack=false
  809.  
  810. end
  811.  
  812.  
  813.  
  814. function attackthree()
  815.  
  816. attack=true
  817.  
  818. for i=0,1,0.1 do
  819.  
  820. wait()
  821.  
  822. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.57*i,0,-0.6)
  823.  
  824. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.57*i,0,0.6)
  825.  
  826. end
  827.  
  828. so("http://www.roblox.com/asset/?id=153092348",Torso,1,1)
  829.  
  830. vel=Instance.new("BodyVelocity")
  831.  
  832. vel.Parent=RootPart
  833.  
  834. vel.maxForce=vt(4e+005,4e+005,4e+005)*1
  835.  
  836. vel.velocity=Head.CFrame.lookVector*50
  837.  
  838. ArmHit=false
  839.  
  840. armcon=RightArm.Touched:connect(function(hit)
  841.  
  842. if hit~=nil and hit.Parent:findFirstChild("Humanoid")~=nil and ArmHit==false then
  843.  
  844. armcon:disconnect()
  845.  
  846. vel.Parent=nil
  847.  
  848. ArmHit=true
  849.  
  850. print("HITTED")
  851.  
  852. Damagefunc1(hit,10,30,20)
  853.  
  854. MagicBlock(BrickColor.new("Really black"),hit.CFrame*cf(0,-1,0),0.5,0.5,0.5,1,1,1)
  855.  
  856. for i=1,3 do
  857.  
  858. Lightning(hit.Position,hit.Position+vt(math.random(-10,10),math.random(-10,10),math.random(-10,10)),5,1,"Really black",0.3,0.1,0.5)
  859.  
  860. end
  861.  
  862. so("http://www.roblox.com/asset/?id=153092334",Torso,1,1)
  863.  
  864. for i=0,1,0.2 do
  865.  
  866. wait()
  867.  
  868. Neck.C0=necko*euler(0,0,-1+2*i)
  869.  
  870. RootJoint.C0=RootCF*euler(0,0,1-2*i)
  871.  
  872. LW.C0=cf(-1.5,0.5,0)*euler(-0.2,0,-0.6)
  873.  
  874. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.77*i,0,1)
  875.  
  876. end
  877.  
  878. wait(0.4)
  879.  
  880. if Anim=="Idle" then
  881.  
  882. for i=0,1,0.1 do
  883.  
  884. wait()
  885.  
  886. Neck.C0=necko*euler(0,0,1-1*i)
  887.  
  888. RootJoint.C0=RootCF*euler(0,0,-1+1*i)
  889.  
  890. LW.C0=cf(-1.5,0.5,0)*euler(-0.2+0.4*i,1.57*i,-0.6+0.6*i)
  891.  
  892. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  893.  
  894. RW.C0=cf(1.5,0.5,0)*euler(-0.2+0.3*i,0,1-1.2*i)
  895.  
  896. end
  897.  
  898. end
  899.  
  900. end
  901.  
  902. end)
  903.  
  904. for i=0,1,0.2 do
  905.  
  906. wait()
  907.  
  908. MagicBlock(BrickColor.new("Really black"),RightArm.CFrame*cf(0,-2.5,0),0.5,0.5,0.5,0.6,0.6,0.6)
  909.  
  910. Neck.C0=necko*euler(0,0,-1*i)
  911.  
  912. RootJoint.C0=RootCF*euler(0,0,1*i)
  913.  
  914. LW.C0=cf(-1.5,0.5,0)*euler(-0.2*i,0,-0.6)
  915.  
  916. RW.C0=cf(1.5,0.5,0)*euler(1.57*i,0,0.6+0.4*i)
  917.  
  918. end
  919.  
  920. for i=0,1,0.1 do
  921.  
  922. wait()
  923.  
  924. MagicBlock(BrickColor.new("Really black"),RightArm.CFrame*cf(0,-2.5,0),0.5,0.5,0.5,0.6,0.6,0.6)
  925.  
  926. end
  927.  
  928. vel.Parent=nil
  929.  
  930. wait(0.5)
  931.  
  932. if ArmHit==false then
  933.  
  934. armcon:disconnect()
  935.  
  936. if Anim=="Idle" then
  937.  
  938. for i=0,1,0.1 do
  939.  
  940. wait()
  941.  
  942. Neck.C0=necko*euler(0,0,-1+1*i)
  943.  
  944. RootJoint.C0=RootCF*euler(0,0,1-1*i)
  945.  
  946. LW.C0=cf(-1.5,0.5,0)*euler(-0.2+0.4*i,1.57*i,-0.6+0.6*i)
  947.  
  948. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  949.  
  950. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,1-1.2*i)
  951.  
  952. end
  953.  
  954. end
  955.  
  956. end
  957.  
  958. attack=false
  959.  
  960. end
  961.  
  962.  
  963.  
  964. function Electra()
  965.  
  966. attack=true
  967.  
  968. Mode="Electra"
  969.  
  970. Anim="Switching"
  971.  
  972. for i=0,1,0.1 do
  973.  
  974. wait()
  975.  
  976. LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.4*i,1.57-1.57*i,-0.2*i)
  977.  
  978. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  979.  
  980. RW.C0=cf(1.5,0.5,0)*euler(0.1-0.3*i,0,-0.2+0.4*i)
  981.  
  982. RootJoint.C0=RootCF*cf(0,2*i,0)*euler(0,0,0)
  983.  
  984. end
  985.  
  986. wait(1)
  987.  
  988. attack=false
  989.  
  990. end
  991.  
  992.  
  993.  
  994. function Normal()
  995.  
  996. attack=true
  997.  
  998. Mode="Normal"
  999.  
  1000. RootJoint.C0=RootCF
  1001.  
  1002. wait(1)
  1003.  
  1004. attack=false
  1005.  
  1006. end
  1007.  
  1008.  
  1009.  
  1010. function MakeCube()
  1011.  
  1012. attack=true
  1013.  
  1014. for i=0,1,0.1 do
  1015.  
  1016. wait()
  1017.  
  1018. MagicBlock(BrickColor.new("Really black"),Torso.CFrame*cf(0,0.5,-2),0.5,0.5,0.5,0.3,0.3,0.3)
  1019.  
  1020. ElecEffect(Torso.CFrame*cf(0,0.5,-2),1,1,1)
  1021.  
  1022. Neck.C0=necko*euler(0.1*i,0,0)
  1023.  
  1024. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.27*i,1.57-1.57*i,0.4*i)
  1025.  
  1026. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  1027.  
  1028. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.37*i,0,-0.2-0.2*i)
  1029.  
  1030. end
  1031.  
  1032. numb=2
  1033.  
  1034. for i=0,1,0.1 do
  1035.  
  1036. MagicBlock(BrickColor.new("Really black"),Torso.CFrame*cf(0,0.5,-2),0.5,0.5,0.5,0.3,0.3,0.3)
  1037.  
  1038. ElecEffect(Torso.CFrame*cf(0,0.5,-2),1,1,1)
  1039.  
  1040. Neck.C0=necko*euler(0.1+0.1*(i*numb),0,0)
  1041.  
  1042. LW.C0=cf(-1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,0.4+0.1*(i*numb))
  1043.  
  1044. RW.C0=cf(1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,-0.4-0.1*(i*numb))
  1045.  
  1046. numb=numb-0.1
  1047.  
  1048. wait()
  1049.  
  1050. end
  1051.  
  1052. NewCube()
  1053.  
  1054. wait(0.5)
  1055.  
  1056. for i=0,1,0.1 do
  1057.  
  1058. wait()
  1059.  
  1060. Neck.C0=necko*euler(0.2-0.2*i,0,0)
  1061.  
  1062. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.37*i,1.57*i,0.5-0.5*i)
  1063.  
  1064. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  1065.  
  1066. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,-0.5+0.3*i)
  1067.  
  1068. end
  1069.  
  1070. Neck.C0=necko
  1071.  
  1072. attack=false
  1073.  
  1074. end
  1075.  
  1076.  
  1077.  
  1078. function GetCube()
  1079.  
  1080. if MMouse.Target~=nil and MMouse.Target.Name=="Cube Vertex2" and MMouse.Target.Parent:findFirstChild("Cube Vertex1")~=nil then
  1081.  
  1082. attack=true
  1083.  
  1084. throwcube=false
  1085.  
  1086. print("GOT CUBE")
  1087.  
  1088. mainpart=MMouse.Target
  1089.  
  1090. coroutine.resume(coroutine.create(function(Model)
  1091.  
  1092. while holdz==true do
  1093.  
  1094. wait()
  1095.  
  1096. Model["Cube Vertex1"].CFrame=Torso.CFrame*cf(0,0.5,-2)
  1097.  
  1098. end
  1099.  
  1100. end),mainpart.Parent)
  1101.  
  1102. for i=0,1,0.1 do
  1103.  
  1104. wait()
  1105.  
  1106. ElecEffect(mainpart.CFrame,1,1,1)
  1107.  
  1108. Neck.C0=necko*euler(0.1*i,0,0)
  1109.  
  1110. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.27*i,1.57-1.57*i,0.4*i)
  1111.  
  1112. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  1113.  
  1114. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.37*i,0,-0.2-0.2*i)
  1115.  
  1116. end
  1117.  
  1118. while holdz==true do
  1119.  
  1120. wait()
  1121.  
  1122. ElecEffect(mainpart.CFrame,1,1,1)
  1123.  
  1124. end
  1125.  
  1126. if throwcube==false then
  1127.  
  1128. for i=0,1,0.1 do
  1129.  
  1130. wait()
  1131.  
  1132. Neck.C0=necko*euler(0.1-0.1*i,0,0)
  1133.  
  1134. LW.C0=cf(-1.5,0.5,0)*euler(1.47-1.27*i,1.57*i,0.4-0.4*i)
  1135.  
  1136. LW.C1=cf(0, 0.5, 0)*euler(0.2*i,0,0)
  1137.  
  1138. RW.C0=cf(1.5,0.5,0)*euler(1.47-1.37*i,0,-0.4+0.4*i)
  1139.  
  1140. end
  1141.  
  1142. end
  1143.  
  1144. attack=false
  1145.  
  1146. end
  1147.  
  1148. end
  1149.  
  1150.  
  1151.  
  1152. function ThrowCube()
  1153.  
  1154. attack=true
  1155.  
  1156. Main=mainpart.Parent["Cube Vertex1"]
  1157.  
  1158. --[[CF=Main.CFrame
  1159.  
  1160. for i=0,20 do
  1161.  
  1162. wait()
  1163.  
  1164. Main.CFrame=CF*cf(0,0,-i)
  1165.  
  1166. end
  1167.  
  1168. numb=1
  1169.  
  1170. for i=0,1,0.1 do
  1171.  
  1172. wait()
  1173.  
  1174. Main.CFrame=CF*cf(0,0,-20-10*(i*numb))
  1175.  
  1176. numb=numb-0.05
  1177.  
  1178. end]]
  1179.  
  1180. wait()
  1181.  
  1182. Main.CFrame=CFrame.new(MMouse.Hit.p)*cf(math.random(-1,1),math.random(0,1),math.random(-1,1))
  1183.  
  1184. attack=false
  1185.  
  1186. end
  1187.  
  1188.  
  1189.  
  1190. function GatherCubes()
  1191.  
  1192. attack=true
  1193.  
  1194. c=workspace:children()
  1195.  
  1196. for i=1,#c do
  1197.  
  1198. if c[i].Name=="Cube" then
  1199.  
  1200. rand1=math.random(-5,5)
  1201.  
  1202. rand2=math.random(0,5)
  1203.  
  1204. rand3=math.random(-5,5)
  1205.  
  1206. coroutine.resume(coroutine.create(function(Model,Rand1,Rand2,Rand3)
  1207.  
  1208. while holdx==true do
  1209.  
  1210. wait()
  1211.  
  1212. Model["Cube Vertex1"].CFrame=Torso.CFrame*cf(Rand1,Rand2,Rand3)
  1213.  
  1214. ElecEffect(Model["Cube Vertex2"].CFrame,1,1,1)
  1215.  
  1216. end
  1217.  
  1218. end),c[i],rand1,rand2,rand3)
  1219.  
  1220. end
  1221.  
  1222. end
  1223.  
  1224. for i=0,1,0.1 do
  1225.  
  1226. wait()
  1227.  
  1228. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.37*i,1.57-1.57*i,-1.57*i)
  1229.  
  1230. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  1231.  
  1232. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.47*i,0,-0.2+1.77*i)
  1233.  
  1234. end
  1235.  
  1236. while holdx==true do
  1237.  
  1238. wait()
  1239.  
  1240. end
  1241.  
  1242. attack=false
  1243.  
  1244. end
  1245.  
  1246.  
  1247.  
  1248. function ThrowCube2()
  1249.  
  1250. wait()
  1251.  
  1252. if MMouse.Target~=nil then
  1253.  
  1254. TargetHit=MMouse.Target
  1255.  
  1256. if TargetHit.Anchored==false then
  1257.  
  1258. c=workspace:children()
  1259.  
  1260. for i=1,#c do
  1261.  
  1262. coroutine.resume(coroutine.create(function(Model)
  1263.  
  1264. if Model.Name=="Cube" then
  1265.  
  1266. while attack==false do
  1267.  
  1268. wait(0.1)
  1269.  
  1270. MainPrt=Model["Cube Vertex1"]
  1271.  
  1272. MainPrt.CFrame=TargetHit.CFrame*cf(math.random(-2,2),math.random(-2,2),math.random(-2,2))
  1273.  
  1274. end
  1275.  
  1276. end
  1277.  
  1278. end),c[i])
  1279.  
  1280. end
  1281.  
  1282. else
  1283.  
  1284. c=workspace:children()
  1285.  
  1286. for i=1,#c do
  1287.  
  1288. if c[i].Name=="Cube" then
  1289.  
  1290. CubModel=c[i]
  1291.  
  1292. MainPrt=CubModel["Cube Vertex1"]
  1293.  
  1294. MainPrt.CFrame=CFrame.new(MMouse.Hit.p)*cf(math.random(-5,5),math.random(0,5),math.random(-5,5))
  1295.  
  1296. end
  1297.  
  1298. end
  1299.  
  1300. end
  1301.  
  1302. end
  1303.  
  1304. end
  1305.  
  1306.  
  1307.  
  1308. function TeleCube()
  1309.  
  1310. if MMouse.Target~=nil and MMouse.Target.Name=="Cube Vertex2" and MMouse.Target.Parent:findFirstChild("Cube Vertex1")~=nil then
  1311.  
  1312. attack=true
  1313.  
  1314. MainPart=MMouse.Target
  1315.  
  1316. so("http://www.roblox.com/asset/?id=2101137",Torso,0.7,1)
  1317.  
  1318. for i=0,1,0.1 do
  1319.  
  1320. wait()
  1321.  
  1322. ElecEffect(MainPart.CFrame,1,1,1)
  1323.  
  1324. ElecEffect(Torso.CFrame,4,2,4)
  1325.  
  1326. Neck.C0=necko*euler(0,0,1.57*i)
  1327.  
  1328. RootJoint.C0=RootCF*euler(0,0,-1.57*i)
  1329.  
  1330. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.37*i,1.57-1.57*i,-1.57*i)
  1331.  
  1332. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  1333.  
  1334. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.47*i,0,-0.2+1.77*i)
  1335.  
  1336. end
  1337.  
  1338. for i=0,1,0.1 do
  1339.  
  1340. wait()
  1341.  
  1342. ElecEffect(MainPart.CFrame,1,1,1)
  1343.  
  1344. ElecEffect(Torso.CFrame,4,2,4)
  1345.  
  1346. end
  1347.  
  1348. for i=1,2 do
  1349.  
  1350. MagicBlock(BrickColor.new("Really black"),Torso.CFrame,0.5,0.5,0.5,2,2,2)
  1351.  
  1352. end
  1353.  
  1354. so("http://roblox.com/asset/?id=2101144",Torso,1,2)
  1355.  
  1356. Torso.CFrame=MainPart.CFrame
  1357.  
  1358. for i=1,2 do
  1359.  
  1360. MagicBlock(BrickColor.new("Really black"),Torso.CFrame,0.5,0.5,0.5,2,2,2)
  1361.  
  1362. end
  1363.  
  1364. Neck.C0=necko
  1365.  
  1366. RootJoint.C0=RootCF
  1367.  
  1368. attack=false
  1369.  
  1370. end
  1371.  
  1372. end
  1373.  
  1374.  
  1375.  
  1376. function Apocalypse()
  1377.  
  1378. attack=true
  1379.  
  1380. c=workspace:children()
  1381.  
  1382. for i=1,#c do
  1383.  
  1384. if c[i].Name=="Cube" then
  1385.  
  1386. so("http://www.roblox.com/asset/?id=2974249",c[i]["Cube Vertex2"],1,1)
  1387.  
  1388. coroutine.resume(coroutine.create(function(Model)
  1389.  
  1390. while Model.Parent~=nil do
  1391.  
  1392. MagicBlock(BrickColor.new("Really black"),Model["Cube Vertex2"].CFrame,0.5,0.5,0.5,0.5,0.5,0.5)
  1393.  
  1394. wait()
  1395.  
  1396. end
  1397.  
  1398. end),c[i])
  1399.  
  1400. end
  1401.  
  1402. end
  1403.  
  1404. for i=0,1,0.2 do
  1405.  
  1406. wait()
  1407.  
  1408. LW.C0=cf(-1.5+0.5*i,0.5,-0.5*i)*euler(0.2+0.2*i,1.57-1.57*i,0.6*i)
  1409.  
  1410. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  1411.  
  1412. RW.C0=cf(1.5-0.5*i,0.5,-0.5*i)*euler(0.1+0.3*i,0,-0.2-0.4*i)
  1413.  
  1414. end
  1415.  
  1416. numb=2
  1417.  
  1418. for i=0,1,0.1 do
  1419.  
  1420. wait()
  1421.  
  1422. Neck.C0=necko*euler(0.1*(i*numb),0,0)
  1423.  
  1424. LW.C0=cf(-1,0.5,-0.5)*euler(0.4+0.2*(i*numb),0,0.6+0.4*(i*numb))
  1425.  
  1426. RW.C0=cf(1,0.5,-0.5)*euler(0.4+0.2*(i*numb),0,-0.6-0.4*(i*numb))
  1427.  
  1428. numb=numb-0.1
  1429.  
  1430. end
  1431.  
  1432. c3=workspace:children()
  1433.  
  1434. for i=1,#c3 do
  1435.  
  1436. if c3[i].Name=="Cube" then
  1437.  
  1438. CubeMod=c3[i]
  1439.  
  1440. for i=1,2 do
  1441.  
  1442. MagicRing(BrickColor.new("Really black"),CubeMod["Cube Vertex2"].CFrame,1,1,1,math.random(-50,50),math.random(-50,50),math.random(-50,50),3,3,0.5)
  1443.  
  1444. end
  1445.  
  1446. for i=1,3 do
  1447.  
  1448. Lightning(CubeMod["Cube Vertex2"].Position,CubeMod["Cube Vertex2"].Position+vt(math.random(-10,10),math.random(-10,10),math.random(-10,10)),5,1,"Really black",0.3,0.1,0.8)
  1449.  
  1450. end
  1451.  
  1452. MagicCircle(BrickColor.new("Blue"),CubeMod["Cube Vertex2"].CFrame,1,1,1,3,3,3,0.05)
  1453.  
  1454. local c2=game.Workspace:GetChildren()
  1455.  
  1456. for i=1,#c2 do
  1457.  
  1458. local hum=c2[i]:findFirstChild("Humanoid")
  1459.  
  1460. if hum~=nil and hum.Health~=0 then
  1461.  
  1462. local head=c2[i]:findFirstChild("Head")
  1463.  
  1464. if head~=nil then
  1465.  
  1466. local targ=head.Position - CubeMod["Cube Vertex2"].Position
  1467.  
  1468. local mag=targ.magnitude
  1469.  
  1470. if mag<=15 and c2[i].Name~=Player.Name then
  1471.  
  1472. attackdebounce=false
  1473.  
  1474. Damagefunc1(head,10,20,0)
  1475.  
  1476. end
  1477.  
  1478. end
  1479.  
  1480. end
  1481.  
  1482. end
  1483.  
  1484. local cubesoundprt=part(3,workspace,0,1,BrickColor.new("Really black"),"Cube Sound Part",vt(1,1,1))
  1485.  
  1486. cubesoundprt.Anchored=true
  1487.  
  1488. cubesoundprt.CFrame=CubeMod["Cube Vertex2"].CFrame
  1489.  
  1490. game.Debris:AddItem(cubesoundprt,3)
  1491.  
  1492. --so("http://www.roblox.com/asset/?id=2974249",Part,1,1)
  1493.  
  1494. so("http://www.roblox.com/asset/?id=1369158",cubesoundprt,1,2)
  1495.  
  1496. CubeMod:Destroy()
  1497.  
  1498. end
  1499.  
  1500. end
  1501.  
  1502. for i=0,1,0.2 do
  1503.  
  1504. wait()
  1505.  
  1506. Neck.C0=necko*euler(0.1+0.05*i,0,0)
  1507.  
  1508. LW.C0=cf(-1-0.5*i,0.5,-0.5+0.5*i)*euler(0.6+0.87*i,0,1-2.47*i)
  1509.  
  1510. RW.C0=cf(1+0.5*i,0.5,-0.5+0.5*i)*euler(0.6+0.87*i,0,-1+2.47*i)
  1511.  
  1512. end
  1513.  
  1514. numb=2
  1515.  
  1516. for i=0,1,0.1 do
  1517.  
  1518. wait()
  1519.  
  1520. Neck.C0=necko*euler(0.15+0.05*i,0,0)
  1521.  
  1522. LW.C0=cf(-1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,-1.47-0.1*(i*numb))
  1523.  
  1524. RW.C0=cf(1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,1.47+0.1*(i*numb))
  1525.  
  1526. numb=numb-0.1
  1527.  
  1528. end
  1529.  
  1530. for i=0,1,0.1 do
  1531.  
  1532. wait()
  1533.  
  1534. Neck.C0=necko*euler(0.2-0.2*i,0,0)
  1535.  
  1536. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.37*i,1.57*i,-1.57+1.57*i)
  1537.  
  1538. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  1539.  
  1540. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,1.57-1.37*i)
  1541.  
  1542. end
  1543.  
  1544. attack=false
  1545.  
  1546. end
  1547.  
  1548.  
  1549.  
  1550. function Turbine()
  1551.  
  1552. if MMouse.Target~=nil and MMouse.Target.Name=="Cube Vertex2" and MMouse.Target.Parent:findFirstChild("Cube Vertex1")~=nil then
  1553.  
  1554. BoomCube=MMouse.Target
  1555.  
  1556. TargetPart=BoomCube.Parent["Cube Vertex1"]
  1557.  
  1558. attack=true
  1559.  
  1560. bg=Instance.new("BodyGyro")
  1561.  
  1562. bg.maxTorque = vt(0,math.huge,0)
  1563.  
  1564. bg.P = 3000
  1565.  
  1566. bg.cframe = cf(RootPart.Position,BoomCube.Position)
  1567.  
  1568. bg.Parent = RootPart
  1569.  
  1570. so("http://www.roblox.com/asset/?id=2101137",BoomCube,1,1)
  1571.  
  1572. for i=0,1,0.2 do
  1573.  
  1574. wait()
  1575.  
  1576. Neck.C0=necko*euler(0,0,1*i)
  1577.  
  1578. RootJoint.C0=RootCF*euler(0,0,-1*i)
  1579.  
  1580. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.37*i,1.57-1.57*i,-1*i)
  1581.  
  1582. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  1583.  
  1584. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.47*i,0,-0.2+1.77*i)
  1585.  
  1586. Lightning(LeftArm.Position,BoomCube.Position,5,1,"Really black",0.3,0.1,0.1)
  1587.  
  1588. end
  1589.  
  1590. for i=1,10 do
  1591.  
  1592. wait()
  1593.  
  1594. Lightning(LeftArm.Position,BoomCube.Position,5,1,"Really black",0.3,0.1,0.1)
  1595.  
  1596. end
  1597.  
  1598. for i=1,2 do
  1599.  
  1600. MagicBlock(BrickColor.new("Really black"),BoomCube.CFrame,0.5,0.5,0.5,2,2,2)
  1601.  
  1602. end
  1603.  
  1604. MagicCircle(BrickColor.new("Blue"),BoomCube.CFrame,1,1,1,2,2,2,0.08)
  1605.  
  1606. so("http://www.roblox.com/asset/?id=2697431",BoomCube,1,0.2)
  1607.  
  1608. local c2=game.Workspace:GetChildren()
  1609.  
  1610. for i=1,#c2 do
  1611.  
  1612. local hum=c2[i]:findFirstChild("Humanoid")
  1613.  
  1614. if hum~=nil and hum.Health~=0 then
  1615.  
  1616. local head=c2[i]:findFirstChild("Head")
  1617.  
  1618. if head~=nil then
  1619.  
  1620. local targ=head.Position - BoomCube.Position
  1621.  
  1622. local mag=targ.magnitude
  1623.  
  1624. if mag<=12 and c2[i].Name~=Player.Name then
  1625.  
  1626. attackdebounce=false
  1627.  
  1628. Damagefunc2(head,10,20,0,BoomCube)
  1629.  
  1630. end
  1631.  
  1632. end
  1633.  
  1634. end
  1635.  
  1636. end
  1637.  
  1638. TargetPart.CFrame=LeftArm.CFrame*cf(0,-3,0)
  1639.  
  1640. wait(0.5)
  1641.  
  1642. for i=0,1,0.1 do
  1643.  
  1644. wait()
  1645.  
  1646. Neck.C0=necko*euler(0,0,1-1*i)
  1647.  
  1648. RootJoint.C0=RootCF*euler(0,0,-1+1*i)
  1649.  
  1650. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.37*i,1.57*i,-1+1*i)
  1651.  
  1652. LW.C1=cf(0, 0.5, 0)*euler(0.2*i,0,0)
  1653.  
  1654. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,1.57-1.77*i)
  1655.  
  1656. end
  1657.  
  1658. bg.Parent=nil
  1659.  
  1660. attack=false
  1661.  
  1662. end
  1663.  
  1664. end
  1665.  
  1666.  
  1667.  
  1668. function NewCube()
  1669.  
  1670. Cube=Instance.new("Model")
  1671.  
  1672. Cube.Parent=workspace
  1673.  
  1674. Cube.Name="Cube"
  1675.  
  1676. local cubevertex=part(3,Cube,0,0.6,BrickColor.new("Really black"),"Cube Vertex1",vt(1,1,1))
  1677.  
  1678. cubevertex.Anchored=true
  1679.  
  1680. cubevertex.CFrame=Torso.CFrame*cf(0,0.5,-2)
  1681.  
  1682. cubevertexmsh=mesh("SpecialMesh",cubevertex,"Sphere","",vt(0,0,0),vt(0.3,0.3,0.3))
  1683.  
  1684. local cube=part(3,Cube,0,0.2,BrickColor.new("Really black"),"Cube Vertex2",vt(1.5,1.5,1.5))
  1685.  
  1686. cube.CFrame=Torso.CFrame
  1687.  
  1688. cubemsh=mesh("BlockMesh",cube,"","",vt(0,0,0),vt(0.4,0.4,0.4))
  1689.  
  1690. cubemsh=mesh("SpecialMesh",cube,"Sphere","",vt(0,0,0),vt(0.2,0.2,0.2))
  1691.  
  1692. local actualcube=part(3,Cube,0,0.3,BrickColor.new("Really red"),"Cube",vt(1,1,1))
  1693.  
  1694. actualcube.CFrame=Torso.CFrame
  1695.  
  1696. --actualcubemsh=mesh("SpecialMesh",actualcube,"Sphere","",vt(0,0,0),vt(0.4,0.4,0.4))
  1697.  
  1698. actualcubemsh=mesh("BlockMesh",actualcube,"","",vt(0,0,0),vt(0.7,0.7,0.7))
  1699.  
  1700. local cubewld=weld(actualcube,actualcube,cube,cf(0,0,0))
  1701.  
  1702. coroutine.resume(coroutine.create(function(Part,Model)
  1703.  
  1704. while Part.Parent~=nil do
  1705.  
  1706. wait()
  1707.  
  1708. end
  1709.  
  1710. Model.Parent=nil
  1711.  
  1712. end),actualcube,Cube)
  1713.  
  1714. local spark=Instance.new("Sparkles")
  1715.  
  1716. spark.Parent=cube
  1717.  
  1718. spark.Color=Color3.new(1,0,0)
  1719.  
  1720. spark.Enabled=true
  1721.  
  1722. light=Instance.new("PointLight")
  1723.  
  1724. light.Brightness=20
  1725.  
  1726. light.Color=Color3.new(1,0,0)
  1727.  
  1728. light.Range=10
  1729.  
  1730. light.Parent=cube
  1731.  
  1732. coroutine.resume(coroutine.create(function(Part,Weld)
  1733.  
  1734. numb1=0
  1735.  
  1736. numb2=0
  1737.  
  1738. numb3=0
  1739.  
  1740. while Part.Parent~=nil do
  1741.  
  1742. wait()
  1743.  
  1744. Weld.C0=Weld.C0*angles(numb1,numb2,numb3)
  1745.  
  1746. numb1=math.pi/math.random(10,20)
  1747.  
  1748. numb2=math.pi/math.random(20,30)
  1749.  
  1750. numb3=math.pi/math.random(20,30)
  1751.  
  1752. end
  1753.  
  1754. end),actualcube,cubewld)
  1755.  
  1756. prop=Instance.new("RocketPropulsion")
  1757.  
  1758. prop.MaxSpeed=5000
  1759.  
  1760. prop.CartoonFactor=0
  1761.  
  1762. prop.MaxThrust=10000
  1763.  
  1764. prop.Parent=cube
  1765.  
  1766. prop.Target=cubevertex
  1767.  
  1768. prop.ThrustD=1.5
  1769.  
  1770. prop.TurnD=0
  1771.  
  1772. prop.TurnP=0
  1773.  
  1774. print(prop.ThrustD)
  1775.  
  1776. prop:Fire()
  1777.  
  1778. end
  1779.  
  1780.  
  1781.  
  1782. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  1783.  
  1784. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1785.  
  1786. end
  1787.  
  1788.  
  1789.  
  1790. function Lightning(p0,p1,tym,ofs,col,th,tra,last)
  1791.  
  1792. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  1793.  
  1794. for i=1,tym do
  1795.  
  1796. local li = Instance.new("Part",workspace) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = tra or 0.4 li.BrickColor = BrickColor.new(col)
  1797.  
  1798. li.formFactor = "Custom" li.CanCollide = false li.Size = Vector3.new(th,th,magz/tym) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  1799.  
  1800. light1=Instance.new("PointLight")
  1801.  
  1802. light1.Brightness=.8
  1803.  
  1804. light1.Color=Color3.new(.2,255,.2)
  1805.  
  1806. light1.Range=8
  1807.  
  1808. light1.Parent=li
  1809.  
  1810. local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz
  1811.  
  1812. if tym == i then
  1813.  
  1814. local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2)
  1815.  
  1816. li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2)
  1817.  
  1818. else
  1819.  
  1820. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2)
  1821.  
  1822. end
  1823.  
  1824. curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,last)
  1825.  
  1826. end
  1827.  
  1828. end
  1829.  
  1830.  
  1831.  
  1832. function ElecEffect(cff,x,y,z)
  1833.  
  1834. local prt=part(3,workspace,0,0,BrickColor.new("Really black"),"Part",vt(1,1,1))
  1835.  
  1836. prt.Anchored=true
  1837.  
  1838. xval=math.random()
  1839.  
  1840. yval=math.random()
  1841.  
  1842. zval=math.random()
  1843.  
  1844. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(xval,yval,zval))
  1845.  
  1846. coroutine.resume(coroutine.create(function(Part,Mesh,Frame,xvaal,yvaal,zvaal)
  1847.  
  1848. Part.CFrame=Frame*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
  1849.  
  1850. for i=1,8 do
  1851.  
  1852. wait()
  1853.  
  1854. xvaal=xvaal-0.1
  1855.  
  1856. yvaal=yvaal-0.1
  1857.  
  1858. zvaal=zvaal-0.1
  1859.  
  1860. Mesh.Scale=vt(xvaal,yvaal,zvaal)
  1861.  
  1862. Part.Transparency=Part.Transparency+0.09
  1863.  
  1864. end
  1865.  
  1866. Part.Parent=nil
  1867.  
  1868. end),prt,msh,cff,xval,yval,zval)
  1869.  
  1870. end
  1871.  
  1872.  
  1873.  
  1874. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3)
  1875.  
  1876. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1877.  
  1878. prt.Anchored=true
  1879.  
  1880. prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1881.  
  1882. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1883.  
  1884. coroutine.resume(coroutine.create(function(Part,Mesh)
  1885.  
  1886. for i=0,1,0.1 do
  1887.  
  1888. wait()
  1889.  
  1890. Part.CFrame=Part.CFrame
  1891.  
  1892. Part.Transparency=i
  1893.  
  1894. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1895.  
  1896. end
  1897.  
  1898. Part.Parent=nil
  1899.  
  1900. end),prt,msh)
  1901.  
  1902. end
  1903.  
  1904.  
  1905.  
  1906. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1907.  
  1908. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1909.  
  1910. prt.Anchored=true
  1911.  
  1912. prt.CFrame=cframe
  1913.  
  1914. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1915.  
  1916. coroutine.resume(coroutine.create(function(Part,Mesh)
  1917.  
  1918. for i=0,1,delay do
  1919.  
  1920. wait()
  1921.  
  1922. Part.CFrame=Part.CFrame
  1923.  
  1924. Part.Transparency=i
  1925.  
  1926. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1927.  
  1928. end
  1929.  
  1930. Part.Parent=nil
  1931.  
  1932. end),prt,msh)
  1933.  
  1934. end
  1935.  
  1936.  
  1937.  
  1938. function MagicRing(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
  1939.  
  1940. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1941.  
  1942. prt.Anchored=true
  1943.  
  1944. prt.CFrame=cframe*euler(x2,y2,z2)
  1945.  
  1946. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  1947.  
  1948. coroutine.resume(coroutine.create(function(Part,Mesh)
  1949.  
  1950. for i=0,1,0.03 do
  1951.  
  1952. wait()
  1953.  
  1954. Part.CFrame=Part.CFrame
  1955.  
  1956. Part.Transparency=i
  1957.  
  1958. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1959.  
  1960. end
  1961.  
  1962. Part.Parent=nil
  1963.  
  1964. end),prt,msh)
  1965.  
  1966. end
  1967.  
  1968.  
  1969.  
  1970. so = function(id,par,vol,pit)
  1971.  
  1972. coroutine.resume(coroutine.create(function()
  1973.  
  1974. local sou = Instance.new("Sound",par or workspace)
  1975.  
  1976. sou.Volume=vol
  1977.  
  1978. sou.Pitch=pit or 1
  1979.  
  1980. sou.SoundId=id
  1981.  
  1982. wait()
  1983.  
  1984. sou:play()
  1985.  
  1986. wait(6)
  1987.  
  1988. sou:Remove()
  1989.  
  1990. end))
  1991.  
  1992. end
  1993.  
  1994.  
  1995.  
  1996. function findNearestTorso(pos)
  1997.  
  1998. local list = game:service("Workspace"):children()
  1999.  
  2000. local torso = nil
  2001.  
  2002. local dist = 50
  2003.  
  2004. local temp = nil
  2005.  
  2006. local human = nil
  2007.  
  2008. local temp2 = nil
  2009.  
  2010. for x = 1, #list do
  2011.  
  2012. temp2 = list[x]
  2013.  
  2014. if (temp2.className == "Model") and (temp2 ~= Character) and (temp2.Name ~= "Fenrier") then
  2015.  
  2016. temp = temp2:findFirstChild("Torso")
  2017.  
  2018. human = temp2:findFirstChild("Humanoid")
  2019.  
  2020. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  2021.  
  2022. if (temp.Position - pos).magnitude < dist then
  2023.  
  2024. torso = temp
  2025.  
  2026. dist = (temp.Position - pos).magnitude
  2027.  
  2028. end
  2029.  
  2030. end
  2031.  
  2032. end
  2033.  
  2034. end
  2035.  
  2036. return torso
  2037.  
  2038. end
  2039.  
  2040.  
  2041.  
  2042. Damagefunc1=function(hit,minim,maxim,Knockback)
  2043.  
  2044. if hit.Parent==nil then
  2045.  
  2046. return
  2047.  
  2048. end
  2049.  
  2050. CPlayer=Bin
  2051.  
  2052. h=hit.Parent:FindFirstChild("Humanoid")
  2053.  
  2054. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  2055.  
  2056. if attackdebounce == false then
  2057.  
  2058. attackdebounce = true
  2059.  
  2060. coroutine.resume(coroutine.create(function()
  2061.  
  2062. wait(0.2)
  2063.  
  2064. attackdebounce = false
  2065.  
  2066. end))
  2067.  
  2068. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  2069.  
  2070. return
  2071.  
  2072. end]]
  2073.  
  2074. -- hs(hit,1.2)
  2075.  
  2076. c=Instance.new("ObjectValue")
  2077.  
  2078. c.Name="creator"
  2079.  
  2080. c.Value=game:service("Players").LocalPlayer
  2081.  
  2082. c.Parent=h
  2083.  
  2084. game:GetService("Debris"):AddItem(c,.5)
  2085.  
  2086. Damage=math.random(minim,maxim)
  2087.  
  2088. -- h:TakeDamage(Damage)
  2089.  
  2090. blocked=false
  2091.  
  2092. block=hit.Parent:findFirstChild("Block")
  2093.  
  2094. if block~=nil then
  2095.  
  2096. print("herp")
  2097.  
  2098. if block.Value>0 then
  2099.  
  2100. blocked=true
  2101.  
  2102. block.Value=block.Value-1
  2103.  
  2104. print(block.Value)
  2105.  
  2106. end
  2107.  
  2108. end
  2109.  
  2110. if blocked==false then
  2111.  
  2112. -- h:TakeDamage(Damage)
  2113.  
  2114. h.Health=h.Health-Damage
  2115.  
  2116. showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  2117.  
  2118. else
  2119.  
  2120. h.Health=h.Health-(Damage/2)
  2121.  
  2122. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Really red"))
  2123.  
  2124. end
  2125.  
  2126. vp=Instance.new("BodyVelocity")
  2127.  
  2128. vp.P=500
  2129.  
  2130. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  2131.  
  2132. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  2133.  
  2134. vp.velocity=Head.CFrame.lookVector*Knockback+Head.Velocity/1.05
  2135.  
  2136. if Knockback>0 then
  2137.  
  2138. vp.Parent=hit.Parent.Torso
  2139.  
  2140. end
  2141.  
  2142. game:GetService("Debris"):AddItem(vp,.25)
  2143.  
  2144. c=Instance.new("ObjectValue")
  2145.  
  2146. c.Name="creator"
  2147.  
  2148. c.Value=Player
  2149.  
  2150. c.Parent=h
  2151.  
  2152. game:GetService("Debris"):AddItem(c,.5)
  2153.  
  2154. CRIT=false
  2155.  
  2156. hitDeb=true
  2157.  
  2158. AttackPos=6
  2159.  
  2160. end
  2161.  
  2162. end
  2163.  
  2164. end
  2165.  
  2166.  
  2167.  
  2168. Damagefunc2=function(hit,minim,maxim,Knockback,MainPart)
  2169.  
  2170. if hit.Parent==nil then
  2171.  
  2172. return
  2173.  
  2174. end
  2175.  
  2176. CPlayer=Bin
  2177.  
  2178. h=hit.Parent:FindFirstChild("Humanoid")
  2179.  
  2180. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  2181.  
  2182. if attackdebounce == false then
  2183.  
  2184. attackdebounce = true
  2185.  
  2186. coroutine.resume(coroutine.create(function()
  2187.  
  2188. wait(0.2)
  2189.  
  2190. attackdebounce = false
  2191.  
  2192. end))
  2193.  
  2194. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  2195.  
  2196. return
  2197.  
  2198. end]]
  2199.  
  2200. -- hs(hit,1.2)
  2201.  
  2202. c=Instance.new("ObjectValue")
  2203.  
  2204. c.Name="creator"
  2205.  
  2206. c.Value=game:service("Players").LocalPlayer
  2207.  
  2208. c.Parent=h
  2209.  
  2210. game:GetService("Debris"):AddItem(c,.5)
  2211.  
  2212. Damage=math.random(minim,maxim)
  2213.  
  2214. -- h:TakeDamage(Damage)
  2215.  
  2216. blocked=false
  2217.  
  2218. block=hit.Parent:findFirstChild("Block")
  2219.  
  2220. if block~=nil then
  2221.  
  2222. print("herp")
  2223.  
  2224. if block.Value>0 then
  2225.  
  2226. blocked=true
  2227.  
  2228. block.Value=block.Value-1
  2229.  
  2230. print(block.Value)
  2231.  
  2232. end
  2233.  
  2234. end
  2235.  
  2236. if blocked==false then
  2237.  
  2238. -- h:TakeDamage(Damage)
  2239.  
  2240. h.Health=h.Health-Damage
  2241.  
  2242. showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  2243.  
  2244. else
  2245.  
  2246. h.Health=h.Health-(Damage/2)
  2247.  
  2248. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Really red"))
  2249.  
  2250. end
  2251.  
  2252. newpos2=MainPart.Position
  2253.  
  2254. local angle = (hit.Position-(newpos2+Vector3.new(0,-3,0))).unit
  2255.  
  2256. print(angle)
  2257.  
  2258. hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  2259.  
  2260. rl=Instance.new("BodyAngularVelocity")
  2261.  
  2262. rl.P=3000
  2263.  
  2264. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  2265.  
  2266. rl.angularvelocity=Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  2267.  
  2268. rl.Parent=hit
  2269.  
  2270. game:GetService("Debris"):AddItem(rl,1)
  2271.  
  2272. --end
  2273.  
  2274. local bodyVelocity=Instance.new("BodyVelocity")
  2275.  
  2276. bodyVelocity.velocity=angle*40+Vector3.new(0,35,0)
  2277.  
  2278. bodyVelocity.P=5000
  2279.  
  2280. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  2281.  
  2282. bodyVelocity.Parent=hit
  2283.  
  2284. game:GetService("Debris"):AddItem(bodyVelocity,.7)
  2285.  
  2286. c=Instance.new("ObjectValue")
  2287.  
  2288. c.Name="creator"
  2289.  
  2290. c.Value=Player
  2291.  
  2292. c.Parent=h
  2293.  
  2294. game:GetService("Debris"):AddItem(c,.5)
  2295.  
  2296. CRIT=false
  2297.  
  2298. hitDeb=true
  2299.  
  2300. AttackPos=6
  2301.  
  2302. end
  2303.  
  2304. end
  2305.  
  2306. end
  2307.  
  2308.  
  2309.  
  2310. showDamage=function(Char,Dealt,du,Color)
  2311.  
  2312. m=Instance.new("Model")
  2313.  
  2314. m.Name=tostring(Dealt)
  2315.  
  2316. h=Instance.new("Humanoid")
  2317.  
  2318. h.Health=0
  2319.  
  2320. h.MaxHealth=0
  2321.  
  2322. h.Parent=m
  2323.  
  2324. c=Instance.new("Part")
  2325.  
  2326. c.Transparency=0
  2327.  
  2328. c.BrickColor=Color
  2329.  
  2330. c.Name="Head"
  2331.  
  2332. c.TopSurface=0
  2333.  
  2334. c.BottomSurface=0
  2335.  
  2336. c.formFactor="Plate"
  2337.  
  2338. c.Size=Vector3.new(1,.4,1)
  2339.  
  2340. ms=Instance.new("CylinderMesh")
  2341.  
  2342. ms.Scale=Vector3.new(.8,.8,.8)
  2343.  
  2344. if CRIT==true then
  2345.  
  2346. ms.Scale=Vector3.new(1,1.25,1)
  2347.  
  2348. end
  2349.  
  2350. ms.Parent=c
  2351.  
  2352. c.Reflectance=0
  2353.  
  2354. Instance.new("BodyGyro").Parent=c
  2355.  
  2356. c.Parent=m
  2357.  
  2358. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  2359.  
  2360. f=Instance.new("BodyPosition")
  2361.  
  2362. f.P=2000
  2363.  
  2364. f.D=100
  2365.  
  2366. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  2367.  
  2368. f.position=c.Position+Vector3.new(0,3,0)
  2369.  
  2370. f.Parent=c
  2371.  
  2372. game:GetService("Debris"):AddItem(m,.5+du)
  2373.  
  2374. c.CanCollide=false
  2375.  
  2376. m.Parent=workspace
  2377.  
  2378. c.CanCollide=false
  2379.  
  2380. end
  2381.  
  2382.  
  2383.  
  2384. function ob1d(mouse)
  2385.  
  2386. if holdz==true then
  2387.  
  2388. throwcube=true
  2389.  
  2390. holdz=false
  2391.  
  2392. ThrowCube()
  2393.  
  2394. return end
  2395.  
  2396. if holdx==true then
  2397.  
  2398. throwcube=true
  2399.  
  2400. holdx=false
  2401.  
  2402. ThrowCube2()
  2403.  
  2404. return end
  2405.  
  2406. if attack == true then return end
  2407.  
  2408. hold=true
  2409.  
  2410. if combo==0 then
  2411.  
  2412. combo=1
  2413.  
  2414. attackone()
  2415.  
  2416. elseif combo==1 then
  2417.  
  2418. combo=2
  2419.  
  2420. attacktwo()
  2421.  
  2422. elseif combo==2 then
  2423.  
  2424. combo=3
  2425.  
  2426. attackthree()
  2427.  
  2428. end
  2429.  
  2430. coroutine.resume(coroutine.create(function()
  2431.  
  2432. wait(0.5)
  2433.  
  2434. if attack==false then
  2435.  
  2436. combo=0
  2437.  
  2438. Neck.C0=necko
  2439.  
  2440. RootJoint.C0=RootCF
  2441.  
  2442. LW.C0=cf(-1.5,0.5,0)*euler(0.2,1.57,0)
  2443.  
  2444. LW.C1=cf(0, 0.5, 0)*euler(-0.2,0,0)
  2445.  
  2446. RW.C0=cf(1.5,0.5,0)*euler(0.1,0,-0.2)
  2447.  
  2448. end
  2449.  
  2450. end))
  2451.  
  2452. end
  2453.  
  2454.  
  2455.  
  2456. function ob1u(mouse)
  2457.  
  2458. hold = false
  2459.  
  2460. end
  2461.  
  2462.  
  2463.  
  2464. buttonhold = false
  2465.  
  2466. holdz=false
  2467.  
  2468. holdx=false
  2469.  
  2470.  
  2471.  
  2472. eul=0
  2473.  
  2474. function key(key)
  2475.  
  2476. if attack == true then return end
  2477.  
  2478. --[[if key=="f" then
  2479.  
  2480. if Mode=="Normal" then
  2481.  
  2482. Electra()
  2483.  
  2484. elseif Mode=="Electra" then
  2485.  
  2486. Normal()
  2487.  
  2488. end
  2489.  
  2490. end]]
  2491.  
  2492. if key=="q" then
  2493.  
  2494. Apocalypse()
  2495.  
  2496. end
  2497.  
  2498. if key=="e" then
  2499.  
  2500. Turbine()
  2501.  
  2502. end
  2503.  
  2504. if key=="f" then
  2505.  
  2506. MakeCube()
  2507.  
  2508. end
  2509.  
  2510. if key=="z" then
  2511.  
  2512. holdz=true
  2513.  
  2514. GetCube()
  2515.  
  2516. end
  2517.  
  2518. if key=="x" then
  2519.  
  2520. holdx=true
  2521.  
  2522. GatherCubes()
  2523.  
  2524. end
  2525.  
  2526. if key=="c" then
  2527.  
  2528. TeleCube()
  2529.  
  2530. end
  2531.  
  2532. end
  2533.  
  2534.  
  2535.  
  2536. function key2(key)
  2537.  
  2538. if key=="z" then
  2539.  
  2540. holdz=false
  2541.  
  2542. end
  2543.  
  2544. if key=="x" then
  2545.  
  2546. holdx=false
  2547.  
  2548. end
  2549.  
  2550. end
  2551.  
  2552.  
  2553.  
  2554. function s(mouse)
  2555.  
  2556. mouse.Button1Down:connect(function() ob1d(mouse) end)
  2557.  
  2558. mouse.Button1Up:connect(function() ob1u(mouse) end)
  2559.  
  2560. mouse.KeyDown:connect(key)
  2561.  
  2562. mouse.KeyUp:connect(key2)
  2563.  
  2564. unsheathed = true
  2565.  
  2566. player = Player
  2567.  
  2568. ch = Character
  2569.  
  2570. MMouse = mouse
  2571.  
  2572. RSH = ch.Torso["Right Shoulder"]
  2573.  
  2574. LSH = ch.Torso["Left Shoulder"]
  2575.  
  2576. --
  2577.  
  2578. RSH.Parent = nil
  2579.  
  2580. LSH.Parent = nil
  2581.  
  2582. --
  2583.  
  2584. RW.Part0 = ch.Torso
  2585.  
  2586. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  2587.  
  2588. RW.C1 = CFrame.new(0, 0.5, 0)
  2589.  
  2590. RW.Part1 = ch["Right Arm"]
  2591.  
  2592. RW.Parent = ch.Torso
  2593.  
  2594. --_G.R = RW
  2595.  
  2596. --
  2597.  
  2598. LW.Part0 = ch.Torso
  2599.  
  2600. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  2601.  
  2602. LW.C1 = CFrame.new(0, 0.5, 0)
  2603.  
  2604. LW.Part1 = ch["Left Arm"]
  2605.  
  2606. LW.Parent = ch.Torso
  2607.  
  2608. --_G.L = LW
  2609.  
  2610. --
  2611.  
  2612. equipanim()
  2613.  
  2614. end
  2615.  
  2616.  
  2617.  
  2618. function ds(mouse)
  2619.  
  2620. hideanim()
  2621.  
  2622. wait(0)
  2623.  
  2624. RW.Parent = nil
  2625.  
  2626. LW.Parent = nil
  2627.  
  2628. RSH.Parent = player.Character.Torso
  2629.  
  2630. LSH.Parent = player.Character.Torso
  2631.  
  2632. end
  2633.  
  2634.  
  2635.  
  2636. Bin.Selected:connect(s)
  2637.  
  2638. Bin.Deselected:connect(ds)
  2639.  
  2640. Humanoid.Died:connect(function()
  2641.  
  2642. c=workspace:children()
  2643.  
  2644. for i=1,#c do
  2645.  
  2646. if c[i].Name=="Cube" then
  2647.  
  2648. c[i]:Remove()
  2649.  
  2650. end
  2651.  
  2652. end
  2653.  
  2654. end)
  2655.  
  2656. --[[function onRunning(speed)
  2657.  
  2658. if attack==true then return end
  2659.  
  2660. if speed>0 then
  2661.  
  2662. walking = true
  2663.  
  2664. for i = 0,1,0.1 do
  2665.  
  2666. wait()
  2667.  
  2668. LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.4*i,1.57,0)
  2669.  
  2670. end
  2671.  
  2672. else
  2673.  
  2674. walking = false
  2675.  
  2676. for i = 0,1,0.1 do
  2677.  
  2678. wait()
  2679.  
  2680. LW.C0=cf(-1.5,0.5,0)*euler(-0.2+0.4*i,1.57,0)
  2681.  
  2682. end
  2683.  
  2684. end
  2685.  
  2686. end
  2687.  
  2688. Character.Humanoid.Running:connect(onRunning) ]]
  2689.  
  2690. Anim="Idle"
  2691.  
  2692. walkoffset1=0
  2693.  
  2694. walkoffset2=0
  2695.  
  2696. Switching=false
  2697.  
  2698. while true do
  2699.  
  2700. wait()
  2701.  
  2702. if Mode=="Normal" then
  2703.  
  2704. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  2705.  
  2706. if RootPart.Velocity.y > 2 then
  2707.  
  2708. if Anim~="Jump" then
  2709.  
  2710. Anim="Jump"
  2711.  
  2712. coroutine.resume(coroutine.create(function()
  2713.  
  2714. for i=0,1,0.2 do
  2715.  
  2716. wait()
  2717.  
  2718. LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.6*i,1.57-1.57*i,0)
  2719.  
  2720. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  2721.  
  2722. RW.C0=cf(1.5,0.5,0)*euler(0.1-0.1*i,0,-0.2)
  2723.  
  2724. end
  2725.  
  2726. end))
  2727.  
  2728. end
  2729.  
  2730. elseif RootPart.Velocity.y < -2 then
  2731.  
  2732. if Anim~="Fall" then
  2733.  
  2734. Anim="Fall"
  2735.  
  2736. coroutine.resume(coroutine.create(function()
  2737.  
  2738. for i=0,1,0.2 do
  2739.  
  2740. wait()
  2741.  
  2742. LW.C0=cf(-1.5,0.5,0)*euler(-0.4+2.8*i,0,0)
  2743.  
  2744. RW.C0=cf(1.5,0.5,0)*euler(0,0,-0.2)
  2745.  
  2746. end
  2747.  
  2748. end))
  2749.  
  2750. end
  2751.  
  2752. elseif torvel < 1 then
  2753.  
  2754. if Anim~="Idle" then
  2755.  
  2756. Anim="Idle"
  2757.  
  2758. coroutine.resume(coroutine.create(function()
  2759.  
  2760. wait(0.1)
  2761.  
  2762. while Switching==true do
  2763.  
  2764. wait()
  2765.  
  2766. end
  2767.  
  2768. while Anim=="Idle" do
  2769.  
  2770. for i = 0,1,0.02 do
  2771.  
  2772. if Anim=="Idle" and attack==false then
  2773.  
  2774. wait()
  2775.  
  2776. LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.1*i,1.57-0.05*i,0)
  2777.  
  2778. RW.C0=cf(1.5,0.5-0.1*i,0)*euler(0.1+0.1*i,0,-0.2)
  2779.  
  2780. end
  2781.  
  2782. end
  2783.  
  2784. for i = 0,1,0.02 do
  2785.  
  2786. if Anim=="Idle" and attack==false then
  2787.  
  2788. wait()
  2789.  
  2790. LW.C0=cf(-1.5,0.5,0)*euler(0.1+0.1*i,1.52+0.05*i,0)
  2791.  
  2792. RW.C0=cf(1.5,0.4+0.1*i,0)*euler(0.2-0.1*i,0,-0.2)
  2793.  
  2794. end
  2795.  
  2796. end
  2797.  
  2798. wait(0)
  2799.  
  2800. end
  2801.  
  2802. if Anim=="Walk" and attack==false then
  2803.  
  2804. print("Switch to Walk")
  2805.  
  2806. Switching=true
  2807.  
  2808. walkoffset1=0
  2809.  
  2810. walkoffset2=0
  2811.  
  2812. for i=0,1,0.15 do
  2813.  
  2814. wait()
  2815.  
  2816. walkoffset1=0.2+0.8*i
  2817.  
  2818. walkoffset2=0.1-0.9*i
  2819.  
  2820. LW.C0=cf(-1.5,0.5,0)*euler(walkoffset1,1.57-1.57*i,0)
  2821.  
  2822. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  2823.  
  2824. RW.C0=cf(1.5,0.5,0)*euler(walkoffset2,0,-0.2+0.2*i)
  2825.  
  2826. end
  2827.  
  2828. Switching=false
  2829.  
  2830. elseif Anim=="Run" and attack==false then
  2831.  
  2832. print("Switch to Run")
  2833.  
  2834. Switching=true
  2835.  
  2836. for i=0,1,0.1 do
  2837.  
  2838. wait()
  2839.  
  2840. if Anim=="Run" and attack==false then
  2841.  
  2842. print("runnin")
  2843.  
  2844. RootJoint.C0=RootCF*euler(0.5*i,0,0)
  2845.  
  2846. Neck.C0=necko*euler(-0.3*i,0,0)
  2847.  
  2848. LW.C0=cf(-1.5,0.5,0)*euler(0.2-1.2*i,1.57-1.57*i,0)
  2849.  
  2850. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  2851.  
  2852. RW.C0=cf(1.5,0.5,0)*euler(0.1-1.1*i,0,-0.2+0.2*i)
  2853.  
  2854. end
  2855.  
  2856. end
  2857.  
  2858. Switching=false
  2859.  
  2860. end
  2861.  
  2862. end))
  2863.  
  2864. end
  2865.  
  2866. elseif torvel < 19 then
  2867.  
  2868. if Anim~="Walk" then
  2869.  
  2870. Anim="Walk"
  2871.  
  2872. coroutine.resume(coroutine.create(function()
  2873.  
  2874. wait(0.1)
  2875.  
  2876. while Switching==true do
  2877.  
  2878. wait()
  2879.  
  2880. end
  2881.  
  2882. while Anim=="Walk" do
  2883.  
  2884. for i=0,1,0.15 do
  2885.  
  2886. if Anim=="Walk" and attack==false then
  2887.  
  2888. wait()
  2889.  
  2890. walkoffset1=1-2*i
  2891.  
  2892. walkoffset2=-1+2*i
  2893.  
  2894. LW.C0=cf(-1.5,0.5,0)*euler(walkoffset1,0,0)
  2895.  
  2896. RW.C0=cf(1.5,0.5,0)*euler(walkoffset2,0,0)
  2897.  
  2898. end
  2899.  
  2900. end
  2901.  
  2902. for i=0,1,0.15 do
  2903.  
  2904. if Anim=="Walk" and attack==false then
  2905.  
  2906. wait()
  2907.  
  2908. walkoffset1=-1+2*i
  2909.  
  2910. walkoffset2=1-2*i
  2911.  
  2912. LW.C0=cf(-1.5,0.5,0)*euler(walkoffset1,0,0)
  2913.  
  2914. RW.C0=cf(1.5,0.5,0)*euler(walkoffset2,0,0)
  2915.  
  2916. end
  2917.  
  2918. end
  2919.  
  2920. wait(0)
  2921.  
  2922. end
  2923.  
  2924. if Anim=="Idle" and attack==false then
  2925.  
  2926. print("Switch to Idle")
  2927.  
  2928. Switching=true
  2929.  
  2930. for i=0,1,0.1 do
  2931.  
  2932. wait()
  2933.  
  2934. if Anim=="Idle" and attack==false then
  2935.  
  2936. LW.C0=cf(-1.5,0.5,0)*euler((walkoffset1-walkoffset1*i)+(0.2*i),1.57*i,0)
  2937.  
  2938. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  2939.  
  2940. RW.C0=cf(1.5,0.5,0)*euler((walkoffset2-walkoffset2*i)+(0.1*i),0,-0.2*i)
  2941.  
  2942. end
  2943.  
  2944. end
  2945.  
  2946. walkoffset1=0
  2947.  
  2948. walkoffset2=0
  2949.  
  2950. Switching=false
  2951.  
  2952. end
  2953.  
  2954. end))
  2955.  
  2956. end
  2957.  
  2958. elseif torvel >= 30 then
  2959.  
  2960. if Anim~="Run" then
  2961.  
  2962. Anim="Run"
  2963.  
  2964. coroutine.resume(coroutine.create(function()
  2965.  
  2966. while Anim=="Run" do
  2967.  
  2968. wait()
  2969.  
  2970. if Anim=="Run" and attack==false then
  2971.  
  2972. LW.C0=cf(-1.5,0.5,0)*euler(-1,0,0)
  2973.  
  2974. LW.C1=cf(0, 0.5, 0)*euler(0,0,0)
  2975.  
  2976. RW.C0=cf(1.5,0.5,0)*euler(-1,0,0)
  2977.  
  2978. end
  2979.  
  2980. end
  2981.  
  2982. if Anim=="Idle" and attack==false then
  2983.  
  2984. print("Switch to Idle")
  2985.  
  2986. Switching=true
  2987.  
  2988. for i=0,1,0.1 do
  2989.  
  2990. wait()
  2991.  
  2992. RootJoint.C0=RootCF*euler(0.5-0.5*i,0,0)
  2993.  
  2994. Neck.C0=necko*euler(-0.3+0.3*i,0,0)
  2995.  
  2996. LW.C0=cf(-1.5,0.5,0)*euler(-1+1.2*i,1.57*i,0)
  2997.  
  2998. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  2999.  
  3000. RW.C0=cf(1.5,0.5,0)*euler(-1+1.1*i,0,-0.2*i)
  3001.  
  3002. end
  3003.  
  3004. Switching=false
  3005.  
  3006. end
  3007.  
  3008. end))
  3009.  
  3010. end
  3011.  
  3012. end
  3013.  
  3014. elseif Mode=="Electra" then
  3015.  
  3016. end
  3017.  
  3018. end
  3019.  
  3020. print("Mechanic Gauntlets loaded.")
  3021.  
  3022.  
  3023.  
  3024. --[[
  3025.  
  3026. Copyrighted (C) Fenrier 2014
  3027.  
  3028. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement