Advertisement
iam41566

Fen's Dual Gauntlets

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