Advertisement
Axelpuff

DemonSword FE

Aug 15th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 57.34 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end
  2. print("FE Compatibility: by WaverlyCole & Mokiros")
  3. InternalData = {}
  4. do
  5. script.Parent = owner.Character
  6. local Event = Instance.new("RemoteEvent")
  7. Event.Name = "UserInput"
  8. local function NewFakeEvent()
  9. local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect
  10. return Fake
  11. end
  12. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  13. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  14. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  15. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  16. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  17. local function TriggerEvent(self,Event,...)
  18. local Trigger = Mouse[Event]
  19. if Trigger and Trigger.fakeEvent and Trigger.Function then
  20. Trigger.Function(...)
  21. end
  22. end
  23. Mouse.TrigEvent = TriggerEvent
  24. UserInputService.TrigEvent = TriggerEvent
  25. Event.OnServerEvent:Connect(function(FiredBy,Input)
  26. if FiredBy.Name ~= owner.Name then end
  27. if Input.MouseEvent then
  28. Mouse.Target = Input.Target
  29. Mouse.Hit = Input.Hit
  30. else
  31. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  32. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  33. return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up")
  34. end
  35. for _,Action in pairs(ContextActionService.Actions) do
  36. for _,Key in pairs(Action.Keys) do
  37. if Key==Input.KeyCode then
  38. Action.Function(Action.Name,Input.UserInputState,Input)
  39. end
  40. end
  41. end
  42. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  43. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  44. end
  45. end)
  46. InternalData["Mouse"] = Mouse
  47. InternalData["ContextActionService"] = ContextActionService
  48. InternalData["UserInputService"] = UserInputService
  49. Event.Parent = NLS([[
  50. local Player = owner
  51. local Event = script:WaitForChild("UserInput")
  52. local UserInputService = game:GetService("UserInputService")
  53. local Mouse = Player:GetMouse()
  54. local Input = function(Input,gameProcessedEvent)
  55. if gameProcessedEvent then return end
  56. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  57. end
  58. UserInputService.InputBegan:Connect(Input)
  59. UserInputService.InputEnded:Connect(Input)
  60. local Hit,Target
  61. while wait(1/30) do
  62. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  63. Hit,Target = Mouse.Hit,Mouse.Target
  64. Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  65. end
  66. end
  67. ]],owner.Character)
  68. end
  69. RealGame = game;game = setmetatable({},{
  70. __index = function (self,Index)
  71. local Sandbox = function (Thing)
  72. if Thing:IsA("Player") then
  73. local RealPlayer = Thing
  74. return setmetatable({},{
  75. __index = function (self,Index)
  76. local Type = type(RealPlayer[Index])
  77. if Type == "function" then
  78. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  79. return function (self)
  80. return InternalData["Mouse"]
  81. end
  82. end
  83. return function (self,...)
  84. return RealPlayer[Index](RealPlayer,...)
  85. end
  86. else
  87. if Index == "PlrObj" then
  88. return RealPlayer
  89. end
  90. return RealPlayer[Index]
  91. end
  92. end;
  93. __tostring = function(self)
  94. return RealPlayer.Name
  95. end
  96. })
  97. end
  98. end
  99. if RealGame[Index] then
  100. local Type = type(RealGame[Index])
  101. if Type == "function" then
  102. if Index:lower() == "getservice" or Index:lower() == "service" then
  103. return function (self,Service)
  104. if Service:lower() == "players" then
  105. return setmetatable({},{
  106. __index = function (self2,Index2)
  107. local RealService = RealGame:GetService(Service)
  108. local Type2 = type(Index2)
  109. if Type2 == "function" then
  110. return function (self,...)
  111. return RealService[Index2](RealService,...)
  112. end
  113. else
  114. if Index2:lower() == "localplayer" then
  115. return Sandbox(owner)
  116. end
  117. return RealService[Index2]
  118. end
  119. end;
  120. __tostring = function(self)
  121. return RealGame:GetService(Service).Name
  122. end
  123. })
  124. elseif Service:lower() == "contextactionservice" then
  125. return InternalData["ContextActionService"]
  126. elseif Service:lower() == "contextactionservice" then
  127. return InternalData["UserInputService"]
  128. elseif Service:lower() == "runservice" then
  129. return setmetatable({},{
  130. __index = function(self2,Index2)
  131. local RealService = RealGame:GetService(Service)
  132. local Type2 = type(Index2)
  133. if Type2 == "function" then
  134. return function (self,...)
  135. return RealService[Index2](RealService,...)
  136. end
  137. else
  138. if Index2:lower() == "bindtorenderstep" then
  139. return function (self,Name,Priority,Function)
  140. return RealGame:GetService("RunService").Stepped:Connect(Function)
  141. end
  142. end
  143. if Index2:lower() == "renderstepped" then
  144. return RealService["Stepped"]
  145. end
  146. return RealService[Index2]
  147. end
  148. end
  149. })
  150. else
  151. return RealGame:GetService(Service)
  152. end
  153. end
  154. end
  155. return function (self,...)
  156. return RealGame[Index](RealGame,...)
  157. end
  158. else
  159. if game:GetService(Index) then
  160. return game:GetService(Index)
  161. end
  162. return RealGame[Index]
  163. end
  164. else
  165. return nil
  166. end
  167. end
  168. });Game = game;owner = game:GetService("Players").LocalPlayer;script = {}
  169. print("Complete! Running...")
  170.  
  171.  
  172. --//Paste script below this line.
  173.  
  174. de=true
  175. Player=owner
  176. Character=Player.Character
  177. PlayerGui=Player.PlayerGui
  178. Backpack=Player.Backpack
  179. Torso=Character.Torso
  180. Head=Character.Head
  181. Humanoid=Character.Humanoid
  182. LeftArm=Character["Left Arm"]
  183. LeftLeg=Character["Left Leg"]
  184. RightArm=Character["Right Arm"]
  185. RightLeg=Character["Right Leg"]
  186. LS=Torso["Left Shoulder"]
  187. LH=Torso["Left Hip"]
  188. RS=Torso["Right Shoulder"]
  189. Character=Player.Character
  190. PlayerGui=Player.PlayerGui
  191. Backpack=Player.Backpack
  192. Torso=Character.Torso
  193. Head=Character.Head
  194. Humanoid=Character.Humanoid
  195. LeftArm=Character["Left Arm"]
  196. LeftLeg=Character["Left Leg"]
  197. RightArm=Character["Right Arm"]
  198. RightLeg=Character["Right Leg"]
  199. LS=Torso["Left Shoulder"]
  200. LH=Torso["Left Hip"]
  201. RS=Torso["Right Shoulder"]
  202. RH=Torso["Right Hip"]
  203. Face = Head.face
  204. Neck=Torso.Neck
  205. it=Instance.new
  206. attacktype=1
  207. vt=Vector3.new
  208. cf=CFrame.new
  209. euler=CFrame.fromEulerAnglesXYZ
  210. angles=CFrame.Angles
  211. cloaked=false
  212. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  213. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  214. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  215. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  216. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  217. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  218. RootPart=Character.HumanoidRootPart
  219. RootJoint=RootPart.RootJoint
  220. RootCF=euler(-1.57,0,3.14)
  221. attack = false
  222. attackdebounce = false
  223. deb=false
  224. equipped=true
  225. hand=false
  226. Mouse=nil
  227. combo=0
  228. mana=0
  229. trispeed=.2
  230. attackmode='none'
  231. local idle=0
  232. local Anim="Idle"
  233. local Effects={}
  234. local gun=false
  235. local shoot=false
  236. player=nil
  237. mana=0
  238. Mouse=Player:GetMouse()
  239. --save shoulders
  240. RSH, LSH=nil, nil
  241. --welds
  242. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  243. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  244. LH=Torso["Left Hip"]
  245. RH=Torso["Right Hip"]
  246. TorsoColor=Torso.BrickColor
  247. function NoOutline(Part)
  248. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  249. end
  250. player=Player
  251. ch=Character
  252. RSH=ch.Torso["Right Shoulder"]
  253. LSH=ch.Torso["Left Shoulder"]
  254. --
  255. RSH.Parent=nil
  256. LSH.Parent=nil
  257. --
  258. RW.Name="Right Shoulder"
  259. RW.Part0=ch.Torso
  260. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  261. RW.C1=cf(0, 0.5, 0)
  262. RW.Part1=ch["Right Arm"]
  263. RW.Parent=ch.Torso
  264. --
  265. LW.Name="Left Shoulder"
  266. LW.Part0=ch.Torso
  267. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  268. LW.C1=cf(0, 0.5, 0)
  269. LW.Part1=ch["Left Arm"]
  270. LW.Parent=ch.Torso
  271.  
  272.  
  273.  
  274. local function weldBetween(a, b)
  275. local weldd = Instance.new("ManualWeld")
  276. weldd.Part0 = a
  277. weldd.Part1 = b
  278. weldd.C0 = CFrame.new()
  279. weldd.C1 = b.CFrame:inverse() * a.CFrame
  280. weldd.Parent = a
  281. return weldd
  282. end
  283.  
  284. function swait(num)
  285. if num==0 or num==nil then
  286. game:service'RunService'.Heartbeat:wait(0)
  287. else
  288. for i=0,num do
  289. game:service'RunService'.Heartbeat:wait(0)
  290. end
  291. end
  292. end
  293.  
  294. a = Instance.new("ScreenGui")
  295. a.Name="CooldownGUI"
  296. a.Parent=Player.PlayerGui
  297.  
  298. b = Instance.new("Frame")
  299. b.Parent=a
  300. b.Visible=true
  301. b.BackgroundTransparency=0.3
  302. b.BackgroundColor3=Color3.fromRGB(0, 0, 0)
  303. b.BorderColor3=Color3.fromRGB(255, 255, 255)
  304. b.BorderSizePixel=3
  305. b.Position=UDim2.new(0.7, 0, 0.75, 0)
  306. b.Size=UDim2.new(0, 200, 0, 100)
  307.  
  308. c = Instance.new("Frame")
  309. c.Parent=a
  310. c.Visible=true
  311. c.BackgroundTransparency=0.3
  312. c.BorderColor3=Color3.fromRGB(255, 255, 255)
  313. c.BorderSizePixel=3
  314. c.BackgroundColor3=Color3.fromRGB(0, 0, 0)
  315. c.Position=UDim2.new(0.875, 0, 0.75, 0)
  316. c.Size=UDim2.new(0, 200, 0, 100)
  317.  
  318. d = Instance.new("Frame")
  319. d.Parent=a
  320. d.Visible=true
  321. d.BackgroundTransparency=0.3
  322. d.BorderColor3=Color3.fromRGB(255, 255, 255)
  323. d.BorderSizePixel=3
  324. d.BackgroundColor3=Color3.fromRGB(0, 0, 0)
  325. d.Position=UDim2.new(0.875, 0, 0.95, 0)
  326. d.Size=UDim2.new(0, 200, 0, 100)
  327.  
  328. e = Instance.new("Frame")
  329. e.Parent=a
  330. e.Visible=true
  331. e.BackgroundTransparency=0.3
  332. e.BorderColor3=Color3.fromRGB(255, 255, 255)
  333. e.BorderSizePixel=3
  334. e.BackgroundColor3=Color3.fromRGB(0, 0, 0)
  335. e.Position=UDim2.new(0.7, 0, 0.95, 0)
  336. e.Size=UDim2.new(0, 200, 0, 100)
  337.  
  338. f = Instance.new("Frame")
  339. f.Parent=a
  340. f.Visible=true
  341. f.BackgroundTransparency=0.3
  342. f.BorderColor3=Color3.fromRGB(255, 255, 255)
  343. f.BorderSizePixel=3
  344. f.BackgroundColor3=Color3.fromRGB(0, 0, 0)
  345. f.Position=UDim2.new(1.675, 0, 0.95, 0)
  346. f.Size=UDim2.new(0, 200, 0, 100)
  347.  
  348. g = Instance.new("Frame")
  349. g.Parent=a
  350. g.Visible=true
  351. g.BackgroundTransparency=0.3
  352. g.BorderColor3=Color3.fromRGB(255, 255, 255)
  353. g.BorderSizePixel=3
  354. g.BackgroundColor3=Color3.fromRGB(0, 0, 0)
  355. g.Position=UDim2.new(1.675, 0, 0.75, 0)
  356. g.Size=UDim2.new(0, 200, 0, 100)
  357.  
  358. b2=Instance.new("TextLabel")
  359. b2.Parent=a
  360. b2.BackgroundTransparency=1
  361. b2.BorderColor3=Color3.fromRGB(139, 139, 139)
  362. b2.BorderSizePixel=3
  363. b2.Position=b.Position
  364. b2.Size=UDim2.new(0, 200, 0, 100)
  365. b2.Visible=true
  366. b2.ZIndex=3
  367. b2.Font="SourceSansItalic"
  368. b2.FontSize="Size32"
  369. b2.TextColor3=Color3.fromRGB(255, 255, 255)
  370. b2.TextScaled=false
  371. b2.TextStrokeColor3=Color3.fromRGB(139, 139, 139)
  372. b2.TextTransparency=0
  373. b2.Text=[[
  374. Shock
  375. (Z)
  376. ]]
  377.  
  378. c2=Instance.new("TextLabel")
  379. c2.Parent=a
  380. c2.BackgroundTransparency=1
  381. c2.BorderColor3=Color3.fromRGB(139, 139, 139)
  382. c2.BorderSizePixel=3
  383. c2.Position=c.Position
  384. c2.Size=UDim2.new(0, 200, 0, 100)
  385. c2.Visible=true
  386. c2.ZIndex=3
  387. c2.Font="SourceSansItalic"
  388. c2.FontSize="Size32"
  389. c2.TextColor3=Color3.fromRGB(255, 255, 255)
  390. c2.TextScaled=false
  391. c2.TextStrokeColor3=Color3.fromRGB(139, 139, 139)
  392. c2.TextTransparency=0
  393. c2.Text=[[
  394. Dominator
  395. (X)
  396. ]]
  397.  
  398. d2=Instance.new("TextLabel")
  399. d2.Parent=a
  400. d2.BackgroundTransparency=1
  401. d2.BorderColor3=Color3.fromRGB(139, 139, 139)
  402. d2.BorderSizePixel=3
  403. d2.Position=d.Position
  404. d2.Size=UDim2.new(0, 200, 0, 100)
  405. d2.Visible=true
  406. d2.ZIndex=3
  407. d2.Font="SourceSansItalic"
  408. d2.FontSize="Size32"
  409. d2.TextColor3=Color3.fromRGB(255, 255, 255)
  410. d2.TextScaled=false
  411. d2.TextStrokeColor3=Color3.fromRGB(139, 139, 139)
  412. d2.TextTransparency=0
  413. d2.Text=[[
  414. Eliminator
  415. (V)
  416. ]]
  417.  
  418. e2=Instance.new("TextLabel")
  419. e2.Parent=a
  420. e2.BackgroundTransparency=1
  421. e2.BorderColor3=Color3.fromRGB(139, 139, 139)
  422. e2.BorderSizePixel=3
  423. e2.Position=e.Position
  424. e2.Size=UDim2.new(0, 200, 0, 100)
  425. e2.Visible=true
  426. e2.ZIndex=3
  427. e2.Font="SourceSansItalic"
  428. e2.FontSize="Size32"
  429. e2.TextColor3=Color3.fromRGB(255, 255, 255)
  430. e2.TextScaled=false
  431. e2.TextStrokeColor3=Color3.fromRGB(139, 139, 139)
  432. e2.TextTransparency=0
  433. e2.Text=[[
  434. Obliteration
  435. (C)
  436. ]]
  437.  
  438. function NoOutline(Part)
  439. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  440. end
  441.  
  442. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size,material)
  443. local fp = it("Part")
  444. fp.formFactor = formfactor
  445. fp.Parent = parent
  446. fp.Reflectance = reflectance
  447. fp.Transparency = transparency
  448. fp.CanCollide = false
  449. fp.Locked=true
  450. fp.BrickColor = brickcolor
  451. fp.Name = name
  452. fp.Size = size
  453. fp.Position = Torso.Position
  454. NoOutline(fp)
  455. fp.Material=material
  456. fp:BreakJoints()
  457. return fp
  458. end
  459.  
  460. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  461. local mesh = it(Mesh)
  462. mesh.Parent = part
  463. if Mesh=="SpecialMesh" then
  464. mesh.MeshType = meshtype
  465. mesh.MeshId = meshid
  466. end
  467. mesh.Offset=offset
  468. mesh.Scale=scale
  469. return mesh
  470. end
  471.  
  472. function weld(parent,part0,part1,c0)
  473. local weld = it("Weld")
  474. weld.Parent = parent
  475. weld.Part0 = part0
  476. weld.Part1 = part1
  477. weld.C0 = c0
  478. return weld
  479. end
  480.  
  481.  
  482. local function CFrameFromTopBack(at, top, back)
  483. local right = top:Cross(back)
  484. return CFrame.new(at.x, at.y, at.z,
  485. right.x, top.x, back.x,
  486. right.y, top.y, back.y,
  487. right.z, top.z, back.z)
  488. end
  489.  
  490. function Triangle(a, b, c)
  491. local edg1 = (c-a):Dot((b-a).unit)
  492. local edg2 = (a-b):Dot((c-b).unit)
  493. local edg3 = (b-c):Dot((a-c).unit)
  494. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  495. a, b, c = a, b, c
  496. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  497. a, b, c = b, c, a
  498. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  499. a, b, c = c, a, b
  500. else
  501. assert(false, "unreachable")
  502. end
  503.  
  504.  
  505. local len1 = (c-a):Dot((b-a).unit)
  506. local len2 = (b-a).magnitude - len1
  507. local width = (a + (b-a).unit*len1 - c).magnitude
  508.  
  509. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  510.  
  511. local list = {}
  512.  
  513. local Color = BrickColor.new("Dark grey")
  514.  
  515. if len1 > 0.01 then
  516. local w1 = Instance.new('WedgePart', m)
  517. game:GetService("Debris"):AddItem(w1,5)
  518. w1.Material = "SmoothPlastic"
  519. w1.FormFactor = 'Custom'
  520. w1.BrickColor = BrickColor.new("Really black")
  521. w1.Transparency = 0
  522. w1.Reflectance = 0
  523. w1.Material = "SmoothPlastic"
  524. w1.CanCollide = false
  525. NoOutline(w1)
  526. local sz = Vector3.new(0.2, width, len1)
  527. w1.Size = sz
  528. local sp = Instance.new("SpecialMesh",w1)
  529. sp.MeshType = "Wedge"
  530. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  531. w1:BreakJoints()
  532. w1.Anchored = true
  533. w1.Parent = workspace
  534. w1.Transparency = 0.7
  535. table.insert(Effects,{w1,"Disappear",.01})
  536. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  537. table.insert(list,w1)
  538. end
  539.  
  540. if len2 > 0.01 then
  541. local w2 = Instance.new('WedgePart', m)
  542. game:GetService("Debris"):AddItem(w2,5)
  543. w2.Material = "SmoothPlastic"
  544. w2.FormFactor = 'Custom'
  545. w2.BrickColor = BrickColor.new("Really red")
  546. w2.Transparency = 0
  547. w2.Reflectance = 0
  548. w2.Material = "SmoothPlastic"
  549. w2.CanCollide = false
  550. NoOutline(w2)
  551. local sz = Vector3.new(0.2, width, len2)
  552. w2.Size = sz
  553. local sp = Instance.new("SpecialMesh",w2)
  554. sp.MeshType = "Wedge"
  555. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  556. w2:BreakJoints()
  557. w2.Anchored = true
  558. w2.Parent = workspace
  559. w2.Transparency = 0.7
  560. table.insert(Effects,{w2,"Disappear",.01})
  561. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  562. table.insert(list,w2)
  563. end
  564. return unpack(list)
  565. end
  566.  
  567. so = function(id,par,vol,pit)
  568. coroutine.resume(coroutine.create(function()
  569. local sou = Instance.new("Sound",par or workspace)
  570. sou.Volume=vol
  571. sou.Pitch=pit or 1
  572. sou.SoundId=id
  573. swait()
  574. sou:play()
  575. game:GetService("Debris"):AddItem(sou,6)
  576. end))
  577. end
  578.  
  579. function clerp(a,b,t)
  580. local qa = {QuaternionFromCFrame(a)}
  581. local qb = {QuaternionFromCFrame(b)}
  582. local ax, ay, az = a.x, a.y, a.z
  583. local bx, by, bz = b.x, b.y, b.z
  584. local _t = 1-t
  585. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  586. end
  587.  
  588. function QuaternionFromCFrame(cf)
  589. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  590. local trace = m00 + m11 + m22
  591. if trace > 0 then
  592. local s = math.sqrt(1 + trace)
  593. local recip = 0.5/s
  594. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  595. else
  596. local i = 0
  597. if m11 > m00 then
  598. i = 1
  599. end
  600. if m22 > (i == 0 and m00 or m11) then
  601. i = 2
  602. end
  603. if i == 0 then
  604. local s = math.sqrt(m00-m11-m22+1)
  605. local recip = 0.5/s
  606. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  607. elseif i == 1 then
  608. local s = math.sqrt(m11-m22-m00+1)
  609. local recip = 0.5/s
  610. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  611. elseif i == 2 then
  612. local s = math.sqrt(m22-m00-m11+1)
  613. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  614. end
  615. end
  616. end
  617.  
  618. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  619. local xs, ys, zs = x + x, y + y, z + z
  620. local wx, wy, wz = w*xs, w*ys, w*zs
  621. local xx = x*xs
  622. local xy = x*ys
  623. local xz = x*zs
  624. local yy = y*ys
  625. local yz = y*zs
  626. local zz = z*zs
  627. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  628. end
  629.  
  630. function QuaternionSlerp(a, b, t)
  631. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  632. local startInterp, finishInterp;
  633. if cosTheta >= 0.0001 then
  634. if (1 - cosTheta) > 0.0001 then
  635. local theta = math.acos(cosTheta)
  636. local invSinTheta = 1/math.sin(theta)
  637. startInterp = math.sin((1-t)*theta)*invSinTheta
  638. finishInterp = math.sin(t*theta)*invSinTheta
  639. else
  640. startInterp = 1-t
  641. finishInterp = t
  642. end
  643. else
  644. if (1+cosTheta) > 0.0001 then
  645. local theta = math.acos(-cosTheta)
  646. local invSinTheta = 1/math.sin(theta)
  647. startInterp = math.sin((t-1)*theta)*invSinTheta
  648. finishInterp = math.sin(t*theta)*invSinTheta
  649. else
  650. startInterp = t-1
  651. finishInterp = t
  652. end
  653. end
  654. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  655. end
  656.  
  657. --Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4)
  658.  
  659.  
  660. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  661. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  662. end
  663.  
  664. Damagefunc=function(Part,hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  665. if hit.Parent==nil then
  666. return
  667. end
  668. local h=hit.Parent:FindFirstChild("Humanoid")
  669. for _,v in pairs(hit.Parent:children()) do
  670. if v:IsA("Humanoid") then
  671. h=v
  672. end
  673. end
  674. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  675. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  676. end
  677. if hit.Parent.className=="Hat" then
  678. hit=hit.Parent.Parent:findFirstChild("Head")
  679. end
  680. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  681. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  682. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  683. return
  684. end]]
  685. -- hs(hit,1.2)
  686. local c=Instance.new("ObjectValue")
  687. c.Name="creator"
  688. c.Value=game:service("Players").LocalPlayer
  689. c.Parent=h
  690. game:GetService("Debris"):AddItem(c,.5)
  691. local Damage=math.random(minim,maxim)
  692. -- h:TakeDamage(Damage)
  693. local blocked=false
  694. local block=hit.Parent:findFirstChild("Block")
  695. if block~=nil then
  696. print(block.className)
  697. if block.className=="NumberValue" then
  698. if block.Value>0 then
  699. blocked=true
  700. if decreaseblock==nil then
  701. block.Value=block.Value-1
  702. end
  703. end
  704. end
  705. if block.className=="IntValue" then
  706. if block.Value>0 then
  707. blocked=true
  708. if decreaseblock~=nil then
  709. block.Value=block.Value-1
  710. end
  711. end
  712. end
  713. end
  714. if blocked==false then
  715. -- h:TakeDamage(Damage)
  716. h.Health=h.Health-Damage
  717. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, Part.BrickColor.Color)
  718. else
  719. h.Health=h.Health-(Damage/2)
  720. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Bright blue").Color)
  721. end
  722. if Type=="Knockdown" then
  723. local hum=hit.Parent.Humanoid
  724. hum.PlatformStand=true
  725. coroutine.resume(coroutine.create(function(HHumanoid)
  726. swait(1)
  727. HHumanoid.PlatformStand=false
  728. end),hum)
  729. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  730. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  731. local bodvol=Instance.new("BodyVelocity")
  732. bodvol.velocity=angle*knockback
  733. bodvol.P=5000
  734. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  735. bodvol.Parent=hit
  736. local rl=Instance.new("BodyAngularVelocity")
  737. rl.P=3000
  738. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  739. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  740. rl.Parent=hit
  741. game:GetService("Debris"):AddItem(bodvol,.5)
  742. game:GetService("Debris"):AddItem(rl,.5)
  743. elseif Type=="Normal" then
  744. local vp=Instance.new("BodyVelocity")
  745. vp.P=500
  746. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  747. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  748. if KnockbackType==1 then
  749. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  750. elseif KnockbackType==2 then
  751. vp.velocity=Property.CFrame.lookVector*knockback
  752. end
  753. if knockback>0 then
  754. vp.Parent=hit.Parent.Torso
  755. end
  756. game:GetService("Debris"):AddItem(vp,.5)
  757. elseif Type=="Up" then
  758. local bodyVelocity=Instance.new("BodyVelocity")
  759. bodyVelocity.velocity=vt(0,60,0)
  760. bodyVelocity.P=5000
  761. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  762. bodyVelocity.Parent=hit
  763. game:GetService("Debris"):AddItem(bodyVelocity,1)
  764. local rl=Instance.new("BodyAngularVelocity")
  765. rl.P=3000
  766. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  767. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  768. rl.Parent=hit
  769. game:GetService("Debris"):AddItem(rl,.5)
  770. elseif Type=="Snare" then
  771. local bp=Instance.new("BodyPosition")
  772. bp.P=2000
  773. bp.D=100
  774. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  775. bp.position=hit.Parent.Torso.Position
  776. bp.Parent=hit.Parent.Torso
  777. game:GetService("Debris"):AddItem(bp,1)
  778. elseif Type=="Target" then
  779. local Targetting = false
  780. if Targetting==false then
  781. ZTarget=hit.Parent.Torso
  782. coroutine.resume(coroutine.create(function(Part)
  783. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  784. swait(5)
  785. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  786. end),ZTarget)
  787. local TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  788. local targetgui=Instance.new("BillboardGui")
  789. targetgui.Parent=ZTarget
  790. targetgui.Size=UDim2.new(10,100,10,100)
  791. local targ=Instance.new("ImageLabel")
  792. targ.Parent=targetgui
  793. targ.BackgroundTransparency=1
  794. targ.Image="rbxassetid://4834067"
  795. targ.Size=UDim2.new(1,0,1,0)
  796. local cam = game.Workspace.CurrentCamera
  797. cam.CameraType="Scriptable"
  798. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  799. local dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  800. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  801. Targetting=true
  802. RocketTarget=ZTarget
  803. for i=1,Property do
  804. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  805. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  806. swait()
  807. end
  808. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  809. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  810. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  811. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  812. end
  813. Targetting=false
  814. RocketTarget=nil
  815. targetgui.Parent=nil
  816. cam.CameraType="Custom"
  817. end
  818. end
  819. local debounce=Instance.new("BoolValue")
  820. debounce.Name="DebounceHit"
  821. debounce.Parent=hit.Parent
  822. debounce.Value=true
  823. game:GetService("Debris"):AddItem(debounce,Delay)
  824. c=Instance.new("ObjectValue")
  825. c.Name="creator"
  826. c.Value=Player
  827. c.Parent=h
  828. game:GetService("Debris"):AddItem(c,.5)
  829. end
  830. end
  831.  
  832.  
  833. function ShowDamage(Pos, Text, Time, Color)
  834. local Rate = (1 / 30)
  835. local Pos = (Pos or Vector3.new(0, 0, 0))
  836. local Text = (Text or "")
  837. local Time = (Time or 2)
  838. local Color = (Color or Color3.new(1, 0, 0))
  839. local EffectPart=part(1,workspace,0,0,BrickColor.new("Really black"),"Effect",vt(0,0,0),"Granite")
  840. EffectPart.Anchored = true
  841. local BillboardGui = Instance.new("BillboardGui")
  842. BillboardGui.Size = UDim2.new(3, 0, 3, 0)
  843. BillboardGui.Adornee = EffectPart
  844. local TextLabel = Instance.new("TextLabel")
  845. TextLabel.BackgroundTransparency = 1
  846. TextLabel.Size = UDim2.new(1, 0, 1, 0)
  847. TextLabel.Text = Text
  848. TextLabel.TextColor3 = Color
  849. TextLabel.TextScaled = true
  850. TextLabel.Font = Enum.Font.ArialBold
  851. TextLabel.Parent = BillboardGui
  852. BillboardGui.Parent = EffectPart
  853. game.Debris:AddItem(EffectPart, (Time + 0.1))
  854. EffectPart.Parent = game:GetService("Workspace")
  855. Delay(0, function()
  856. local Frames = (Time / Rate)
  857. for Frame = 1, Frames do
  858. wait(Rate)
  859. local Percent = (Frame / Frames)
  860. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  861. TextLabel.TextTransparency = Percent
  862. end
  863. if EffectPart and EffectPart.Parent then
  864. EffectPart:Destroy()
  865. end
  866. end)
  867. end
  868.  
  869. function MagniDamage(Hit,Part,magni,mindam,maxdam,knock,Type)
  870. for _,c in pairs(workspace:children()) do
  871. local hum=c:findFirstChild("Humanoid")
  872. if hum~=nil then
  873. local head=c:findFirstChild("Torso")
  874. if head~=nil then
  875. local targ=head.Position-Part.Position
  876. local mag=targ.magnitude
  877. if mag<=magni and c.Name~=Player.Name then
  878. Damagefunc(Hit,head,mindam,maxdam,knock,Type,RootPart,.2,1,3)
  879. end
  880. end
  881. end
  882. end
  883. end
  884.  
  885. mod3 = Instance.new("Model",RightLeg)
  886.  
  887. function Stomp()
  888. local function fpart(formfactor,parent,reflectance,transparency,brickcolor,name,size,material)
  889. local fp = it("Part")
  890. fp.formFactor = formfactor
  891. fp.Parent = parent
  892. fp.Reflectance = reflectance
  893. fp.Transparency = transparency
  894. fp.CanCollide = false
  895. fp.Locked=true
  896. fp.BrickColor = brickcolor
  897. fp.Name = name
  898. fp.Size = size
  899. fp.Position = Torso.Position
  900. NoOutline(fp)
  901. fp.Material=material
  902. fp:BreakJoints()
  903. return fp
  904. end
  905. local function fmesh(Mesh,part,meshtype,meshid,offset,scale)
  906. local mesh = it(Mesh)
  907. mesh.Parent = part
  908. if Mesh=="SpecialMesh" then
  909. mesh.MeshType = meshtype
  910. mesh.MeshId = meshid
  911. end
  912. mesh.Offset=offset
  913. mesh.Scale=scale
  914. return mesh
  915. end
  916. local part = fpart("Custom",mod3,0,0.7,BrickColor.new("Crimson"),"Wave",vt(0.2,0.2,0.2),"Neon")
  917. part.Anchored = true
  918. local mesh = fmesh("SpecialMesh",part,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(25,25,25))
  919. local part2 = fpart("Custom",mod3,0,0.7,BrickColor.new("Crimson"),"Wave",vt(0.2,0.2,0.2),"Neon")
  920. part2.Anchored = true
  921. local mesh2 = fmesh("SpecialMesh",part2,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(15,15,15))
  922. local part3 = fpart("Custom",mod3,0,0.7,BrickColor.new("Crimson"),"Wave",vt(0.2,0.2,0.2),"Neon")
  923. part3.CFrame=RightLeg.CFrame*CFrame.new(0,-3,0)
  924. part3.Anchored = true
  925. local mesh3 = fmesh("SpecialMesh",part3,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(12,12,12))
  926. MagniDamage(part,part,30,10,15,math.random(10,20),"Knockdown")
  927. coroutine.resume(coroutine.create(function()
  928. for i=0,3.8,0.05 do
  929. wait()
  930. part.CFrame=part.CFrame
  931. part.Transparency=i
  932. mesh.Scale=mesh.Scale+Vector3.new(2.8,2.8,2.8)
  933. part2.CFrame=part2.CFrame
  934. part2.Transparency=i
  935. mesh2.Scale=mesh2.Scale+Vector3.new(1,1,1)
  936. part3.CFrame=part3.CFrame
  937. part3.Transparency=i
  938. mesh3.Scale=mesh3.Scale+Vector3.new(1.5,1.5,1.5)
  939. end
  940. end))
  941. end
  942.  
  943. model = Instance.new("Model",Character)
  944. model.Name = "Realm"
  945.  
  946. local handle=part(1,model,0,0,BrickColor.new("Really black"),"Handle",vt(0.2, 1.5, 0.2),"Granite")
  947. local prt1=part(1,model,0,0,BrickColor.new("Really black"),"Part1",vt(1.22, 7.2, 0.22),"Granite")
  948. local prt2=part(1,model,0,0,BrickColor.new("Maroon"),"Part2",vt(0.22, 2.4, 0.22),"Neon")
  949. local prt3=part(1,model,0,0,BrickColor.new("Maroon"),"Part3",vt(0.42, 0.85, 1.05),"Neon")
  950. local prt4=part(1,model,0,0,BrickColor.new("Really black"),"Part4",vt(0.22, 1.5, 0.22),"Granite")
  951. local prt5=part(1,model,0,0,BrickColor.new("Really black"),"Part5",vt(0.44, 0.6, 0.8),"Granite")
  952. local prt6=part(1,model,0,0,BrickColor.new("Maroon"),"Part6",vt(1.6, 1.4, 0.2),"Neon")
  953. local prt7=part(0,model,0,0,BrickColor.new("Really black"),"Part7",vt(0.4, 0.4, 0.4),"Granite")
  954. local prt8=part(1,model,0,0,BrickColor.new("Really black"),"Part8",vt(0.4, 0.3, 0.22),"Granite")
  955. local prt9=part(1,model,0,0,BrickColor.new("Really black"),"Part9",vt(0.4, 1.3, 1.5),"Granite")
  956. local prt10=part(1,model,0,0,BrickColor.new("Maroon"),"Part10",vt(0.3, 1.5, 1.7),"Neon")
  957. local prt11=part(1,model,0,0,BrickColor.new("Maroon"),"Part11",vt(0.4, 1.4, 0.22),"Neon")
  958. local prt13=part(1,model,0,0,BrickColor.new("Maroon"),"Part13",vt(1.3, 7.3, 0.2),"Neon")
  959. local prt15=part(1,model,0,0,BrickColor.new("Maroon"),"Part15",vt(1, 0.5, 0.22),"Neon")
  960. local prt16=part(1,model,0,0,BrickColor.new("Maroon"),"Part16",vt(1, 0.5, 0.22),"Neon")
  961.  
  962. local handlemesh=mesh("SpecialMesh",handle,"FileMesh","http://www.roblox.com/asset/?id=1033714",vt(0,0,0),vt(0.2,5,0.2))
  963. local msh2=mesh("SpecialMesh",prt2,"FileMesh","http://www.roblox.com/asset/?id=1033714",vt(0,0,0),vt(0.2, 5, 0.2))
  964. local msh3=mesh("SpecialMesh",prt3,"Cylinder","",vt(0,0,0),vt(1,1,2))
  965. local msh4=mesh("SpecialMesh",prt4,"FileMesh","http://www.roblox.com/asset/?id=1033714",vt(0,0,0),vt(0.2, 5, 0.2))
  966. local msh5=mesh("SpecialMesh",prt5,"Cylinder","",vt(0,0,0),vt(1,1,1))
  967. local msh6=mesh("SpecialMesh",prt6,"Sphere","",vt(0,0,0),vt(1,1,1))
  968. local msh8=mesh("SpecialMesh",prt8,"FileMesh","http://www.roblox.com/asset/?id=192551369",vt(0,0,0),vt(0.5, 0.5, 0.2))
  969. local msh9=mesh("SpecialMesh",prt9,"Cylinder","",vt(0,0,0),vt(1, 1, 2))
  970. local msh10=mesh("SpecialMesh",prt10,"Cylinder","",vt(0,0,0),vt(1, 1, 2))
  971.  
  972. local handleweld=weld(handle,handle,RightArm,euler(89.75, 0, 0)*cf(0,1,0))
  973. local wld1=weld(prt1,prt1,handle,euler(0, 80.1, 0)*cf(-0, 4.95, -0.02))
  974. local wld2=weld(prt2,prt2,handle,euler(0, 80.1, 0)*cf(0.005, 0.15, -0.005))
  975. local wld3=weld(prt3,prt3,handle,euler(0, 12.5, 0)*cf(-0, 1.303, -0.028))
  976. local wld4=weld(prt4,prt4,handle,euler(0, 80.1, 0)*cf(0.005, 0.4, -0.005))
  977. local wld5=weld(prt5,prt5,handle,euler(0, 12.5, 0)*cf(-0, 1.303, -0.028))
  978. local wld6=weld(prt6,prt6,handle,euler(0, 80.1, 0)*cf(-0, 8.8, -0.02))
  979. local wld7=weld(prt7,prt7,handle,euler(0, 80.1, 0)*cf(0.005, -1.8, -0.005))
  980. local wld8=weld(prt8,prt8,handle,euler(0, -80.1, 0)*cf(-0, 1.6, -0.02))
  981. local wld9=weld(prt9,prt9,handle,euler(0, 12.5, 0)*cf(-0, 1.303, -0.028))
  982. local wld10=weld(prt10,prt10,handle,euler(0, 12.5, 0)*cf(-0, 1.303, -0.028))
  983. local wld11=weld(prt11,prt11,handle,euler(0, 80.1, 0)*cf(-0.113, 8.501, -0.01))
  984. local wld13=weld(prt13,prt13,handle,euler(0, 80.1, 0)*cf(-0, 4.95, -0.02))
  985. local wld15=weld(prt15,prt15,handle,euler(0, 80.1, 0)*cf(-0.011, 3.903, 0))
  986. local wld16=weld(prt16,prt16,handle,euler(0, 80.1, 0)*cf(-0.011, 5.903, 0))
  987.  
  988. function attackone()
  989. attack = true
  990. local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"}
  991. local con=prt1.Touched:connect(function(hit)
  992. Damagefunc(prt1,hit,5,13,5,"Normal",RootPart,.2,1,3)
  993. end)
  994. local fx=prt1.Touched:connect(function(part)
  995. local human=part.Parent:findFirstChild("Humanoid")
  996. if human~=nil and bounce==false then
  997. bounce=true
  998. local rndm=math.random(1,#hitsounds)
  999. local r=rndm
  1000. so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,1)
  1001. end
  1002. end)
  1003. for i = 0,1,0.1 do
  1004. swait()
  1005. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-50)),0.4)
  1006. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(50)),0.4)
  1007. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(10), math.rad(100)),0.4)
  1008. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)),0.4)
  1009. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(120),math.rad(0)),0.4)
  1010. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),0.4)
  1011. end
  1012. so("http://www.roblox.com/asset/?id=199145841",handle,1,.9)
  1013. for i = 0,1,0.1 do
  1014. swait()
  1015. local blcf = prt1.CFrame*CFrame.new(0,.5,0)
  1016. if scfr and (prt1.Position-scfr.p).magnitude > .1 then
  1017. local h = 10
  1018. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1019. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1020. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1021. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1022. scfr = blcf
  1023. elseif not scfr then
  1024. scfr = blcf
  1025. end
  1026. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(80)),0.4)
  1027. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(-10),math.rad(-80)),0.4)
  1028. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(120), math.rad(90)),0.4)
  1029. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)),0.4)
  1030. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(50),math.rad(0)),0.4)
  1031. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),0.4)
  1032. end
  1033. attack = false
  1034. bounce=false
  1035. scfr=nil
  1036. fx:disconnect()
  1037. con:disconnect()
  1038. end
  1039.  
  1040. function attacktwo()
  1041. attack=true
  1042. local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"}
  1043. local con=prt1.Touched:connect(function(hit)
  1044. Damagefunc(prt1,hit,5,15,5,"Normal",RootPart,.2,1,3) end)
  1045. local fx=prt1.Touched:connect(function(part)
  1046. local human=part.Parent:findFirstChild("Humanoid")
  1047. if human~=nil and bounce==false then
  1048. bounce=true
  1049. local rndm=math.random(1,#hitsounds)
  1050. local r=rndm
  1051. so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,1)
  1052. end
  1053. end)
  1054. for i=0,1,.1 do
  1055. swait()
  1056. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(70)),0.4)
  1057. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(-10),math.rad(-70)),0.4)
  1058. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(120), math.rad(90)),0.4)
  1059. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)),0.4)
  1060. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(40),math.rad(0)),0.4)
  1061. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-140),math.rad(-10)),0.4)
  1062. end
  1063. so("http://www.roblox.com/asset/?id=199145887",handle,1,1)
  1064. for i = 0,1,0.1 do
  1065. swait()
  1066. local blcf = prt1.CFrame*CFrame.new(0,.5,0)
  1067. if scfr and (prt1.Position-scfr.p).magnitude > .1 then
  1068. local h = 10
  1069. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1070. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1071. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1072. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1073. scfr = blcf
  1074. elseif not scfr then
  1075. scfr = blcf
  1076. end
  1077. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.4)
  1078. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(80)),0.4)
  1079. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(10), math.rad(90)),0.4)
  1080. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-90)),0.4)
  1081. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(140),math.rad(0)),0.4)
  1082. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-40),math.rad(-10)),0.4)
  1083. end
  1084. scfr=nil
  1085. attack=false
  1086. bounce=false
  1087. con:disconnect()
  1088. fx:disconnect()
  1089. end
  1090.  
  1091. function Wave()
  1092. local function wpart(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  1093. local fp=it("Part")
  1094. fp.formFactor=formfactor
  1095. fp.Parent=parent
  1096. fp.Reflectance=reflectance
  1097. fp.Transparency=transparency
  1098. fp.CanCollide=false
  1099. fp.Locked=true
  1100. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  1101. fp.Name=name
  1102. fp.Size=size
  1103. fp.Position=Character.Torso.Position
  1104. NoOutline(fp)
  1105. fp.Material=material
  1106. fp:BreakJoints()
  1107. return fp
  1108. end
  1109. attack=true
  1110. local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"}
  1111. local con=prt1.Touched:connect(function(hit)
  1112. Damagefunc(prt1,hit,4,31,5,"Normal",RootPart,.2,1,3) end)
  1113. local fx=prt1.Touched:connect(function(part)
  1114. local human=part.Parent:findFirstChild("Humanoid")
  1115. if human~=nil and bounce==false then
  1116. bounce=true
  1117. local rndm=math.random(1,#hitsounds)
  1118. local r=rndm
  1119. so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,1)
  1120. end
  1121. end)
  1122. for i=0,1,.1 do
  1123. swait()
  1124. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-30)),0.4)
  1125. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(30)),.3)
  1126. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(170), math.rad(0), math.rad(20)),0.4)
  1127. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(25), math.rad(0), math.rad(-30)),0.4)
  1128. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(105),math.rad(0)),0.4)
  1129. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-75),math.rad(-10)),0.4)
  1130. end
  1131. so("http://www.roblox.com/asset/?id=199145913",handle,1,.9)
  1132. local hit,pos=rayCast(prt1.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,100,Character)
  1133. if hit~=nil then
  1134. local ref=wpart(3,workspace,"SmoothPlastic",0,1,BrickColor.new("Black"),"Effect",vt())
  1135. ref.Anchored=true
  1136. ref.CFrame=cf(pos)
  1137. game:GetService("Debris"):AddItem(ref,3)
  1138. local function BlastEffect(brickcolor,cframe,x1,y1,z1,x2,y2,z2)
  1139. local prt=wpart(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1140. prt.Anchored=true
  1141. prt.CFrame = cframe
  1142. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  1143. coroutine.resume(coroutine.create(function()
  1144. for i=0,1,0.05 do
  1145. wait()
  1146. prt.Transparency=i
  1147. msh.Scale=msh.Scale+vt(x2,y2,z2)
  1148. end
  1149. prt.Parent=nil
  1150. end))
  1151. end
  1152. local function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1153. local prt=wpart(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt())
  1154. prt.Anchored=true
  1155. prt.CFrame=cframe
  1156. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1157. game:GetService("Debris"):AddItem(prt,2)
  1158. coroutine.resume(coroutine.create(function(Part,Mesh)
  1159. local wld=nil
  1160. for i=0,1,delay do
  1161. wait()
  1162. Part.CFrame=Part.CFrame
  1163. Part.Transparency=i
  1164. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1165. end
  1166. Part.Parent=nil
  1167. end),prt,msh)
  1168. end
  1169. for i = 5,1,-1 do
  1170. BlastEffect(BrickColor.new("Maroon"),cf(pos),1,1,1,1,1,1)
  1171. MagicCircle(BrickColor.new("Maroon"),cf(pos),3,3,3,5,5,5,0.05)
  1172. swait()
  1173. end
  1174. MagniDamage(ref,ref,13,15,25,math.random(10,20),"Knockdown")
  1175. end
  1176. for i = 0,1,0.1 do
  1177. swait()
  1178. local blcf = prt1.CFrame*CFrame.new(0,.5,0)
  1179. if scfr and (prt1.Position-scfr.p).magnitude > .1 then
  1180. local h = 5
  1181. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1182. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1183. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1184. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1185. scfr = blcf
  1186. elseif not scfr then
  1187. scfr = blcf
  1188. end
  1189. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),0.4)
  1190. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-50)),.3)
  1191. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)),0.4)
  1192. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)),0.4)
  1193. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(80),math.rad(0)),0.4)
  1194. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-100),math.rad(-10)),0.4)
  1195. end
  1196. attack=false
  1197. bounce=false
  1198. scfr=nil
  1199. con:disconnect()
  1200. fx:disconnect()
  1201. end
  1202.  
  1203. function Charge()
  1204. attack = true
  1205. local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"}
  1206. local con=prt1.Touched:connect(function(hit)
  1207. Damagefunc(prt1,hit,10,40,50,"Normal",RootPart,.2,1,3) end)
  1208. local fx=prt1.Touched:connect(function(part)
  1209. local human=part.Parent:findFirstChild("Humanoid")
  1210. if human~=nil and bounce==false then
  1211. bounce=true
  1212. local rndm=math.random(1,#hitsounds)
  1213. local r=rndm
  1214. so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,1)
  1215. end
  1216. end)
  1217. for i = 0,1,0.1 do
  1218. swait()
  1219. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(-5),math.rad(-60)),.3)
  1220. Torso.Neck.C0=clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(60)),.3)
  1221. RW.C0=clerp(RW.C0,cf(1.5, 0.8, 0.2) * angles(math.rad(5), math.rad(-15), math.rad(112)), 0.3)
  1222. LW.C0=clerp(LW.C0,cf(-1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(-20)), 0.3)
  1223. RH.C0=clerp(RH.C0,cf(1.1,-1,0)*angles(math.rad(-5),math.rad(120),math.rad(-8)),.3)
  1224. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(5),math.rad(-60),math.rad(0)),.3)
  1225. end
  1226. so("http://www.roblox.com/asset/?id=199145433",prt1,1,1.1)
  1227. local v=it("BodyVelocity",Torso)
  1228. v.maxForce=Vector3.new(4e+005,4e+005,4e+005)*1
  1229. v.velocity=RootPart.CFrame.lookVector*100
  1230. function ppart(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  1231. local fp=it("Part")
  1232. fp.formFactor=formfactor
  1233. fp.Parent=parent
  1234. fp.Reflectance=reflectance
  1235. fp.Transparency=transparency
  1236. fp.CanCollide=false
  1237. fp.Locked=true
  1238. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  1239. fp.Name=name
  1240. fp.Size=size
  1241. fp.Position=Character.Torso.Position
  1242. NoOutline(fp)
  1243. fp.Material=material
  1244. fp:BreakJoints()
  1245. return fp
  1246. end
  1247. for i=5,1,-1 do
  1248. for i=1,4 do
  1249. local prt=ppart(3,workspace,"SmoothPlastic",0,0,"Maroon","Effect",vt(0.5,0.5,0.5))
  1250. prt.Anchored=true
  1251. prt.Position=prt1.Position
  1252. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(1,1,1))
  1253. coroutine.resume(coroutine.create(function(Part,Mesh)
  1254. for i=0,1,0.03 do
  1255. wait()
  1256. Part.CFrame=Part.CFrame
  1257. Part.Transparency=i
  1258. Mesh.Scale=Mesh.Scale+vt(1,1,1)
  1259. end
  1260. Part.Parent=nil
  1261. end),prt,msh)
  1262. MagniDamage(prt,prt,15,5,15,-10,"Normal")
  1263. end
  1264. swait(3)
  1265. end
  1266. local hitbox = prt1.Touched:connect(function(hit)
  1267. Damagefunc(prt1,hit,5,10,15,"Normal",RootPart,.2,1,3)
  1268. end)
  1269. hitbox:disconnect()
  1270. for i = 0,1,0.1 do
  1271. swait()
  1272. local blcf = prt1.CFrame*cf(0,0,0)
  1273. if scfr and (prt1.Position-scfr.p).magnitude > .1 then
  1274. local h = 5
  1275. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1276. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1277. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1278. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1279. scfr = blcf
  1280. elseif not scfr then
  1281. scfr = blcf
  1282. end
  1283. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(5),math.rad(60)),.3)
  1284. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-60)),.3)
  1285. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(60), math.rad(100)), 0.3)
  1286. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-15)), 0.3)
  1287. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3)
  1288. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
  1289. end
  1290. v.Parent=nil
  1291. scfr=nil
  1292. attack = false
  1293. bounce=false
  1294. con:disconnect()
  1295. fx:disconnect()
  1296. end
  1297.  
  1298. function Execution()
  1299. local function spart(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  1300. local fp=it("Part")
  1301. fp.formFactor=formfactor
  1302. fp.Parent=parent
  1303. fp.Reflectance=reflectance
  1304. fp.Transparency=transparency
  1305. fp.CanCollide=false
  1306. fp.Locked=true
  1307. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  1308. fp.Name=name
  1309. fp.Size=size
  1310. fp.Position=Character.Torso.Position
  1311. NoOutline(fp)
  1312. fp.Material=material
  1313. fp:BreakJoints()
  1314. return fp
  1315. end
  1316. attack=true
  1317. local con1=prt1.Touched:connect(function(hit)
  1318. Damagefunc(prt1,hit,12,25,100,"Normal",RootPart,.2,1)
  1319. end)
  1320. for i=0,1,0.03 do
  1321. swait()
  1322. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(60)),.1)
  1323. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-60)),.1)
  1324. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(90),math.rad(120)),.1)
  1325. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(100), math.rad(0), math.rad(0)), 0.1)
  1326. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10)),.1)
  1327. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.2)
  1328. end
  1329. so("http://roblox.com/asset/?id=92597369",prt1,1,0.5)
  1330. so("http://roblox.com/asset/?id=28144425",Torso,1,0.5)
  1331. hitconasdf = prt1.Touched:connect(function(hit)
  1332. local hum12 = hit.Parent:FindFirstChild("Humanoid")
  1333. if hum12 and not hum12:IsDescendantOf(Character) then
  1334. so('http://roblox.com/asset/?id=154965973',prt1,1,0.8)
  1335. hitconasdf:disconnect()
  1336. end
  1337. end)
  1338. for i=0,1,0.03 do
  1339. swait()
  1340. local blcf = prt1.CFrame*CFrame.new(0,.5,0)
  1341. if scfr and (prt1.Position-scfr.p).magnitude > .1 then
  1342. local h = 5
  1343. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1344. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1345. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1346. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1347. scfr = blcf
  1348. elseif not scfr then
  1349. scfr = blcf
  1350. end
  1351. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-90)),.2)
  1352. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(60)),.2)
  1353. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(-20),math.rad(70)),.2)
  1354. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-40)), 0.2)
  1355. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10)),.2)
  1356. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.2)
  1357. end
  1358. attack=false
  1359. con1:disconnect()
  1360. scfr = nil
  1361. pcall(function()
  1362. hitconasdf:disconnect()
  1363. end)
  1364. end
  1365.  
  1366. function Destroyer()
  1367. attack=true
  1368. local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"}
  1369. local con=prt1.Touched:connect(function(hit)
  1370. Damagefunc(prt1,hit,4,31,5,"Normal",RootPart,.2,1,3) end)
  1371. local fx=prt1.Touched:connect(function(part)
  1372. local human=part.Parent:findFirstChild("Humanoid")
  1373. if human~=nil and bounce==false then
  1374. bounce=true
  1375. local rndm=math.random(1,#hitsounds)
  1376. local r=rndm
  1377. so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,1)
  1378. end
  1379. end)
  1380. for i=0,1,.1 do
  1381. swait()
  1382. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-30)),0.4)
  1383. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(30)),.3)
  1384. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(170), math.rad(0), math.rad(20)),0.4)
  1385. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(25), math.rad(0), math.rad(-30)),0.4)
  1386. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(105),math.rad(0)),0.4)
  1387. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-75),math.rad(-10)),0.4)
  1388. end
  1389. Stomp()
  1390. for i = 0,1,0.1 do
  1391. swait()
  1392. local blcf = prt1.CFrame*CFrame.new(0,.5,0)
  1393. if scfr and (prt1.Position-scfr.p).magnitude > .1 then
  1394. local h = 5
  1395. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1396. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1397. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1398. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1399. scfr = blcf
  1400. elseif not scfr then
  1401. scfr = blcf
  1402. end
  1403. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),0.4)
  1404. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-50)),.3)
  1405. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)),0.4)
  1406. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)),0.4)
  1407. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(80),math.rad(0)),0.4)
  1408. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-100),math.rad(-10)),0.4)
  1409. end
  1410. attack=false
  1411. bounce=false
  1412. scfr=nil
  1413. con:disconnect()
  1414. fx:disconnect()
  1415. end
  1416.  
  1417. Mouse.Button1Down:connect(function()
  1418. if attack==false then
  1419. if attacktype==1 then
  1420. attack=true
  1421. attacktype=2
  1422. attackone()
  1423. elseif attacktype==2 then
  1424. attack=true
  1425. attacktype=1
  1426. attacktwo()
  1427. end
  1428. end
  1429. end)
  1430.  
  1431. skillattack1 = false
  1432. skillattack2 = false
  1433. skillattack3 = false
  1434. skillattack4 = false
  1435.  
  1436. Mouse.KeyDown:connect(function(k)
  1437. k=k:lower()
  1438. if skillattack1 == false and attack == false and k == 'z' then
  1439. b.Size=UDim2.new(0, 0, 0, 100)
  1440. Wave()
  1441. for i = 1, 50 do
  1442. skillattack1=true
  1443. b.Size=b.Size+UDim2.new(0, 4, 0, 0)
  1444. wait()
  1445. end
  1446. skillattack1=false
  1447. elseif skillattack2 == false and attack == false and k == 'v' then
  1448. d.Size=UDim2.new(0, 0, 0, 100)
  1449. Execution()
  1450. for i = 1, 200 do
  1451. skillattack2=true
  1452. d.Size=d.Size+UDim2.new(0, 1, 0, 0)
  1453. wait()
  1454. end
  1455. skillattack2=false
  1456. elseif skillattack3 == false and attack == false and k == 'c' then
  1457. e.Size=UDim2.new(0, 0, 0, 100)
  1458. Charge()
  1459. for i = 1, 50 do
  1460. skillattack3=true
  1461. e.Size=e.Size+UDim2.new(0, 4, 0, 0)
  1462. wait()
  1463. end
  1464. skillattack3=false
  1465. elseif skillattack4 == false and attack == false and k == 'x' then
  1466. c.Size=UDim2.new(0, 0, 0, 100)
  1467. Destroyer()
  1468. for i = 1, 100 do
  1469. skillattack4=true
  1470. c.Size=c.Size+UDim2.new(0, 2, 0, 0)
  1471. wait()
  1472. end
  1473. skillattack4=false
  1474. end
  1475. end)
  1476.  
  1477.  
  1478. local sine = 0
  1479. local change = 1
  1480. local val = 0
  1481.  
  1482. while true do
  1483. swait()
  1484. sine = sine + change
  1485. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1486. local velderp=RootPart.Velocity.y
  1487. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1488. if equipped==true or equipped==false then
  1489. if attack==false then
  1490. idle=idle+1
  1491. else
  1492. idle=0
  1493. end
  1494. if idle>=500 then
  1495. if attack==false then
  1496. --Sheath()
  1497. end
  1498. end
  1499. if RootPart.Velocity.y > 1 and hitfloor==nil then
  1500. Anim="Jump"
  1501. if attack==false then
  1502. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1503. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-1.5),math.rad(0),math.rad(0)),.3)
  1504. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-15), math.rad(0), math.rad(15)), 0.3)
  1505. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-15), math.rad(0), math.rad(-15)), 0.3)
  1506. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(20),math.rad(90),math.rad(-20)),.3)
  1507. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(-20),math.rad(-90),math.rad(20)),.3)
  1508. end
  1509. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  1510. Anim="Fall"
  1511. if attack==false then
  1512. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1513. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  1514. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-15), math.rad(0), math.rad(25)), 0.3)
  1515. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-15), math.rad(0), math.rad(-25)), 0.3)
  1516. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(10),math.rad(90),math.rad(20)),.3)
  1517. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(-10),math.rad(-90),math.rad(-20)),.3)
  1518. end
  1519. elseif torvel<1 and hitfloor~=nil then
  1520. Anim="Idle"
  1521. if attack==false then
  1522. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(15),math.rad(0),math.rad(-10)),.3)
  1523. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1524. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(40), math.rad(10), math.rad(-10)), 0.3)
  1525. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(5), math.rad(0), math.rad(-5)), 0.3)
  1526. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(80),math.rad(10)),.3)
  1527. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-70),math.rad(-20)),.3)
  1528. end
  1529. elseif torvel>2 and hitfloor~=nil then
  1530. Anim="Walk"
  1531. if attack==false then
  1532. change=3
  1533. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(00)),.3)
  1534. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  1535. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(20)), 0.3)
  1536. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-10)), 0.3)
  1537. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(10)),.3)
  1538. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-10)),.3)
  1539. end
  1540. end
  1541. end
  1542. if #Effects>0 then
  1543. --table.insert(Effects,{prt,"Block1",delay})
  1544. for e=1,#Effects do
  1545. if Effects[e]~=nil then
  1546. --for j=1,#Effects[e] do
  1547. local Thing=Effects[e]
  1548. if Thing~=nil then
  1549. local Part=Thing[1]
  1550. local Mode=Thing[2]
  1551. local Delay=Thing[3]
  1552. local IncX=Thing[4]
  1553. local IncY=Thing[5]
  1554. local IncZ=Thing[6]
  1555. if Thing[1].Transparency<=1 then
  1556. if Thing[2]=="Block1" then
  1557. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1558. Mesh=Thing[1].Mesh
  1559. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1560. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1561. elseif Thing[2]=="Cylinder" then
  1562. --local TheCF=Thing[1].CFrame
  1563. --Thing[1].CFrame=TheCF
  1564. Mesh=Thing[1].Mesh
  1565. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1566. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1567. elseif Thing[2]=="Elec" then
  1568. Mesh=Thing[1].Mesh
  1569. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  1570. --Thing[3]=Thing[3]+Delay
  1571. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1572. --print(Thing[1].Transparency)
  1573.  
  1574. --[[local prt=part(3,workspace,0,0,BrickColor.new("White"),"Part",vt(1,1,1))
  1575. prt.Anchored=true
  1576. game:GetService("Debris"):AddItem(prt,2)
  1577. xval=math.random()
  1578. yval=math.random()
  1579. zval=math.random()
  1580. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(xval,yval,zval))
  1581. Effects[#Effects+1]={prt,"Elec",0.05,x,y,z,xval,yval,zval}]]
  1582. --[[coroutine.resume(coroutine.create(function(Part,Mesh,Frame,xvaal,yvaal,zvaal)
  1583. Part.CFrame=cf(Frame)*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
  1584. for i=0,1,0.05 do
  1585. swait()
  1586. xvaal=xvaal-0.1
  1587. yvaal=yvaal-0.1
  1588. zvaal=zvaal-0.1
  1589. Mesh.Scale=vt(xvaal,yvaal,zvaal)
  1590. Part.Transparency=i
  1591. end
  1592. Part.Parent=nil
  1593. end),prt,msh,cff,xval,yval,zval)]]
  1594. end
  1595. else
  1596. Part.Parent=nil
  1597. table.remove(Effects,e)
  1598. end
  1599. end
  1600. --end
  1601. end
  1602. end
  1603. end
  1604. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement