Advertisement
replic8

Untitled

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