Advertisement
StarzoZero

Untitled

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