VengefulProgram

Untitled

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