Advertisement
doryna2281337

Untitled

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