Advertisement
MasonWall19

Untitled

Jun 17th, 2015
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.92 KB | None | 0 0
  1. --[[
  2. Herex's Mechanic Gauntlets
  3. Heyo, Fen's first 2014 script. If ever you want details of Herex, who he is, and his backstory,
  4. just message me.
  5. ]]
  6. Player = game:GetService("Players").LocalPlayer
  7. Character = Player.Character
  8. PlayerGui = Player.PlayerGui
  9. Backpack = Player.Backpack
  10. Torso = Character.Torso
  11. Head = Character.Head
  12. Humanoid = Character.Humanoid
  13. LeftArm = Character["Left Arm"]
  14. LeftLeg = Character["Left Leg"]
  15. RightArm = Character["Right Arm"]
  16. RightLeg = Character["Right Leg"]
  17. LS = Torso["Left Shoulder"]
  18. LH = Torso["Left Hip"]
  19. RS = Torso["Right Shoulder"]
  20. RH = Torso["Right Hip"]
  21. Neck = Torso.Neck
  22. it=Instance.new
  23. vt=Vector3.new
  24. cf=CFrame.new
  25. euler=CFrame.fromEulerAnglesXYZ
  26. angles=CFrame.Angles
  27. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  28. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  29. RootPart=Character.HumanoidRootPart
  30. RootJoint=RootPart.RootJoint
  31. RootCF=euler(-1.57,0,3.14)
  32. attack = false
  33. attackdebounce = false
  34. MMouse=nil
  35. combo=0
  36. Mode="Normal"
  37. throwcube=false
  38. --player
  39. player = nil
  40. --save shoulders
  41. RSH, LSH = nil, nil
  42. --welds
  43. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  44. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  45. local AnimJoints = {}
  46. table.insert(AnimJoints,RW)
  47. table.insert(AnimJoints,LW)
  48.  
  49.  
  50. if Character:findFirstChild("Mechanic Gauntlets",true) ~= nil then
  51. Character:findFirstChild("Mechanic Gauntlets",true).Parent = nil
  52. end
  53.  
  54.  
  55. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  56. local fp = it("Part")
  57. fp.Material = "SmoothPlastic"
  58. fp.formFactor = formfactor
  59. fp.Parent = parent
  60. fp.Reflectance = reflectance
  61. fp.Transparency = transparency
  62. fp.CanCollide = false
  63. fp.Locked=true
  64. fp.BrickColor = brickcolor
  65. fp.Name = name
  66. fp.Size = size
  67. fp.Position = Torso.Position
  68. fp.BottomSurface="SmoothNoOutlines"
  69. fp.TopSurface="SmoothNoOutlines"
  70. fp.LeftSurface="SmoothNoOutlines"
  71. fp.RightSurface="SmoothNoOutlines"
  72. fp:BreakJoints()
  73. return fp
  74. end
  75.  
  76. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  77. local mesh = it(Mesh)
  78. mesh.Parent = part
  79. if Mesh=="SpecialMesh" then
  80. mesh.MeshType = meshtype
  81. mesh.MeshId = meshid
  82. end
  83. mesh.Offset=offset
  84. mesh.Scale=scale
  85. return mesh
  86. end
  87.  
  88. function weld(parent,part0,part1,c0)
  89. local weld = it("Weld")
  90. weld.Parent = parent
  91. weld.Part0 = part0
  92. weld.Part1 = part1
  93. weld.C0 = c0
  94. return weld
  95. end
  96.  
  97. function SetWeld(weld, i, loops, origpos,origangle, nextpos,nextangle,smooth)
  98. smooth = smooth or 1
  99. local obj
  100. for i, v in pairs(AnimJoints) do
  101. if v[1] == weld then
  102. obj = v
  103. break
  104. end
  105. end
  106. if not obj then
  107. obj = {weld,NV}
  108. table.insert(AnimJoints,obj)
  109. end
  110.  
  111. local perc = (smooth == 1 and math.sin((math.pi/2)/loops*i)) or i/loops
  112.  
  113. local tox,toy,toz = 0,0,0
  114. tox = math.abs(origangle.x - nextangle.x) *perc
  115. toy = math.abs(origangle.y - nextangle.y) *perc
  116. toz = math.abs(origangle.z - nextangle.z) *perc
  117. tox = (origangle.x > nextangle.x and -tox) or tox
  118. toy = (origangle.y > nextangle.y and -toy) or toy
  119. toz = (origangle.z > nextangle.z and -toz) or toz
  120.  
  121. local tox2,toy2,toz2 = 0,0,0
  122. tox2 = math.abs(origpos.x - nextpos.x) *perc
  123. toy2 = math.abs(origpos.y - nextpos.y) *perc
  124. toz2 = math.abs(origpos.z - nextpos.z) *perc
  125. tox2 = (origpos.x > nextpos.x and -tox2) or tox2
  126. toy2 = (origpos.y > nextpos.y and -toy2) or toy2
  127. toz2 = (origpos.z > nextpos.z and -toz2) or toz2
  128.  
  129. obj[2] = Vector3.new(origangle.x + tox, origangle.y + toy, origangle.z + toz)
  130. weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  131. end
  132.  
  133. local Hitbox=part(3,nil,0,0,BrickColor.new("Really black"),"Hitbox",vt(1,1,1))
  134. Hitbox.Anchored=true
  135. Hitbox.Transparency=1
  136. local modelzorz = Instance.new("Model")
  137. modelzorz.Parent = Character
  138. modelzorz.Name = "Mechanic Gauntlets"
  139.  
  140. --[[LEFT GAUNTLET]]--
  141. local Lprt1=part(3,modelzorz,0,0,BrickColor.new("Navy blue"),"Left Part1",vt(1,1,1))
  142. local Lprt3=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part3",vt(1,1,1))
  143. local Lprt5=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part5",vt(1,1,1))
  144. local Lprt6=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part6",vt(1,1,1))
  145. local Lprt7=part(3,modelzorz,0,0,BrickColor.new("Navy blue"),"Left Part7",vt(1,1,1))
  146. local Lprt8=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Left Part8",vt(1,1,1))
  147. local Lprt9=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part9",vt(1,1,1))
  148. local Lprt10=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part10",vt(1,1,1))
  149. local Lprt11=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part11",vt(1,1,1))
  150.  
  151. Lmsh1=mesh("BlockMesh",Lprt1,"","",vt(0,0,0),vt(1.03,1,1.03))
  152. Lmsh3=mesh("BlockMesh",Lprt3,"","",vt(0,0,0),vt(0.1,1.05,1.06))
  153. Lmsh5=mesh("BlockMesh",Lprt5,"","",vt(0,0,0),vt(1.025,2,0.2))
  154. Lmsh6=mesh("BlockMesh",Lprt6,"","",vt(0,0,0),vt(0.2,2,1.025))
  155. Lmsh7=mesh("CylinderMesh",Lprt7,"","",vt(0,0,0),vt(0.4,0.2,0.4))
  156. Lmsh8=mesh("CylinderMesh",Lprt8,"","",vt(0,0,0),vt(0.3,0.21,0.3))
  157. Lmsh9=mesh("SpecialMesh",Lprt9,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.17,0.17,0.1))
  158. Lmsh10=mesh("SpecialMesh",Lprt10,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.07,0.07,0.1))
  159. Lmsh11=mesh("BlockMesh",Lprt11,"","",vt(0,0,0),vt(0.15,0.02,0.02))
  160.  
  161. local Lwld1=weld(Lprt1,Lprt1,LeftArm,euler(0,0,0)*cf(0,0.51,0))
  162. local Lwld3=weld(Lprt3,Lprt3,Lprt1,euler(0,0,0)*cf(0.3,0,0))
  163. local Lwld5=weld(Lprt5,Lprt5,Lprt1,euler(0,0,0)*cf(0,-0.55,0))
  164. local Lwld6=weld(Lprt6,Lprt6,Lprt1,euler(0,0,0)*cf(0,-0.55,0))
  165. local Lwld7=weld(Lprt7,Lprt7,Lprt1,euler(0,0,1.57)*cf(0.45,-1.2,0))
  166. local Lwld8=weld(Lprt8,Lprt8,Lprt7,euler(0,0,0)*cf(0,0,0))
  167. local Lwld9=weld(Lprt9,Lprt9,Lprt7,euler(1.57,0,0)*cf(-0.02,0.1,0))
  168. local Lwld10=weld(Lprt10,Lprt10,Lprt7,euler(1.57,0,0)*cf(0,0.1,0))
  169. local Lwld11=weld(Lprt11,Lprt11,Lprt7,euler(0,0,0)*cf(0.07,0.1,0))
  170.  
  171. numb=0.4
  172. for i=1,4 do
  173. local Lprt2=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part2",vt(1,1,1))
  174. Lmsh2=mesh("BlockMesh",Lprt2,"","",vt(0,0,0),vt(1.06,1.05,0.1))
  175. local Lwld2=weld(Lprt2,Lprt2,Lprt1,euler(0,0,0)*cf(0,0,numb))
  176. local Lprt4=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Left Part4",vt(1,1,1))
  177. Lmsh4=mesh("SpecialMesh",Lprt4,"Wedge","",vt(0,0,0),vt(0.09,0.1,0.3))
  178. local Lwld4=weld(Lprt4,Lprt4,Lprt2,euler(1.57,-1.57,0)*cf(0.54,0.5,0))
  179. numb=numb-0.275
  180. end
  181.  
  182. numb=0
  183. for i=1,4 do
  184. local Lprt7=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Left Part7",vt(1,1,1))
  185. Lmsh7=mesh("SpecialMesh",Lprt7,"Wedge","",vt(0,0,0),vt(0.2,0.1,0.3))
  186. local Lwld7=weld(Lprt7,Lprt7,Lprt1,euler(1.57,0,3.14)*cf(0,-0.5,0.54)*euler(0,numb,0))
  187. numb=numb+1.57
  188. end
  189.  
  190. --[[RIGHT GAUNTLET]]--
  191. local Rprt1=part(3,modelzorz,0,0,BrickColor.new("Navy blue"),"Right Part1",vt(1,1,1))
  192. local Rprt3=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part3",vt(1,1,1))
  193. local Rprt5=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part5",vt(1,1,1))
  194. local Rprt6=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part6",vt(1,1,1))
  195. local Rprt7=part(3,modelzorz,0,0,BrickColor.new("Navy blue"),"Right Part7",vt(1,1,1))
  196. local Rprt8=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Right Part8",vt(1,1,1))
  197. local Rprt9=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part9",vt(1,1,1))
  198. local Rprt10=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part10",vt(1,1,1))
  199. local Rprt11=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part11",vt(1,1,1))
  200.  
  201. Rmsh1=mesh("BlockMesh",Rprt1,"","",vt(0,0,0),vt(1.03,1,1.03))
  202. Rmsh3=mesh("BlockMesh",Rprt3,"","",vt(0,0,0),vt(0.1,1.05,1.06))
  203. Rmsh5=mesh("BlockMesh",Rprt5,"","",vt(0,0,0),vt(1.025,2,0.2))
  204. Rmsh6=mesh("BlockMesh",Rprt6,"","",vt(0,0,0),vt(0.2,2,1.025))
  205. Rmsh7=mesh("CylinderMesh",Rprt7,"","",vt(0,0,0),vt(0.4,0.2,0.4))
  206. Rmsh8=mesh("CylinderMesh",Rprt8,"","",vt(0,0,0),vt(0.3,0.21,0.3))
  207. Rmsh9=mesh("SpecialMesh",Rprt9,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.17,0.17,0.1))
  208. Rmsh10=mesh("SpecialMesh",Rprt10,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.07,0.07,0.1))
  209. Rmsh11=mesh("BlockMesh",Rprt11,"","",vt(0,0,0),vt(0.15,0.02,0.02))
  210.  
  211. local Rwld1=weld(Rprt1,Rprt1,RightArm,euler(0,3.14,0)*cf(0,0.51,0))
  212. local Rwld3=weld(Rprt3,Rprt3,Rprt1,euler(0,0,0)*cf(0.3,0,0))
  213. local Rwld5=weld(Rprt5,Rprt5,Rprt1,euler(0,0,0)*cf(0,-0.55,0))
  214. local Rwld6=weld(Rprt6,Rprt6,Rprt1,euler(0,0,0)*cf(0,-0.55,0))
  215. local Rwld7=weld(Rprt7,Rprt7,Rprt1,euler(0,0,1.57)*cf(0.45,-1.2,0))
  216. local Rwld8=weld(Rprt8,Rprt8,Rprt7,euler(0,0,0)*cf(0,0,0))
  217. local Rwld9=weld(Rprt9,Rprt9,Rprt7,euler(1.57,0,0)*cf(-0.02,0.1,0))
  218. local Rwld10=weld(Rprt10,Rprt10,Rprt7,euler(1.57,0,0)*cf(0,0.1,0))
  219. local Rwld11=weld(Rprt11,Rprt11,Rprt7,euler(0,0,0)*cf(0.07,0.1,0))
  220.  
  221. numb=0.4
  222. for i=1,4 do
  223. local Rprt2=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part2",vt(1,1,1))
  224. Rmsh2=mesh("BlockMesh",Rprt2,"","",vt(0,0,0),vt(1.06,1.05,0.1))
  225. local Rwld2=weld(Rprt2,Rprt2,Rprt1,euler(0,0,0)*cf(0,0,numb))
  226. local Rprt4=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Right Part4",vt(1,1,1))
  227. Rmsh4=mesh("SpecialMesh",Rprt4,"Wedge","",vt(0,0,0),vt(0.09,0.1,0.3))
  228. local Rwld4=weld(Rprt4,Rprt4,Rprt2,euler(1.57,-1.57,0)*cf(0.54,0.5,0))
  229. numb=numb-0.275
  230. end
  231.  
  232. numb=0
  233. for i=1,4 do
  234. local Rprt7=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Right Part7",vt(1,1,1))
  235. Rmsh7=mesh("SpecialMesh",Rprt7,"Wedge","",vt(0,0,0),vt(0.2,0.1,0.3))
  236. local Rwld7=weld(Rprt7,Rprt7,Rprt1,euler(1.57,0,3.14)*cf(0,-0.5,0.54)*euler(0,numb,0))
  237. numb=numb+1.57
  238. end
  239.  
  240. if (script.Parent.className ~= "HopperBin") then
  241. Tool = Instance.new("HopperBin")
  242. Tool.Parent = Backpack
  243. Tool.Name = "Mechanic Gauntlets"
  244. script.Parent = Tool
  245. end
  246. Bin = script.Parent
  247.  
  248. local Bg = it("BodyGyro")
  249. Bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  250. Bg.P = 20e+003
  251. Bg.Parent = nil
  252.  
  253. so = function(id,par,vol,pit)
  254. coroutine.resume(coroutine.create(function()
  255. local sou = Instance.new("Sound",par or workspace)
  256. sou.Volume=vol
  257. sou.Pitch=pit or 1
  258. sou.SoundId=id
  259. wait()
  260. sou:play()
  261. wait(6)
  262. sou:Remove()
  263. end))
  264. end
  265.  
  266. function hideanim()
  267. equipped=false
  268. end
  269.  
  270. function equipanim()
  271. equipped=true
  272. Neck.C0=necko
  273. for i = 0,1,0.1 do
  274. wait()
  275. LW.C0=cf(-1.5,0.5,0)*euler(0.2*i,1.57*i,0)
  276. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  277. RW.C0=cf(1.5,0.5,0)*euler(0.1*i,0,-0.2*i)
  278. end
  279. end
  280.  
  281. function attackone()
  282. attack=true
  283. local armprt=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part",vt(1,1,1))
  284. armprt.Transparency=1
  285. local armprtwld=weld(armprt,armprt,LeftArm,euler(0,0,0)*cf(0,1,0))
  286. for i=0,1,0.2 do
  287. wait()
  288. ElecEffect(armprt.CFrame,1,1,1)
  289. RootJoint.C0=RootCF*euler(0,0,0.2*i)
  290. LW.C0=cf(-1.5,0.5,0)*euler((walkoffset1-walkoffset1*i)+.2,1.57,0)
  291. LW.C1=cf(0, 0.5, 0)*euler(-0.2-0.4*i,0,0)
  292. RW.C0=cf(1.5,0.5,0)*euler((walkoffset1-walkoffset1*i)+.1,0,-0.2+0.8*i)
  293. end
  294. local boom=part(3,workspace,0,0,BrickColor.new("Really black"),"Part",vt(1,1,1))
  295. boom.Transparency=1
  296. boom.Anchored=true
  297. boom.CFrame=Head.CFrame*cf(0,-1,-4)
  298. so("http://www.roblox.com/asset/?id=153092315",boom,1,0.5)
  299. for i=0,1,0.2 do
  300. wait()
  301. ElecEffect(armprt.CFrame,1,1,1)
  302. Neck.C0=necko*euler(0,0,0.6*i)
  303. RootJoint.C0=RootCF*euler(0,0,0.2-0.8*i)
  304. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.37*i,1.57,0)
  305. LW.C1=cf(0, 0.5, 0)*euler(-0.6+0.2*i,0,0)
  306. RW.C0=cf(1.5,0.5,0)*euler(0.1,0,0.6)
  307. end
  308. boommsh=mesh("SpecialMesh",boom,"Sphere","",vt(0,0,0),vt(2.5,2.5,2.5))
  309. boom.Transparency=0.5
  310. boom.Anchored=true
  311. boom.CFrame=Head.CFrame*cf(0,-1,-4)
  312. Hitbox.Parent=workspace
  313. Hitbox.CFrame=boom.CFrame
  314. con1=Hitbox.Touched:connect(function(hit) Damagefunc1(hit,1,5,0) end)
  315. coroutine.resume(coroutine.create(function(Part,Mesh)
  316. while Part.Parent~=nil do
  317. wait()
  318. derp=math.random()
  319. Mesh.Scale=vt(2.5+derp,2.5+derp,2.5+derp)
  320. ElecEffect(Part.CFrame,2,2,2)
  321. MagicBlock(BrickColor.new("Really black"),Part.CFrame,1,1,1,0.1,0.1,0.1)
  322. Hitbox.CFrame=boom.CFrame*cf(math.random(-1,0)+math.random(),math.random(-1,0)+math.random(),math.random(-1,0)+math.random())
  323. end
  324. end),boom,boommsh)
  325. for i=0,1,0.2 do
  326. wait()
  327. LW.C0=cf(-1.5,0.5,0)*euler(1.57,1.57,0)
  328. LW.C1=cf(0, 0.5, 0)*euler(-0.4+0.1*i,0,0)
  329. end
  330. coroutine.resume(coroutine.create(function(Part1,Part2,Part3,Con)
  331. wait(2)
  332. Con:disconnect()
  333. Part2.Parent=nil
  334. Part3.Parent=nil
  335. Part1.Parent=nil
  336. wait(1)
  337. end),Hitbox,boom,armprt,con1)
  338. --[[Hitbox.Parent=nil
  339. con1:disconnect()
  340. boom.Parent=nil
  341. armprt.Parent=nil]]
  342. attack=false
  343. end
  344.  
  345. function attacktwo()
  346. attack=true
  347. for i=0,1,0.2 do
  348. wait()
  349. Neck.C0=necko*euler(0,0,0.6-0.6*i)
  350. RootJoint.C0=RootCF*euler(0,0,-0.6+0.6*i)
  351. LW.C0=cf(-1.5,0.5,0)*euler(1.57,1.57-1.57*i,0)
  352. LW.C1=cf(0, 0.5, 0)*euler(-0.3+0.3*i,0,0)
  353. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.47*i,0,0.6-0.6*i)
  354. end
  355. local boom=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part",vt(1,1,1))
  356. boom.Transparency=0.5
  357. boommsh=mesh("SpecialMesh",boom,"Sphere","",vt(0,0,0),vt(0,0,0))
  358. local boomwld=weld(boom,boom,Head,euler(0,0,0)*cf(0,1,4))
  359. con1=Hitbox.Touched:connect(function(hit) Damagefunc1(hit,5,10,20) end)
  360. for i=0,1,0.2 do
  361. wait()
  362. ElecEffect(boom.CFrame,3,3,3)
  363. LW.C0=cf(-1.5,0.5,0)*euler(1.57,0,0.1*i)
  364. RW.C0=cf(1.5,0.5,0)*euler(1.57,0,-0.1*i)
  365. boommsh.Scale=vt(0.5*(i*3),0.5*(i*3),0.5*(i*3))
  366. Hitbox.CFrame=boom.CFrame
  367. end
  368. con1:disconnect()
  369. boomwld.Parent=nil
  370. boom.Anchored=true
  371. coroutine.resume(coroutine.create(function(Part)
  372. local c=game.Workspace:GetChildren()
  373. for i=1,#c do
  374. local hum=c[i]:findFirstChild("Humanoid")
  375. if hum~=nil and hum.Health~=0 then
  376. local head=c[i]:findFirstChild("Head")
  377. if head~=nil then
  378. local targ=head.Position - Part.Position
  379. local mag=targ.magnitude
  380. if mag<=10 and c[i].Name~=Player.Name then
  381. attackdebounce=false
  382. Damagefunc1(head,10,20,70)
  383. end
  384. end
  385. end
  386. end
  387. so("http://www.roblox.com/asset/?id=2974249",Part,1,1)
  388. so("http://www.roblox.com/asset/?id=1369158",Part,1,2)
  389. numb=0
  390. for i=0,20 do
  391. wait()
  392. MagicBlock(BrickColor.new("Really black"),Part.CFrame,0.5,0.5,0.5,1,1,1)
  393. if numb>=8 then
  394. 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)
  395. numb=0
  396. end
  397. numb=numb+1
  398. end
  399. end),boom)
  400. for i=0,1,0.2 do
  401. wait()
  402. LW.C0=cf(-1.5,0.5,0)*euler(1.57,0,0.1-0.7*i)
  403. RW.C0=cf(1.5,0.5,0)*euler(1.57,0,-0.1+0.7*i)
  404. end
  405. wait(0.2)
  406. boom.Parent=nil
  407. attack=false
  408. end
  409.  
  410. function attackthree()
  411. attack=true
  412. for i=0,1,0.1 do
  413. wait()
  414. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.57*i,0,-0.6)
  415. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.57*i,0,0.6)
  416. end
  417. so("http://www.roblox.com/asset/?id=153092348",Torso,1,1)
  418. vel=Instance.new("BodyVelocity")
  419. vel.Parent=RootPart
  420. vel.maxForce=vt(4e+005,4e+005,4e+005)*1
  421. vel.velocity=Head.CFrame.lookVector*50
  422. ArmHit=false
  423. armcon=RightArm.Touched:connect(function(hit)
  424. if hit~=nil and hit.Parent:findFirstChild("Humanoid")~=nil and ArmHit==false then
  425. armcon:disconnect()
  426. vel.Parent=nil
  427. ArmHit=true
  428. print("HITTED")
  429. Damagefunc1(hit,10,30,20)
  430. MagicBlock(BrickColor.new("Really black"),hit.CFrame*cf(0,-1,0),0.5,0.5,0.5,1,1,1)
  431. for i=1,3 do
  432. 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)
  433. end
  434. so("http://www.roblox.com/asset/?id=153092334",Torso,1,1)
  435. for i=0,1,0.2 do
  436. wait()
  437. Neck.C0=necko*euler(0,0,-1+2*i)
  438. RootJoint.C0=RootCF*euler(0,0,1-2*i)
  439. LW.C0=cf(-1.5,0.5,0)*euler(-0.2,0,-0.6)
  440. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.77*i,0,1)
  441. end
  442. wait(0.4)
  443. if Anim=="Idle" then
  444. for i=0,1,0.1 do
  445. wait()
  446. Neck.C0=necko*euler(0,0,1-1*i)
  447. RootJoint.C0=RootCF*euler(0,0,-1+1*i)
  448. LW.C0=cf(-1.5,0.5,0)*euler(-0.2+0.4*i,1.57*i,-0.6+0.6*i)
  449. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  450. RW.C0=cf(1.5,0.5,0)*euler(-0.2+0.3*i,0,1-1.2*i)
  451. end
  452. end
  453. end
  454. end)
  455. for i=0,1,0.2 do
  456. wait()
  457. MagicBlock(BrickColor.new("Really black"),RightArm.CFrame*cf(0,-2.5,0),0.5,0.5,0.5,0.6,0.6,0.6)
  458. Neck.C0=necko*euler(0,0,-1*i)
  459. RootJoint.C0=RootCF*euler(0,0,1*i)
  460. LW.C0=cf(-1.5,0.5,0)*euler(-0.2*i,0,-0.6)
  461. RW.C0=cf(1.5,0.5,0)*euler(1.57*i,0,0.6+0.4*i)
  462. end
  463. for i=0,1,0.1 do
  464. wait()
  465. MagicBlock(BrickColor.new("Really black"),RightArm.CFrame*cf(0,-2.5,0),0.5,0.5,0.5,0.6,0.6,0.6)
  466. end
  467. vel.Parent=nil
  468. wait(0.5)
  469. if ArmHit==false then
  470. armcon:disconnect()
  471. if Anim=="Idle" then
  472. for i=0,1,0.1 do
  473. wait()
  474. Neck.C0=necko*euler(0,0,-1+1*i)
  475. RootJoint.C0=RootCF*euler(0,0,1-1*i)
  476. LW.C0=cf(-1.5,0.5,0)*euler(-0.2+0.4*i,1.57*i,-0.6+0.6*i)
  477. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  478. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,1-1.2*i)
  479. end
  480. end
  481. end
  482. attack=false
  483. end
  484.  
  485. function Electra()
  486. attack=true
  487. Mode="Electra"
  488. Anim="Switching"
  489. for i=0,1,0.1 do
  490. wait()
  491. LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.4*i,1.57-1.57*i,-0.2*i)
  492. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  493. RW.C0=cf(1.5,0.5,0)*euler(0.1-0.3*i,0,-0.2+0.4*i)
  494. RootJoint.C0=RootCF*cf(0,2*i,0)*euler(0,0,0)
  495. end
  496. wait(1)
  497. attack=false
  498. end
  499.  
  500. function Normal()
  501. attack=true
  502. Mode="Normal"
  503. RootJoint.C0=RootCF
  504. wait(1)
  505. attack=false
  506. end
  507.  
  508. function MakeCube()
  509. attack=true
  510. for i=0,1,0.1 do
  511. wait()
  512. MagicBlock(BrickColor.new("Really black"),Torso.CFrame*cf(0,0.5,-2),0.5,0.5,0.5,0.3,0.3,0.3)
  513. ElecEffect(Torso.CFrame*cf(0,0.5,-2),1,1,1)
  514. Neck.C0=necko*euler(0.1*i,0,0)
  515. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.27*i,1.57-1.57*i,0.4*i)
  516. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  517. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.37*i,0,-0.2-0.2*i)
  518. end
  519. numb=2
  520. for i=0,1,0.1 do
  521. MagicBlock(BrickColor.new("Really black"),Torso.CFrame*cf(0,0.5,-2),0.5,0.5,0.5,0.3,0.3,0.3)
  522. ElecEffect(Torso.CFrame*cf(0,0.5,-2),1,1,1)
  523. Neck.C0=necko*euler(0.1+0.1*(i*numb),0,0)
  524. LW.C0=cf(-1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,0.4+0.1*(i*numb))
  525. RW.C0=cf(1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,-0.4-0.1*(i*numb))
  526. numb=numb-0.1
  527. wait()
  528. end
  529. NewCube()
  530. wait(0.5)
  531. for i=0,1,0.1 do
  532. wait()
  533. Neck.C0=necko*euler(0.2-0.2*i,0,0)
  534. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.37*i,1.57*i,0.5-0.5*i)
  535. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  536. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,-0.5+0.3*i)
  537. end
  538. Neck.C0=necko
  539. attack=false
  540. end
  541.  
  542. function GetCube()
  543. if MMouse.Target~=nil and MMouse.Target.Name=="Cube Vertex2" and MMouse.Target.Parent:findFirstChild("Cube Vertex1")~=nil then
  544. attack=true
  545. throwcube=false
  546. print("GOT CUBE")
  547. mainpart=MMouse.Target
  548. coroutine.resume(coroutine.create(function(Model)
  549. while holdz==true do
  550. wait()
  551. Model["Cube Vertex1"].CFrame=Torso.CFrame*cf(0,0.5,-2)
  552. end
  553. end),mainpart.Parent)
  554. for i=0,1,0.1 do
  555. wait()
  556. ElecEffect(mainpart.CFrame,1,1,1)
  557. Neck.C0=necko*euler(0.1*i,0,0)
  558. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.27*i,1.57-1.57*i,0.4*i)
  559. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  560. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.37*i,0,-0.2-0.2*i)
  561. end
  562. while holdz==true do
  563. wait()
  564. ElecEffect(mainpart.CFrame,1,1,1)
  565. end
  566. if throwcube==false then
  567. for i=0,1,0.1 do
  568. wait()
  569. Neck.C0=necko*euler(0.1-0.1*i,0,0)
  570. LW.C0=cf(-1.5,0.5,0)*euler(1.47-1.27*i,1.57*i,0.4-0.4*i)
  571. LW.C1=cf(0, 0.5, 0)*euler(0.2*i,0,0)
  572. RW.C0=cf(1.5,0.5,0)*euler(1.47-1.37*i,0,-0.4+0.4*i)
  573. end
  574. end
  575. attack=false
  576. end
  577. end
  578.  
  579. function ThrowCube()
  580. attack=true
  581. Main=mainpart.Parent["Cube Vertex1"]
  582. --[[CF=Main.CFrame
  583. for i=0,20 do
  584. wait()
  585. Main.CFrame=CF*cf(0,0,-i)
  586. end
  587. numb=1
  588. for i=0,1,0.1 do
  589. wait()
  590. Main.CFrame=CF*cf(0,0,-20-10*(i*numb))
  591. numb=numb-0.05
  592. end]]
  593. wait()
  594. Main.CFrame=CFrame.new(MMouse.Hit.p)*cf(math.random(-1,1),math.random(0,1),math.random(-1,1))
  595. attack=false
  596. end
  597.  
  598. function GatherCubes()
  599. attack=true
  600. c=workspace:children()
  601. for i=1,#c do
  602. if c[i].Name=="Cube" then
  603. rand1=math.random(-5,5)
  604. rand2=math.random(0,5)
  605. rand3=math.random(-5,5)
  606. coroutine.resume(coroutine.create(function(Model,Rand1,Rand2,Rand3)
  607. while holdx==true do
  608. wait()
  609. Model["Cube Vertex1"].CFrame=Torso.CFrame*cf(Rand1,Rand2,Rand3)
  610. ElecEffect(Model["Cube Vertex2"].CFrame,1,1,1)
  611. end
  612. end),c[i],rand1,rand2,rand3)
  613. end
  614. end
  615. for i=0,1,0.1 do
  616. wait()
  617. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.37*i,1.57-1.57*i,-1.57*i)
  618. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  619. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.47*i,0,-0.2+1.77*i)
  620. end
  621. while holdx==true do
  622. wait()
  623. end
  624. attack=false
  625. end
  626.  
  627. function ThrowCube2()
  628. wait()
  629. if MMouse.Target~=nil then
  630. TargetHit=MMouse.Target
  631. if TargetHit.Anchored==false then
  632. c=workspace:children()
  633. for i=1,#c do
  634. coroutine.resume(coroutine.create(function(Model)
  635. if Model.Name=="Cube" then
  636. while attack==false do
  637. wait(0.1)
  638. MainPrt=Model["Cube Vertex1"]
  639. MainPrt.CFrame=TargetHit.CFrame*cf(math.random(-2,2),math.random(-2,2),math.random(-2,2))
  640. end
  641. end
  642. end),c[i])
  643. end
  644. else
  645. c=workspace:children()
  646. for i=1,#c do
  647. if c[i].Name=="Cube" then
  648. CubModel=c[i]
  649. MainPrt=CubModel["Cube Vertex1"]
  650. MainPrt.CFrame=CFrame.new(MMouse.Hit.p)*cf(math.random(-5,5),math.random(0,5),math.random(-5,5))
  651. end
  652. end
  653. end
  654. end
  655. end
  656.  
  657. function TeleCube()
  658. if MMouse.Target~=nil and MMouse.Target.Name=="Cube Vertex2" and MMouse.Target.Parent:findFirstChild("Cube Vertex1")~=nil then
  659. attack=true
  660. MainPart=MMouse.Target
  661. so("http://www.roblox.com/asset/?id=2101137",Torso,0.7,1)
  662. for i=0,1,0.1 do
  663. wait()
  664. ElecEffect(MainPart.CFrame,1,1,1)
  665. ElecEffect(Torso.CFrame,4,2,4)
  666. Neck.C0=necko*euler(0,0,1.57*i)
  667. RootJoint.C0=RootCF*euler(0,0,-1.57*i)
  668. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.37*i,1.57-1.57*i,-1.57*i)
  669. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  670. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.47*i,0,-0.2+1.77*i)
  671. end
  672. for i=0,1,0.1 do
  673. wait()
  674. ElecEffect(MainPart.CFrame,1,1,1)
  675. ElecEffect(Torso.CFrame,4,2,4)
  676. end
  677. for i=1,2 do
  678. MagicBlock(BrickColor.new("Really black"),Torso.CFrame,0.5,0.5,0.5,2,2,2)
  679. end
  680. so("http://roblox.com/asset/?id=2101144",Torso,1,2)
  681. Torso.CFrame=MainPart.CFrame
  682. for i=1,2 do
  683. MagicBlock(BrickColor.new("Really black"),Torso.CFrame,0.5,0.5,0.5,2,2,2)
  684. end
  685. Neck.C0=necko
  686. RootJoint.C0=RootCF
  687. attack=false
  688. end
  689. end
  690.  
  691. function Apocalypse()
  692. attack=true
  693. c=workspace:children()
  694. for i=1,#c do
  695. if c[i].Name=="Cube" then
  696. so("http://www.roblox.com/asset/?id=2974249",c[i]["Cube Vertex2"],1,1)
  697. coroutine.resume(coroutine.create(function(Model)
  698. while Model.Parent~=nil do
  699. MagicBlock(BrickColor.new("Really black"),Model["Cube Vertex2"].CFrame,0.5,0.5,0.5,0.5,0.5,0.5)
  700. wait()
  701. end
  702. end),c[i])
  703. end
  704. end
  705. for i=0,1,0.2 do
  706. wait()
  707. 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)
  708. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  709. 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)
  710. end
  711. numb=2
  712. for i=0,1,0.1 do
  713. wait()
  714. Neck.C0=necko*euler(0.1*(i*numb),0,0)
  715. LW.C0=cf(-1,0.5,-0.5)*euler(0.4+0.2*(i*numb),0,0.6+0.4*(i*numb))
  716. RW.C0=cf(1,0.5,-0.5)*euler(0.4+0.2*(i*numb),0,-0.6-0.4*(i*numb))
  717. numb=numb-0.1
  718. end
  719. c3=workspace:children()
  720. for i=1,#c3 do
  721. if c3[i].Name=="Cube" then
  722. CubeMod=c3[i]
  723. for i=1,2 do
  724. 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)
  725. end
  726. for i=1,3 do
  727. 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)
  728. end
  729. MagicCircle(BrickColor.new("Navy blue"),CubeMod["Cube Vertex2"].CFrame,1,1,1,3,3,3,0.05)
  730. local c2=game.Workspace:GetChildren()
  731. for i=1,#c2 do
  732. local hum=c2[i]:findFirstChild("Humanoid")
  733. if hum~=nil and hum.Health~=0 then
  734. local head=c2[i]:findFirstChild("Head")
  735. if head~=nil then
  736. local targ=head.Position - CubeMod["Cube Vertex2"].Position
  737. local mag=targ.magnitude
  738. if mag<=15 and c2[i].Name~=Player.Name then
  739. attackdebounce=false
  740. Damagefunc1(head,10,20,0)
  741. end
  742. end
  743. end
  744. end
  745. local cubesoundprt=part(3,workspace,0,1,BrickColor.new("Really black"),"Cube Sound Part",vt(1,1,1))
  746. cubesoundprt.Anchored=true
  747. cubesoundprt.CFrame=CubeMod["Cube Vertex2"].CFrame
  748. game.Debris:AddItem(cubesoundprt,3)
  749. --so("http://www.roblox.com/asset/?id=2974249",Part,1,1)
  750. so("http://www.roblox.com/asset/?id=1369158",cubesoundprt,1,2)
  751. CubeMod:Destroy()
  752. end
  753. end
  754. for i=0,1,0.2 do
  755. wait()
  756. Neck.C0=necko*euler(0.1+0.05*i,0,0)
  757. 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)
  758. 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)
  759. end
  760. numb=2
  761. for i=0,1,0.1 do
  762. wait()
  763. Neck.C0=necko*euler(0.15+0.05*i,0,0)
  764. LW.C0=cf(-1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,-1.47-0.1*(i*numb))
  765. RW.C0=cf(1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,1.47+0.1*(i*numb))
  766. numb=numb-0.1
  767. end
  768. for i=0,1,0.1 do
  769. wait()
  770. Neck.C0=necko*euler(0.2-0.2*i,0,0)
  771. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.37*i,1.57*i,-1.57+1.57*i)
  772. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  773. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,1.57-1.37*i)
  774. end
  775. attack=false
  776. end
  777.  
  778. function Turbine()
  779. if MMouse.Target~=nil and MMouse.Target.Name=="Cube Vertex2" and MMouse.Target.Parent:findFirstChild("Cube Vertex1")~=nil then
  780. BoomCube=MMouse.Target
  781. TargetPart=BoomCube.Parent["Cube Vertex1"]
  782. attack=true
  783. bg=Instance.new("BodyGyro")
  784. bg.maxTorque = vt(0,math.huge,0)
  785. bg.P = 3000
  786. bg.cframe = cf(RootPart.Position,BoomCube.Position)
  787. bg.Parent = RootPart
  788. so("http://www.roblox.com/asset/?id=2101137",BoomCube,1,1)
  789. for i=0,1,0.2 do
  790. wait()
  791. Neck.C0=necko*euler(0,0,1*i)
  792. RootJoint.C0=RootCF*euler(0,0,-1*i)
  793. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.37*i,1.57-1.57*i,-1*i)
  794. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  795. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.47*i,0,-0.2+1.77*i)
  796. Lightning(LeftArm.Position,BoomCube.Position,5,1,"Really black",0.3,0.1,0.1)
  797. end
  798. for i=1,10 do
  799. wait()
  800. Lightning(LeftArm.Position,BoomCube.Position,5,1,"Really black",0.3,0.1,0.1)
  801. end
  802. for i=1,2 do
  803. MagicBlock(BrickColor.new("Really black"),BoomCube.CFrame,0.5,0.5,0.5,2,2,2)
  804. end
  805. MagicCircle(BrickColor.new("Navy blue"),BoomCube.CFrame,1,1,1,2,2,2,0.08)
  806. so("http://www.roblox.com/asset/?id=2697431",BoomCube,1,0.2)
  807. local c2=game.Workspace:GetChildren()
  808. for i=1,#c2 do
  809. local hum=c2[i]:findFirstChild("Humanoid")
  810. if hum~=nil and hum.Health~=0 then
  811. local head=c2[i]:findFirstChild("Head")
  812. if head~=nil then
  813. local targ=head.Position - BoomCube.Position
  814. local mag=targ.magnitude
  815. if mag<=12 and c2[i].Name~=Player.Name then
  816. attackdebounce=false
  817. Damagefunc2(head,10,20,0,BoomCube)
  818. end
  819. end
  820. end
  821. end
  822. TargetPart.CFrame=LeftArm.CFrame*cf(0,-3,0)
  823. wait(0.5)
  824. for i=0,1,0.1 do
  825. wait()
  826. Neck.C0=necko*euler(0,0,1-1*i)
  827. RootJoint.C0=RootCF*euler(0,0,-1+1*i)
  828. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.37*i,1.57*i,-1+1*i)
  829. LW.C1=cf(0, 0.5, 0)*euler(0.2*i,0,0)
  830. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,1.57-1.77*i)
  831. end
  832. bg.Parent=nil
  833. attack=false
  834. end
  835. end
  836.  
  837. function NewCube()
  838. Cube=Instance.new("Model")
  839. Cube.Parent=workspace
  840. Cube.Name="Cube"
  841. local cubevertex=part(3,Cube,0,0.6,BrickColor.new("Really black"),"Cube Vertex1",vt(1,1,1))
  842. cubevertex.Anchored=true
  843. cubevertex.CFrame=Torso.CFrame*cf(0,0.5,-2)
  844. cubevertexmsh=mesh("SpecialMesh",cubevertex,"Sphere","",vt(0,0,0),vt(0.3,0.3,0.3))
  845. local cube=part(3,Cube,0,0.2,BrickColor.new("Really black"),"Cube Vertex2",vt(1.5,1.5,1.5))
  846. cube.CFrame=Torso.CFrame
  847. cubemsh=mesh("BlockMesh",cube,"","",vt(0,0,0),vt(0.4,0.4,0.4))
  848. cubemsh=mesh("SpecialMesh",cube,"Sphere","",vt(0,0,0),vt(0.2,0.2,0.2))
  849. local actualcube=part(3,Cube,0,0.3,BrickColor.new("Navy blue"),"Cube",vt(1,1,1))
  850. actualcube.CFrame=Torso.CFrame
  851. --actualcubemsh=mesh("SpecialMesh",actualcube,"Sphere","",vt(0,0,0),vt(0.4,0.4,0.4))
  852. actualcubemsh=mesh("BlockMesh",actualcube,"","",vt(0,0,0),vt(0.7,0.7,0.7))
  853. local cubewld=weld(actualcube,actualcube,cube,cf(0,0,0))
  854. coroutine.resume(coroutine.create(function(Part,Model)
  855. while Part.Parent~=nil do
  856. wait()
  857. end
  858. Model.Parent=nil
  859. end),actualcube,Cube)
  860. local spark=Instance.new("Sparkles")
  861. spark.Parent=cube
  862. spark.Color=Color3.new(0,0,255)
  863. spark.Enabled=true
  864. light=Instance.new("PointLight")
  865. light.Brightness=.8
  866. light.Color=Color3.new(.2,.2,255)
  867. light.Range=10
  868. light.Parent=cube
  869. coroutine.resume(coroutine.create(function(Part,Weld)
  870. numb1=0
  871. numb2=0
  872. numb3=0
  873. while Part.Parent~=nil do
  874. wait()
  875. Weld.C0=Weld.C0*angles(numb1,numb2,numb3)
  876. numb1=math.pi/math.random(10,20)
  877. numb2=math.pi/math.random(20,30)
  878. numb3=math.pi/math.random(20,30)
  879. end
  880. end),actualcube,cubewld)
  881. prop=Instance.new("RocketPropulsion")
  882. prop.MaxSpeed=5000
  883. prop.CartoonFactor=0
  884. prop.MaxThrust=10000
  885. prop.Parent=cube
  886. prop.Target=cubevertex
  887. prop.ThrustD=1.5
  888. prop.TurnD=0
  889. prop.TurnP=0
  890. print(prop.ThrustD)
  891. prop:Fire()
  892. end
  893.  
  894. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  895. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  896. end
  897.  
  898. function Lightning(p0,p1,tym,ofs,col,th,tra,last)
  899. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  900. for i=1,tym do
  901. 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)
  902. 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)])
  903. light1=Instance.new("PointLight")
  904. light1.Brightness=.8
  905. light1.Color=Color3.new(.2,255,.2)
  906. light1.Range=8
  907. light1.Parent=li
  908. local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz
  909. if tym == i then
  910. local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2)
  911. li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2)
  912. else
  913. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2)
  914. end
  915. curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,last)
  916. end
  917. end
  918.  
  919. function ElecEffect(cff,x,y,z)
  920. local prt=part(3,workspace,0,0,BrickColor.new("Really black"),"Part",vt(1,1,1))
  921. prt.Anchored=true
  922. xval=math.random()
  923. yval=math.random()
  924. zval=math.random()
  925. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(xval,yval,zval))
  926. coroutine.resume(coroutine.create(function(Part,Mesh,Frame,xvaal,yvaal,zvaal)
  927. Part.CFrame=Frame*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
  928. for i=1,8 do
  929. wait()
  930. xvaal=xvaal-0.1
  931. yvaal=yvaal-0.1
  932. zvaal=zvaal-0.1
  933. Mesh.Scale=vt(xvaal,yvaal,zvaal)
  934. Part.Transparency=Part.Transparency+0.09
  935. end
  936. Part.Parent=nil
  937. end),prt,msh,cff,xval,yval,zval)
  938. end
  939.  
  940. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3)
  941. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  942. prt.Anchored=true
  943. prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  944. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  945. coroutine.resume(coroutine.create(function(Part,Mesh)
  946. for i=0,1,0.1 do
  947. wait()
  948. Part.CFrame=Part.CFrame
  949. Part.Transparency=i
  950. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  951. end
  952. Part.Parent=nil
  953. end),prt,msh)
  954. end
  955.  
  956. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  957. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  958. prt.Anchored=true
  959. prt.CFrame=cframe
  960. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  961. coroutine.resume(coroutine.create(function(Part,Mesh)
  962. for i=0,1,delay do
  963. wait()
  964. Part.CFrame=Part.CFrame
  965. Part.Transparency=i
  966. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  967. end
  968. Part.Parent=nil
  969. end),prt,msh)
  970. end
  971.  
  972. function MagicRing(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
  973. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  974. prt.Anchored=true
  975. prt.CFrame=cframe*euler(x2,y2,z2)
  976. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  977. coroutine.resume(coroutine.create(function(Part,Mesh)
  978. for i=0,1,0.03 do
  979. wait()
  980. Part.CFrame=Part.CFrame
  981. Part.Transparency=i
  982. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  983. end
  984. Part.Parent=nil
  985. end),prt,msh)
  986. end
  987.  
  988. so = function(id,par,vol,pit)
  989. coroutine.resume(coroutine.create(function()
  990. local sou = Instance.new("Sound",par or workspace)
  991. sou.Volume=vol
  992. sou.Pitch=pit or 1
  993. sou.SoundId=id
  994. wait()
  995. sou:play()
  996. wait(6)
  997. sou:Remove()
  998. end))
  999. end
  1000.  
  1001. function findNearestTorso(pos)
  1002. local list = game:service("Workspace"):children()
  1003. local torso = nil
  1004. local dist = 50
  1005. local temp = nil
  1006. local human = nil
  1007. local temp2 = nil
  1008. for x = 1, #list do
  1009. temp2 = list[x]
  1010. if (temp2.className == "Model") and (temp2 ~= Character) and (temp2.Name ~= "Fenrier") then
  1011. temp = temp2:findFirstChild("Torso")
  1012. human = temp2:findFirstChild("Humanoid")
  1013. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  1014. if (temp.Position - pos).magnitude < dist then
  1015. torso = temp
  1016. dist = (temp.Position - pos).magnitude
  1017. end
  1018. end
  1019. end
  1020. end
  1021. return torso
  1022. end
  1023.  
  1024. Damagefunc1=function(hit,minim,maxim,Knockback)
  1025. if hit.Parent==nil then
  1026. return
  1027. end
  1028. CPlayer=Bin
  1029. h=hit.Parent:FindFirstChild("Humanoid")
  1030. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1031. if attackdebounce == false then
  1032. attackdebounce = true
  1033. coroutine.resume(coroutine.create(function()
  1034. wait(0.2)
  1035. attackdebounce = false
  1036. end))
  1037. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1038. return
  1039. end]]
  1040. -- hs(hit,1.2)
  1041. c=Instance.new("ObjectValue")
  1042. c.Name="creator"
  1043. c.Value=game:service("Players").LocalPlayer
  1044. c.Parent=h
  1045. game:GetService("Debris"):AddItem(c,.5)
  1046. Damage=math.random(minim,maxim)
  1047. -- h:TakeDamage(Damage)
  1048. blocked=false
  1049. block=hit.Parent:findFirstChild("Block")
  1050. if block~=nil then
  1051. print("herp")
  1052. if block.Value>0 then
  1053. blocked=true
  1054. block.Value=block.Value-1
  1055. print(block.Value)
  1056. end
  1057. end
  1058. if blocked==false then
  1059. -- h:TakeDamage(Damage)
  1060. h.Health=h.Health-Damage
  1061. showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  1062. else
  1063. h.Health=h.Health-(Damage/2)
  1064. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Navy blue"))
  1065. end
  1066. vp=Instance.new("BodyVelocity")
  1067. vp.P=500
  1068. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1069. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1070. vp.velocity=Head.CFrame.lookVector*Knockback+Head.Velocity/1.05
  1071. if Knockback>0 then
  1072. vp.Parent=hit.Parent.Torso
  1073. end
  1074. game:GetService("Debris"):AddItem(vp,.25)
  1075. c=Instance.new("ObjectValue")
  1076. c.Name="creator"
  1077. c.Value=Player
  1078. c.Parent=h
  1079. game:GetService("Debris"):AddItem(c,.5)
  1080. CRIT=false
  1081. hitDeb=true
  1082. AttackPos=6
  1083. end
  1084. end
  1085. end
  1086.  
  1087. Damagefunc2=function(hit,minim,maxim,Knockback,MainPart)
  1088. if hit.Parent==nil then
  1089. return
  1090. end
  1091. CPlayer=Bin
  1092. h=hit.Parent:FindFirstChild("Humanoid")
  1093. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1094. if attackdebounce == false then
  1095. attackdebounce = true
  1096. coroutine.resume(coroutine.create(function()
  1097. wait(0.2)
  1098. attackdebounce = false
  1099. end))
  1100. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1101. return
  1102. end]]
  1103. -- hs(hit,1.2)
  1104. c=Instance.new("ObjectValue")
  1105. c.Name="creator"
  1106. c.Value=game:service("Players").LocalPlayer
  1107. c.Parent=h
  1108. game:GetService("Debris"):AddItem(c,.5)
  1109. Damage=math.random(minim,maxim)
  1110. -- h:TakeDamage(Damage)
  1111. blocked=false
  1112. block=hit.Parent:findFirstChild("Block")
  1113. if block~=nil then
  1114. print("herp")
  1115. if block.Value>0 then
  1116. blocked=true
  1117. block.Value=block.Value-1
  1118. print(block.Value)
  1119. end
  1120. end
  1121. if blocked==false then
  1122. -- h:TakeDamage(Damage)
  1123. h.Health=h.Health-Damage
  1124. showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  1125. else
  1126. h.Health=h.Health-(Damage/2)
  1127. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Navy blue"))
  1128. end
  1129. newpos2=MainPart.Position
  1130. local angle = (hit.Position-(newpos2+Vector3.new(0,-3,0))).unit
  1131. print(angle)
  1132. hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1133. rl=Instance.new("BodyAngularVelocity")
  1134. rl.P=3000
  1135. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1136. rl.angularvelocity=Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  1137. rl.Parent=hit
  1138. game:GetService("Debris"):AddItem(rl,1)
  1139. --end
  1140. local bodyVelocity=Instance.new("BodyVelocity")
  1141. bodyVelocity.velocity=angle*40+Vector3.new(0,35,0)
  1142. bodyVelocity.P=5000
  1143. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1144. bodyVelocity.Parent=hit
  1145. game:GetService("Debris"):AddItem(bodyVelocity,.7)
  1146. c=Instance.new("ObjectValue")
  1147. c.Name="creator"
  1148. c.Value=Player
  1149. c.Parent=h
  1150. game:GetService("Debris"):AddItem(c,.5)
  1151. CRIT=false
  1152. hitDeb=true
  1153. AttackPos=6
  1154. end
  1155. end
  1156. end
  1157.  
  1158. showDamage=function(Char,Dealt,du,Color)
  1159. m=Instance.new("Model")
  1160. m.Name=tostring(Dealt)
  1161. h=Instance.new("Humanoid")
  1162. h.Health=0
  1163. h.MaxHealth=0
  1164. h.Parent=m
  1165. c=Instance.new("Part")
  1166. c.Material = "SmoothPlastic"
  1167. c.Transparency=0
  1168. c.BrickColor=Color
  1169. c.Name="Head"
  1170. c.TopSurface="SmoothNoOutlines"
  1171. c.BottomSurface="SmoothNoOutlines"
  1172. c.LeftSurface="SmoothNoOutlines"
  1173. c.RightSurface="SmoothNoOutlines"
  1174. c.formFactor="Plate"
  1175. c.Size=Vector3.new(1,.4,1)
  1176. ms=Instance.new("CylinderMesh")
  1177. ms.Scale=Vector3.new(.8,.8,.8)
  1178. if CRIT==true then
  1179. ms.Scale=Vector3.new(1,1.25,1)
  1180. end
  1181. ms.Parent=c
  1182. c.Reflectance=0
  1183. Instance.new("BodyGyro").Parent=c
  1184. c.Parent=m
  1185. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1186. f=Instance.new("BodyPosition")
  1187. f.P=2000
  1188. f.D=100
  1189. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1190. f.position=c.Position+Vector3.new(0,3,0)
  1191. f.Parent=c
  1192. game:GetService("Debris"):AddItem(m,.5+du)
  1193. c.CanCollide=false
  1194. m.Parent=workspace
  1195. c.CanCollide=false
  1196. end
  1197.  
  1198. function ob1d(mouse)
  1199. if holdz==true then
  1200. throwcube=true
  1201. holdz=false
  1202. ThrowCube()
  1203. return end
  1204. if holdx==true then
  1205. throwcube=true
  1206. holdx=false
  1207. ThrowCube2()
  1208. return end
  1209. if attack == true then return end
  1210. hold=true
  1211. if combo==0 then
  1212. combo=1
  1213. attackone()
  1214. elseif combo==1 then
  1215. combo=2
  1216. attacktwo()
  1217. elseif combo==2 then
  1218. combo=3
  1219. attackthree()
  1220. end
  1221. coroutine.resume(coroutine.create(function()
  1222. wait(0.5)
  1223. if attack==false then
  1224. combo=0
  1225. Neck.C0=necko
  1226. RootJoint.C0=RootCF
  1227. LW.C0=cf(-1.5,0.5,0)*euler(0.2,1.57,0)
  1228. LW.C1=cf(0, 0.5, 0)*euler(-0.2,0,0)
  1229. RW.C0=cf(1.5,0.5,0)*euler(0.1,0,-0.2)
  1230. end
  1231. end))
  1232. end
  1233.  
  1234. function ob1u(mouse)
  1235. hold = false
  1236. end
  1237.  
  1238. buttonhold = false
  1239. holdz=false
  1240. holdx=false
  1241.  
  1242. eul=0
  1243. function key(key)
  1244. if attack == true then return end
  1245. --[[if key=="f" then
  1246. if Mode=="Normal" then
  1247. Electra()
  1248. elseif Mode=="Electra" then
  1249. Normal()
  1250. end
  1251. end]]
  1252. if key=="q" then
  1253. Apocalypse()
  1254. end
  1255. if key=="e" then
  1256. Turbine()
  1257. end
  1258. if key=="f" then
  1259. MakeCube()
  1260. end
  1261. if key=="z" then
  1262. holdz=true
  1263. GetCube()
  1264. end
  1265. if key=="x" then
  1266. holdx=true
  1267. GatherCubes()
  1268. end
  1269. if key=="c" then
  1270. TeleCube()
  1271. end
  1272. end
  1273.  
  1274. function key2(key)
  1275. if key=="z" then
  1276. holdz=false
  1277. end
  1278. if key=="x" then
  1279. holdx=false
  1280. end
  1281. end
  1282.  
  1283. function s(mouse)
  1284. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1285. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1286. mouse.KeyDown:connect(key)
  1287. mouse.KeyUp:connect(key2)
  1288. unsheathed = true
  1289. player = Player
  1290. ch = Character
  1291. MMouse = mouse
  1292. RSH = ch.Torso["Right Shoulder"]
  1293. LSH = ch.Torso["Left Shoulder"]
  1294. --
  1295. RSH.Parent = nil
  1296. LSH.Parent = nil
  1297. --
  1298. RW.Part0 = ch.Torso
  1299. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1300. RW.C1 = CFrame.new(0, 0.5, 0)
  1301. RW.Part1 = ch["Right Arm"]
  1302. RW.Parent = ch.Torso
  1303. --_G.R = RW
  1304. --
  1305. LW.Part0 = ch.Torso
  1306. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1307. LW.C1 = CFrame.new(0, 0.5, 0)
  1308. LW.Part1 = ch["Left Arm"]
  1309. LW.Parent = ch.Torso
  1310. --_G.L = LW
  1311. --
  1312. equipanim()
  1313. end
  1314.  
  1315. function ds(mouse)
  1316. hideanim()
  1317. wait(0)
  1318. RW.Parent = nil
  1319. LW.Parent = nil
  1320. RSH.Parent = player.Character.Torso
  1321. LSH.Parent = player.Character.Torso
  1322. end
  1323.  
  1324. Bin.Selected:connect(s)
  1325. Bin.Deselected:connect(ds)
  1326. Humanoid.Died:connect(function()
  1327. c=workspace:children()
  1328. for i=1,#c do
  1329. if c[i].Name=="Cube" then
  1330. c[i]:Remove()
  1331. end
  1332. end
  1333. end)
  1334. --[[function onRunning(speed)
  1335. if attack==true then return end
  1336. if speed>0 then
  1337. walking = true
  1338. for i = 0,1,0.1 do
  1339. wait()
  1340. LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.4*i,1.57,0)
  1341. end
  1342. else
  1343. walking = false
  1344. for i = 0,1,0.1 do
  1345. wait()
  1346. LW.C0=cf(-1.5,0.5,0)*euler(-0.2+0.4*i,1.57,0)
  1347. end
  1348. end
  1349. end
  1350. Character.Humanoid.Running:connect(onRunning) ]]
  1351. Anim="Idle"
  1352. walkoffset1=0
  1353. walkoffset2=0
  1354. Switching=false
  1355. while true do
  1356. wait()
  1357. if Mode=="Normal" then
  1358. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1359. if RootPart.Velocity.y > 2 then
  1360. if Anim~="Jump" then
  1361. Anim="Jump"
  1362. coroutine.resume(coroutine.create(function()
  1363. for i=0,1,0.2 do
  1364. wait()
  1365. LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.6*i,1.57-1.57*i,0)
  1366. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  1367. RW.C0=cf(1.5,0.5,0)*euler(0.1-0.1*i,0,-0.2)
  1368. end
  1369. end))
  1370. end
  1371. elseif RootPart.Velocity.y < -2 then
  1372. if Anim~="Fall" then
  1373. Anim="Fall"
  1374. coroutine.resume(coroutine.create(function()
  1375. for i=0,1,0.2 do
  1376. wait()
  1377. LW.C0=cf(-1.5,0.5,0)*euler(-0.4+2.8*i,0,0)
  1378. RW.C0=cf(1.5,0.5,0)*euler(0,0,-0.2)
  1379. end
  1380. end))
  1381. end
  1382. elseif torvel < 1 then
  1383. if Anim~="Idle" then
  1384. Anim="Idle"
  1385. coroutine.resume(coroutine.create(function()
  1386. wait(0.1)
  1387. while Switching==true do
  1388. wait()
  1389. end
  1390. while Anim=="Idle" do
  1391. for i = 0,1,0.02 do
  1392. if Anim=="Idle" and attack==false then
  1393. wait()
  1394. LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.1*i,1.57-0.05*i,0)
  1395. RW.C0=cf(1.5,0.5-0.1*i,0)*euler(0.1+0.1*i,0,-0.2)
  1396. end
  1397. end
  1398. for i = 0,1,0.02 do
  1399. if Anim=="Idle" and attack==false then
  1400. wait()
  1401. LW.C0=cf(-1.5,0.5,0)*euler(0.1+0.1*i,1.52+0.05*i,0)
  1402. RW.C0=cf(1.5,0.4+0.1*i,0)*euler(0.2-0.1*i,0,-0.2)
  1403. end
  1404. end
  1405. wait(0)
  1406. end
  1407. if Anim=="Walk" and attack==false then
  1408. print("Switch to Walk")
  1409. Switching=true
  1410. walkoffset1=0
  1411. walkoffset2=0
  1412. for i=0,1,0.15 do
  1413. wait()
  1414. walkoffset1=0.2+0.8*i
  1415. walkoffset2=0.1-0.9*i
  1416. LW.C0=cf(-1.5,0.5,0)*euler(walkoffset1,1.57-1.57*i,0)
  1417. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  1418. RW.C0=cf(1.5,0.5,0)*euler(walkoffset2,0,-0.2+0.2*i)
  1419. end
  1420. Switching=false
  1421. elseif Anim=="Run" and attack==false then
  1422. print("Switch to Run")
  1423. Switching=true
  1424. for i=0,1,0.1 do
  1425. wait()
  1426. if Anim=="Run" and attack==false then
  1427. print("runnin")
  1428. RootJoint.C0=RootCF*euler(0.5*i,0,0)
  1429. Neck.C0=necko*euler(-0.3*i,0,0)
  1430. LW.C0=cf(-1.5,0.5,0)*euler(0.2-1.2*i,1.57-1.57*i,0)
  1431. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  1432. RW.C0=cf(1.5,0.5,0)*euler(0.1-1.1*i,0,-0.2+0.2*i)
  1433. end
  1434. end
  1435. Switching=false
  1436. end
  1437. end))
  1438. end
  1439. elseif torvel < 19 then
  1440. if Anim~="Walk" then
  1441. Anim="Walk"
  1442. coroutine.resume(coroutine.create(function()
  1443. wait(0.1)
  1444. while Switching==true do
  1445. wait()
  1446. end
  1447. while Anim=="Walk" do
  1448. for i=0,1,0.15 do
  1449. if Anim=="Walk" and attack==false then
  1450. wait()
  1451. walkoffset1=1-2*i
  1452. walkoffset2=-1+2*i
  1453. LW.C0=cf(-1.5,0.5,0)*euler(walkoffset1,0,0)
  1454. RW.C0=cf(1.5,0.5,0)*euler(walkoffset2,0,0)
  1455. end
  1456. end
  1457. for i=0,1,0.15 do
  1458. if Anim=="Walk" and attack==false then
  1459. wait()
  1460. walkoffset1=-1+2*i
  1461. walkoffset2=1-2*i
  1462. LW.C0=cf(-1.5,0.5,0)*euler(walkoffset1,0,0)
  1463. RW.C0=cf(1.5,0.5,0)*euler(walkoffset2,0,0)
  1464. end
  1465. end
  1466. wait(0)
  1467. end
  1468. if Anim=="Idle" and attack==false then
  1469. print("Switch to Idle")
  1470. Switching=true
  1471. for i=0,1,0.1 do
  1472. wait()
  1473. if Anim=="Idle" and attack==false then
  1474. LW.C0=cf(-1.5,0.5,0)*euler((walkoffset1-walkoffset1*i)+(0.2*i),1.57*i,0)
  1475. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  1476. RW.C0=cf(1.5,0.5,0)*euler((walkoffset2-walkoffset2*i)+(0.1*i),0,-0.2*i)
  1477. end
  1478. end
  1479. walkoffset1=0
  1480. walkoffset2=0
  1481. Switching=false
  1482. end
  1483. end))
  1484. end
  1485. elseif torvel >= 30 then
  1486. if Anim~="Run" then
  1487. Anim="Run"
  1488. coroutine.resume(coroutine.create(function()
  1489. while Anim=="Run" do
  1490. wait()
  1491. if Anim=="Run" and attack==false then
  1492. LW.C0=cf(-1.5,0.5,0)*euler(-1,0,0)
  1493. LW.C1=cf(0, 0.5, 0)*euler(0,0,0)
  1494. RW.C0=cf(1.5,0.5,0)*euler(-1,0,0)
  1495. end
  1496. end
  1497. if Anim=="Idle" and attack==false then
  1498. print("Switch to Idle")
  1499. Switching=true
  1500. for i=0,1,0.1 do
  1501. wait()
  1502. RootJoint.C0=RootCF*euler(0.5-0.5*i,0,0)
  1503. Neck.C0=necko*euler(-0.3+0.3*i,0,0)
  1504. LW.C0=cf(-1.5,0.5,0)*euler(-1+1.2*i,1.57*i,0)
  1505. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  1506. RW.C0=cf(1.5,0.5,0)*euler(-1+1.1*i,0,-0.2*i)
  1507. end
  1508. Switching=false
  1509. end
  1510. end))
  1511. end
  1512. end
  1513. elseif Mode=="Electra" then
  1514. end
  1515. end
  1516. print("Mechanic Gauntlets loaded.")
  1517.  
  1518. --[[
  1519. Copyrighted (C) Fenrier 2014
  1520. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement