Advertisement
Christoffer07700Extr

Pharaoh

Aug 5th, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 77.09 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. return RealPlayer[Index]
  88. end
  89. end;
  90. __tostring = function(self)
  91. return RealPlayer.Name
  92. end
  93. })
  94. end
  95. end
  96. if RealGame[Index] then
  97. local Type = type(RealGame[Index])
  98. if Type == "function" then
  99. if Index:lower() == "getservice" or Index:lower() == "service" then
  100. return function (self,Service)
  101. if Service:lower() == "players" then
  102. return setmetatable({},{
  103. __index = function (self2,Index2)
  104. local RealService = RealGame:GetService(Service)
  105. local Type2 = type(Index2)
  106. if Type2 == "function" then
  107. return function (self,...)
  108. return RealService[Index2](RealService,...)
  109. end
  110. else
  111. if Index2:lower() == "localplayer" then
  112. return Sandbox(owner)
  113. end
  114. return RealService[Index2]
  115. end
  116. end;
  117. __tostring = function(self)
  118. return RealGame:GetService(Service).Name
  119. end
  120. })
  121. elseif Service:lower() == "contextactionservice" then
  122. return InternalData["ContextActionService"]
  123. elseif Service:lower() == "contextactionservice" then
  124. return InternalData["UserInputService"]
  125. elseif Service:lower() == "runservice" then
  126. return setmetatable({},{
  127. __index = function(self2,Index2)
  128. local RealService = RealGame:GetService(Service)
  129. local Type2 = type(Index2)
  130. if Type2 == "function" then
  131. return function (self,...)
  132. return RealService[Index2](RealService,...)
  133. end
  134. else
  135. if Index2:lower() == "bindtorenderstep" then
  136. return function (self,Name,Priority,Function)
  137. return RealGame:GetService("RunService").Stepped:Connect(Function)
  138. end
  139. end
  140. if Index2:lower() == "renderstepped" then
  141. return RealService["Stepped"]
  142. end
  143. return RealService[Index2]
  144. end
  145. end
  146. })
  147. else
  148. return RealGame:GetService(Service)
  149. end
  150. end
  151. end
  152. return function (self,...)
  153. return RealGame[Index](RealGame,...)
  154. end
  155. else
  156. if game:GetService(Index) then
  157. return game:GetService(Index)
  158. end
  159. return RealGame[Index]
  160. end
  161. else
  162. return nil
  163. end
  164. end
  165. });Game = game;owner = game:GetService("Players").LocalPlayer
  166. print("Complete! Running...")
  167.  
  168. --//====================================================\\--
  169. --|| CREATED BY SHACKLUSTER
  170. --\\====================================================//--
  171.  
  172. wait(0.2)
  173.  
  174. Player = game:GetService("Players").LocalPlayer
  175. PlayerGui = Player.PlayerGui
  176. Cam = workspace.CurrentCamera
  177. Backpack = Player.Backpack
  178. Character = Player.Character
  179. Humanoid = Character.Humanoid
  180. Mouse = Player:GetMouse()
  181. RootPart = Character["HumanoidRootPart"]
  182. Torso = Character["Torso"]
  183. Head = Character["Head"]
  184. RightArm = Character["Right Arm"]
  185. LeftArm = Character["Left Arm"]
  186. RightLeg = Character["Right Leg"]
  187. LeftLeg = Character["Left Leg"]
  188. RootJoint = RootPart["RootJoint"]
  189. Neck = Torso["Neck"]
  190. RightShoulder = Torso["Right Shoulder"]
  191. LeftShoulder = Torso["Left Shoulder"]
  192. RightHip = Torso["Right Hip"]
  193. LeftHip = Torso["Left Hip"]
  194. Player:ClearCharacterAppearance()
  195.  
  196. IT = Instance.new
  197. CF = CFrame.new
  198. VT = Vector3.new
  199. RAD = math.rad
  200. C3 = Color3.new
  201. UD2 = UDim2.new
  202. BRICKC = BrickColor.new
  203. ANGLES = CFrame.Angles
  204. EULER = CFrame.fromEulerAnglesXYZ
  205. COS = math.cos
  206. ACOS = math.acos
  207. SIN = math.sin
  208. ASIN = math.asin
  209. ABS = math.abs
  210. MRANDOM = math.random
  211. FLOOR = math.floor
  212.  
  213. --//=================================\\
  214. --|| USEFUL VALUES
  215. --\\=================================//
  216.  
  217. Animation_Speed = 3
  218. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  219. local Speed = 10
  220. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  221. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  222. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  223. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  224. local DAMAGEMULTIPLIER = 1
  225. local ANIM = "Idle"
  226. local ATTACK = false
  227. local EQUIPPED = false
  228. local HOLD = false
  229. local COMBO = 1
  230. local Rooted = false
  231. local SINE = 0
  232. local KEYHOLD = false
  233. local CHANGE = 2 / Animation_Speed
  234. local WALKINGANIM = false
  235. local VALUE1 = false
  236. local VALUE2 = false
  237. local ROBLOXIDLEANIMATION = IT("Animation")
  238. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  239. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  240. local ATANIM = IT("Animation")
  241. ATANIM.Name = "Attack Animation"
  242. ATANIM.AnimationId = "http://www.roblox.com/asset/?id=74894663"
  243. --ROBLOXIDLEANIMATION.Parent = Humanoid
  244. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  245. WEAPONGUI.Name = "Weapon GUI"
  246. local Weapon = IT("Model")
  247. Weapon.Name = "Adds"
  248. local Effects = IT("Folder", Weapon)
  249. Effects.Name = "Effects"
  250. local ANIMATOR = Humanoid.Animator
  251. local ANIMATE = Character.Animate
  252. local UNANCHOR = true
  253. local PLAYANIMS = true
  254. script.Parent = WEAPONGUI
  255. Character.Archivable = true
  256. local CLONE = Character:Clone()
  257. CLONE.Parent = nil
  258. Character.Archivable = false
  259. local sick = Instance.new("Sound",Torso)
  260. local SIT = IT("BoolValue",Torso)
  261. SIT.Name = "IsThePharaohSitting?"
  262.  
  263. --//=================================\\
  264. --\\=================================//
  265.  
  266.  
  267. --//=================================\\
  268. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  269. --\\=================================//
  270.  
  271. ArtificialHB = Instance.new("BindableEvent", script)
  272. ArtificialHB.Name = "ArtificialHB"
  273.  
  274. script:WaitForChild("ArtificialHB")
  275.  
  276. frame = Frame_Speed
  277. tf = 0
  278. allowframeloss = false
  279. tossremainder = false
  280. lastframe = tick()
  281. script.ArtificialHB:Fire()
  282.  
  283. game:GetService("RunService").Heartbeat:connect(function(s, p)
  284. tf = tf + s
  285. if tf >= frame then
  286. if allowframeloss then
  287. script.ArtificialHB:Fire()
  288. lastframe = tick()
  289. else
  290. for i = 1, math.floor(tf / frame) do
  291. script.ArtificialHB:Fire()
  292. end
  293. lastframe = tick()
  294. end
  295. if tossremainder then
  296. tf = 0
  297. else
  298. tf = tf - frame * math.floor(tf / frame)
  299. end
  300. end
  301. end)
  302.  
  303. --//=================================\\
  304. --\\=================================//
  305.  
  306. --//=================================\\
  307. --|| SOME FUNCTIONS
  308. --\\=================================//
  309.  
  310. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  311. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  312. end
  313.  
  314. function PositiveAngle(NUMBER)
  315. if NUMBER >= 0 then
  316. NUMBER = 0
  317. end
  318. return NUMBER
  319. end
  320.  
  321. function NegativeAngle(NUMBER)
  322. if NUMBER <= 0 then
  323. NUMBER = 0
  324. end
  325. return NUMBER
  326. end
  327.  
  328. function Swait(NUMBER)
  329. if NUMBER == 0 or NUMBER == nil then
  330. ArtificialHB.Event:wait()
  331. else
  332. for i = 1, NUMBER do
  333. ArtificialHB.Event:wait()
  334. end
  335. end
  336. end
  337.  
  338. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  339. local NEWMESH = IT(MESH)
  340. if MESH == "SpecialMesh" then
  341. NEWMESH.MeshType = MESHTYPE
  342. if MESHID ~= "nil" and MESHID ~= "" then
  343. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  344. end
  345. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  346. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  347. end
  348. end
  349. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  350. NEWMESH.Scale = SCALE
  351. NEWMESH.Parent = PARENT
  352. return NEWMESH
  353. end
  354.  
  355. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  356. local NEWPART = IT("Part")
  357. NEWPART.formFactor = FORMFACTOR
  358. NEWPART.Reflectance = REFLECTANCE
  359. NEWPART.Transparency = TRANSPARENCY
  360. NEWPART.CanCollide = false
  361. NEWPART.Locked = true
  362. NEWPART.Anchored = true
  363. if ANCHOR == false then
  364. NEWPART.Anchored = false
  365. end
  366. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  367. NEWPART.Name = NAME
  368. NEWPART.Size = SIZE
  369. NEWPART.Position = Torso.Position
  370. NEWPART.Material = MATERIAL
  371. NEWPART:BreakJoints()
  372. NEWPART.Parent = PARENT
  373. return NEWPART
  374. end
  375.  
  376. local function weldBetween(a, b)
  377. local weldd = Instance.new("ManualWeld")
  378. weldd.Part0 = a
  379. weldd.Part1 = b
  380. weldd.C0 = CFrame.new()
  381. weldd.C1 = b.CFrame:inverse() * a.CFrame
  382. weldd.Parent = a
  383. return weldd
  384. end
  385.  
  386.  
  387. function QuaternionFromCFrame(cf)
  388. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  389. local trace = m00 + m11 + m22
  390. if trace > 0 then
  391. local s = math.sqrt(1 + trace)
  392. local recip = 0.5 / s
  393. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  394. else
  395. local i = 0
  396. if m11 > m00 then
  397. i = 1
  398. end
  399. if m22 > (i == 0 and m00 or m11) then
  400. i = 2
  401. end
  402. if i == 0 then
  403. local s = math.sqrt(m00 - m11 - m22 + 1)
  404. local recip = 0.5 / s
  405. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  406. elseif i == 1 then
  407. local s = math.sqrt(m11 - m22 - m00 + 1)
  408. local recip = 0.5 / s
  409. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  410. elseif i == 2 then
  411. local s = math.sqrt(m22 - m00 - m11 + 1)
  412. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  413. end
  414. end
  415. end
  416.  
  417. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  418. local xs, ys, zs = x + x, y + y, z + z
  419. local wx, wy, wz = w * xs, w * ys, w * zs
  420. local xx = x * xs
  421. local xy = x * ys
  422. local xz = x * zs
  423. local yy = y * ys
  424. local yz = y * zs
  425. local zz = z * zs
  426. 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))
  427. end
  428.  
  429. function QuaternionSlerp(a, b, t)
  430. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  431. local startInterp, finishInterp;
  432. if cosTheta >= 0.0001 then
  433. if (1 - cosTheta) > 0.0001 then
  434. local theta = ACOS(cosTheta)
  435. local invSinTheta = 1 / SIN(theta)
  436. startInterp = SIN((1 - t) * theta) * invSinTheta
  437. finishInterp = SIN(t * theta) * invSinTheta
  438. else
  439. startInterp = 1 - t
  440. finishInterp = t
  441. end
  442. else
  443. if (1 + cosTheta) > 0.0001 then
  444. local theta = ACOS(-cosTheta)
  445. local invSinTheta = 1 / SIN(theta)
  446. startInterp = SIN((t - 1) * theta) * invSinTheta
  447. finishInterp = SIN(t * theta) * invSinTheta
  448. else
  449. startInterp = t - 1
  450. finishInterp = t
  451. end
  452. end
  453. 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
  454. end
  455.  
  456. function Clerp(a, b, t)
  457. local qa = {QuaternionFromCFrame(a)}
  458. local qb = {QuaternionFromCFrame(b)}
  459. local ax, ay, az = a.x, a.y, a.z
  460. local bx, by, bz = b.x, b.y, b.z
  461. local _t = 1 - t
  462. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  463. end
  464.  
  465. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  466. local frame = IT("Frame")
  467. frame.BackgroundTransparency = TRANSPARENCY
  468. frame.BorderSizePixel = BORDERSIZEPIXEL
  469. frame.Position = POSITION
  470. frame.Size = SIZE
  471. frame.BackgroundColor3 = COLOR
  472. frame.BorderColor3 = BORDERCOLOR
  473. frame.Name = NAME
  474. frame.Parent = PARENT
  475. return frame
  476. end
  477.  
  478. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  479. local label = IT("TextLabel")
  480. label.BackgroundTransparency = 1
  481. label.Size = UD2(1, 0, 1, 0)
  482. label.Position = UD2(0, 0, 0, 0)
  483. label.TextColor3 = TEXTCOLOR
  484. label.TextStrokeTransparency = STROKETRANSPARENCY
  485. label.TextTransparency = TRANSPARENCY
  486. label.FontSize = TEXTFONTSIZE
  487. label.Font = TEXTFONT
  488. label.BorderSizePixel = BORDERSIZEPIXEL
  489. label.TextScaled = false
  490. label.Text = TEXT
  491. label.Name = NAME
  492. label.Parent = PARENT
  493. return label
  494. end
  495.  
  496. function NoOutlines(PART)
  497. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  498. end
  499.  
  500. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  501. local NEWWELD = IT(TYPE)
  502. NEWWELD.Part0 = PART0
  503. NEWWELD.Part1 = PART1
  504. NEWWELD.C0 = C0
  505. NEWWELD.C1 = C1
  506. NEWWELD.Parent = PARENT
  507. return NEWWELD
  508. end
  509.  
  510. local S = IT("Sound")
  511. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  512. local NEWSOUND = nil
  513. coroutine.resume(coroutine.create(function()
  514. NEWSOUND = S:Clone()
  515. NEWSOUND.Parent = PARENT
  516. NEWSOUND.Volume = VOLUME
  517. NEWSOUND.Pitch = PITCH
  518. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  519. NEWSOUND:play()
  520. if DOESLOOP == true then
  521. NEWSOUND.Looped = true
  522. else
  523. repeat wait(1) until NEWSOUND.Playing == false
  524. NEWSOUND:remove()
  525. end
  526. end))
  527. return NEWSOUND
  528. end
  529.  
  530. function CFrameFromTopBack(at, top, back)
  531. local right = top:Cross(back)
  532. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  533. end
  534.  
  535. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  536. function WACKYEFFECT(Table)
  537. local TYPE = (Table.EffectType or "Sphere")
  538. local SIZE = (Table.Size or VT(1,1,1))
  539. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  540. local TRANSPARENCY = (Table.Transparency or 0)
  541. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  542. local CFRAME = (Table.CFrame or Torso.CFrame)
  543. local MOVEDIRECTION = (Table.MoveToPos or nil)
  544. local ROTATION1 = (Table.RotationX or 0)
  545. local ROTATION2 = (Table.RotationY or 0)
  546. local ROTATION3 = (Table.RotationZ or 0)
  547. local MATERIAL = (Table.Material or "Neon")
  548. local COLOR = (Table.Color or C3(1,1,1))
  549. local TIME = (Table.Time or 45)
  550. local SOUNDID = (Table.SoundID or nil)
  551. local SOUNDPITCH = (Table.SoundPitch or nil)
  552. local SOUNDVOLUME = (Table.SoundVolume or nil)
  553. coroutine.resume(coroutine.create(function()
  554. local PLAYSSOUND = false
  555. local SOUND = nil
  556. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  557. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  558. PLAYSSOUND = true
  559. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  560. end
  561. EFFECT.Color = COLOR
  562. local MSH = nil
  563. if TYPE == "Sphere" then
  564. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  565. elseif TYPE == "Block" then
  566. MSH = IT("BlockMesh",EFFECT)
  567. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  568. elseif TYPE == "Wave" then
  569. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  570. elseif TYPE == "Ring" then
  571. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  572. elseif TYPE == "Slash" then
  573. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  574. elseif TYPE == "Round Slash" then
  575. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  576. elseif TYPE == "Swirl" then
  577. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  578. elseif TYPE == "Skull" then
  579. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  580. elseif TYPE == "Crystal" then
  581. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  582. end
  583. if MSH ~= nil then
  584. local MOVESPEED = nil
  585. if MOVEDIRECTION ~= nil then
  586. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  587. end
  588. local GROWTH = SIZE - ENDSIZE
  589. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  590. if TYPE == "Block" then
  591. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  592. else
  593. EFFECT.CFrame = CFRAME
  594. end
  595. for LOOP = 1, TIME+1 do
  596. Swait()
  597. MSH.Scale = MSH.Scale - GROWTH/TIME
  598. if TYPE == "Wave" then
  599. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  600. end
  601. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  602. if TYPE == "Block" then
  603. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  604. else
  605. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  606. end
  607. if MOVEDIRECTION ~= nil then
  608. local ORI = EFFECT.Orientation
  609. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  610. EFFECT.Orientation = ORI
  611. end
  612. end
  613. EFFECT.Transparency = 1
  614. if PLAYSSOUND == false then
  615. EFFECT:remove()
  616. else
  617. repeat Swait() until SOUND.Playing == false
  618. EFFECT:remove()
  619. end
  620. else
  621. if PLAYSSOUND == false then
  622. EFFECT:remove()
  623. else
  624. repeat Swait() until SOUND.Playing == false
  625. EFFECT:remove()
  626. end
  627. end
  628. end))
  629. end
  630.  
  631. function MakeForm(PART,TYPE)
  632. if TYPE == "Cyl" then
  633. local MSH = IT("CylinderMesh",PART)
  634. elseif TYPE == "Ball" then
  635. local MSH = IT("SpecialMesh",PART)
  636. MSH.MeshType = "Sphere"
  637. elseif TYPE == "Wedge" then
  638. local MSH = IT("SpecialMesh",PART)
  639. MSH.MeshType = "Wedge"
  640. end
  641. end
  642.  
  643. Debris = game:GetService("Debris")
  644.  
  645. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  646. local DIRECTION = CF(StartPos,EndPos).lookVector
  647. return game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, DIRECTION * Distance), Ignore)
  648. end
  649.  
  650. local FIRECOLOR = C3(1,85/255,0)
  651.  
  652. local Particle = IT("ParticleEmitter",nil)
  653. Particle.Enabled = false
  654. Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.6),NumberSequenceKeypoint.new(1,1)})
  655. Particle.LightEmission = 0.5
  656. Particle.Rate = 500
  657. Particle.Rotation = NumberRange.new(-180, 180)
  658. Particle.RotSpeed = NumberRange.new(-180, 180)
  659. Particle.Texture = "http://www.roblox.com/asset/?id=1460745664"
  660. Particle.Color = ColorSequence.new(FIRECOLOR)
  661.  
  662. --ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
  663. function ParticleEmitter(Table)
  664. local PRTCL = Particle:Clone()
  665. local Speed = Table.Speed or 5
  666. local Drag = Table.Drag or 0
  667. local Size1 = Table.Size1 or 1
  668. local Size2 = Table.Size2 or 5
  669. local Lifetime1 = Table.Lifetime1 or 1
  670. local Lifetime2 = Table.Lifetime2 or 1.5
  671. local Parent = Table.Parent or Torso
  672. local Emit = Table.Emit or 100
  673. local Offset = Table.Offset or 360
  674. local Accel = Table.Accel or VT(0,0,0)
  675. local Enabled = Table.Enabled or false
  676. PRTCL.Parent = Parent
  677. PRTCL.Size = NumberSequence.new(Size1,Size2)
  678. PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  679. PRTCL.Speed = NumberRange.new(Speed)
  680. PRTCL.VelocitySpread = Offset
  681. PRTCL.Drag = Drag
  682. PRTCL.Acceleration = Accel
  683. if Enabled == false then
  684. PRTCL:Emit(Emit)
  685. Debris:AddItem(PRTCL,Lifetime2)
  686. else
  687. PRTCL.Enabled = true
  688. end
  689. return PRTCL
  690. end
  691.  
  692. function Pheonix(Size)
  693. local PHEONIX = IT("Model",nil)
  694. PHEONIX.Name = "PHEONIX"
  695. local BASEPART = CreatePart(3, PHEONIX, "Neon", 0, 0.5, "Deep orange", "Wyvern Base",VT(0,0,0),false)
  696. CreateWeldOrSnapOrMotor("Weld", RootPart, RootPart, BASEPART, CF(0 , 4*Size, 3*Size), CF(0, 0, 0))
  697. CreateMesh("SpecialMesh", BASEPART, "FileMesh", "90615474", "", VT(1.5,1.5,1.5)*Size, VT(0,0,0))
  698. local RWING = CreatePart(3, PHEONIX, "Neon", 0, 0.5, "Deep orange", "Right Wing", VT(0,0,0),false)
  699. local RWELD = CreateWeldOrSnapOrMotor("Weld", BASEPART, BASEPART, RWING, CF(2*Size , 2*Size, 0.75*Size), CF(-2*Size, 0, 0))
  700. local LWING = CreatePart(3, PHEONIX, "Neon", 0, 0.5, "Deep orange", "Left Wing", VT(0,0,0),false)
  701. local LWELD = CreateWeldOrSnapOrMotor("Weld", BASEPART, BASEPART, LWING, CF(-2*Size , 2*Size, 0.75*Size), CF(2*Size, 0, 0))
  702. CreateMesh("SpecialMesh", RWING, "FileMesh", "90615661", "", VT(1.5,1.5,1.5)*Size, VT(0,0,0))
  703. CreateMesh("SpecialMesh", LWING, "FileMesh", "90615581", "", VT(1.5,1.5,1.5)*Size, VT(0,0,0))
  704. for _, c in pairs(PHEONIX:GetChildren()) do
  705. if c.ClassName == "Part" then
  706. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  707. c.Color = FIRECOLOR
  708. end
  709. end
  710. PHEONIX.Parent = Weapon
  711. return PHEONIX,BASEPART,RWING,LWING,RWELD,LWELD
  712. end
  713.  
  714. function turnto(position)
  715. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  716. end
  717.  
  718. function AddChildrenToTable(FROM,PARENT,DIST,TABLE)
  719. for _, c in pairs(PARENT:GetDescendants()) do
  720. if c.ClassName == "Model" then
  721. if c ~= Character and c:FindFirstChildOfClass("Humanoid") and (c:FindFirstChild("Torso") or c:FindFirstChild("UpperTorso")) then
  722. local HUMANOID = c:FindFirstChildOfClass("Humanoid")
  723. local TORSO = (c:FindFirstChild("Torso") or c:FindFirstChild("UpperTorso"))
  724. if (TORSO.Position - FROM).Magnitude < DIST then
  725. table.insert(TABLE,c)
  726. end
  727. end
  728. end
  729. end
  730. end
  731.  
  732. --//=================================\\
  733. --|| WEAPON CREATION
  734. --\\=================================//
  735.  
  736. Humanoid.DisplayDistanceType = "None"
  737. local naeeym2 = IT("BillboardGui",Character)
  738. naeeym2.AlwaysOnTop = true
  739. naeeym2.Size = UDim2.new(2,35,1,15)
  740. naeeym2.StudsOffset = Vector3.new(0,1.5,0)
  741. naeeym2.MaxDistance = 75
  742. naeeym2.Adornee = Character.Head
  743. naeeym2.Name = "Name"
  744. local tecks2 = IT("TextLabel",naeeym2)
  745. tecks2.BackgroundTransparency = 1
  746. tecks2.TextScaled = true
  747. tecks2.BorderSizePixel = 0
  748. tecks2.Text = "The Pharaoh"
  749. tecks2.Font = "Bodoni"
  750. tecks2.TextSize = 30
  751. tecks2.TextStrokeTransparency = 0
  752. tecks2.TextColor3 = C3(0,0,0)
  753. tecks2.TextStrokeColor3 = C3(188/255, 155/255, 93/255)
  754. tecks2.Size = UDim2.new(1,0,0.5,0)
  755. tecks2.Parent = naeeym2
  756. local top = Instance.new("Shirt")
  757. top.ShirtTemplate = "rbxassetid://182802864"
  758. top.Parent = Character
  759. top.Name = "Cloth"
  760. local bottom = Instance.new("Pants")
  761. bottom.PantsTemplate = "rbxassetid://182802941"
  762. bottom.Parent = Character
  763. bottom.Name = "Cloth"
  764.  
  765. --Head.Transparency = 1
  766. local PRT = CreatePart(3, Character, "Fabric", 0, 0, "Really black", "Hood", VT(1,1,1),false)
  767. PRT.Color = C3(0,0,0)
  768. CreateWeldOrSnapOrMotor("Weld", Head, Head, PRT, CF(0,-0.1,0.05), CF(0, 0, 0))
  769. CreateMesh("SpecialMesh", PRT, "FileMesh", "10661327", "10661334", VT(1,1,1)*1.1, VT(0,0,0))
  770. CreateMesh("SpecialMesh", Head, "FileMesh", "16150909", "16150889", VT(1,1,1), VT(0,0,0))
  771. local Handle = CreatePart(3, Weapon, "Concrete", 0, 0, "Cork", "Staff", VT(0,6,0),false)
  772. MakeForm(Handle,"Cyl")
  773. local Grasp = CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, Handle, CF(0,-1,0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
  774. local Part = CreatePart(3, Weapon, "Concrete", 0, 0, "Cork", "Staff", VT(0.1,1,0.1),false)
  775. MakeForm(Part,"Cyl")
  776. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0,Handle.Size.Y/2,0), CF(0, 0, 0))
  777. local Part = CreatePart(3, Weapon, "Concrete", 0, 0, "Cork", "Staff", VT(0.1,1,0.1),false)
  778. MakeForm(Part,"Cyl")
  779. CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0,-Handle.Size.Y/2-1.3,0) * ANGLES(RAD(0), RAD(150), RAD(0)), CF(0, 0, 0))
  780. CreateMesh("SpecialMesh", Part, "FileMesh", "19106648", "19106633", VT(1,1,1)*1.1, VT(0,0,0))
  781. local Eye = CreatePart(3, Weapon, "Concrete", 0, 1, "Cork", "Eye", VT(0,0,0),false)
  782. CreateWeldOrSnapOrMotor("Weld", Handle, Part, Eye, CF(0,Part.Size.Y/2+0.17,-0.05), CF(0, 0, 0))
  783.  
  784. for _, c in pairs(Weapon:GetChildren()) do
  785. if c.ClassName == "Part" then
  786. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  787. end
  788. end
  789.  
  790. local SKILLTEXTCOLOR = C3(188/255, 155/255, 93/255)
  791. local SKILLFONT = "Bodoni"
  792. local SKILLTEXTSIZE = 6
  793.  
  794. Weapon.Parent = Character
  795.  
  796. Humanoid.Died:connect(function()
  797. ATTACK = true
  798. end)
  799.  
  800. local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23, 0, 0.86, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  801. local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50, 0, 0.86, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  802. local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
  803. local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
  804. local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.84, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
  805.  
  806. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Summon", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 1")
  807. local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Warp", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 2")
  808. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Pheonix Glare", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 3")
  809. local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Shade Zone", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 4")
  810. local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Pharaoh's Throne", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 5")
  811.  
  812. --//=================================\\
  813. --|| DAMAGING
  814. --\\=================================//
  815.  
  816. function ApplyDamage(Humanoid,Damage,TorsoPart)
  817. local defence = Instance.new("BoolValue",Humanoid.Parent)
  818. defence.Name = ("HitBy"..Player.Name)
  819. game:GetService("Debris"):AddItem(defence, 0.001)
  820. Damage = Damage * DAMAGEMULTIPLIER
  821. if Humanoid.Health ~= 0 then
  822. local CritChance = MRANDOM(1,100)
  823. if Damage > Humanoid.Health then
  824. Damage = math.ceil(Humanoid.Health)
  825. if Damage == 0 then
  826. Damage = 0.1
  827. end
  828. end
  829. Humanoid.Health = Humanoid.Health - Damage
  830. end
  831. end
  832.  
  833. function ApplyAoE(POSITION,RANGE,MINDMG,MAXDMG,FLING,INSTAKILL)
  834. local CHILDREN = workspace:GetDescendants()
  835. for index, CHILD in pairs(CHILDREN) do
  836. if CHILD.ClassName == "Model" and CHILD ~= Character and CHILD.Parent ~= Effects then
  837. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  838. if HUM then
  839. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  840. if TORSO then
  841. if (TORSO.Position - POSITION).Magnitude <= RANGE then
  842. if INSTAKILL == true then
  843. CHILD:BreakJoints()
  844. else
  845. local DMG = MRANDOM(MINDMG,MAXDMG)
  846. ApplyDamage(HUM,DMG,TORSO)
  847. end
  848. if FLING > 0 then
  849. for _, c in pairs(CHILD:GetChildren()) do
  850. if c:IsA("BasePart") then
  851. local bv = Instance.new("BodyVelocity")
  852. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  853. bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
  854. bv.Parent = c
  855. Debris:AddItem(bv,0.05)
  856. end
  857. end
  858. end
  859. end
  860. end
  861. end
  862. end
  863. end
  864. end
  865.  
  866. --//=================================\\
  867. --|| ATTACK FUNCTIONS AND STUFF
  868. --\\=================================//
  869.  
  870. function Raise()
  871. PLAYANIMS = false
  872. for i=0, 0.3, 0.1 / Animation_Speed do
  873. Swait()
  874. Grasp.C1 = Clerp(Grasp.C1,CF(0, 0, 0) * ANGLES(RAD(45), RAD(0), RAD(45)), 1 / Animation_Speed)
  875. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  876. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-10 - 4 * COS(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  877. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.45, 0) * ANGLES(RAD(150), RAD(7.5), RAD(45)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  878. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(15), RAD(-12 - 6 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  879. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  880. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  881. end
  882. Rooted = true
  883. WACKYEFFECT({Time = 25, EffectType = "Block", Size = VT(1,1,1)*4, Size2 = VT(0,0,0), Transparency = 1, Transparency2 = 0, CFrame = CF(Eye.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = 743521450, SoundPitch = 1, SoundVolume = 2.5})
  884. WACKYEFFECT({Time = 25, EffectType = "Sphere", Size = VT(1,1,1)*7, Size2 = VT(0,0,0), Transparency = 1, Transparency2 = 0, CFrame = CF(Eye.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  885. WACKYEFFECT({Time = 25, EffectType = "Ring", Size = VT(0,0,0), Size2 = VT(3,3,0), Transparency = 0, Transparency2 = 1, CFrame = CF(Eye.Position) * ANGLES(RAD(90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  886. for i=0, 1, 0.1 / Animation_Speed do
  887. Swait()
  888. Grasp.C1 = Clerp(Grasp.C1,CF(0, 0, 0) * ANGLES(RAD(45), RAD(0), RAD(45)), 1 / Animation_Speed)
  889. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  890. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-10 - 4 * COS(SINE / 12)), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  891. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.45, 0) * ANGLES(RAD(150), RAD(7.5), RAD(45)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  892. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(15), RAD(-12 - 6 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  893. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  894. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  895. end
  896. Rooted = false
  897. PLAYANIMS = true
  898. end
  899.  
  900. function Attack()
  901. ATTACK = true
  902. Raise()
  903. coroutine.resume(coroutine.create(function()
  904. end))
  905. ATTACK = false
  906. end
  907.  
  908. function Summon()
  909. ATTACK = true
  910. Raise()
  911. coroutine.resume(coroutine.create(function()
  912. local MINIONS = {}
  913. local HEADMESHES = {{Mesh = 36869983, Texture = 36869975},{Mesh = 63638055, Texture = 63638307}}
  914. local RIGHTARMS = {{Mesh = 63637701, Texture = 63637809},{Mesh = 36780156, Texture = 36780292}}
  915. local LEFTARMS = {{Mesh = 63637682, Texture = 63637809},{Mesh = 36780032, Texture = 36780292}}
  916. local RIGHTLEGS = {{Mesh = 63637711, Texture = 63637809},{Mesh = 36780195, Texture = 36780292}}
  917. local LEFTLEGS = {{Mesh = 63637691, Texture = 63637809},{Mesh = 36780079, Texture = 36780292}}
  918. local TORSOS = {{Mesh = 63637732, Texture = 63637809},{Mesh = 36780113, Texture = 36780292}}
  919. for i = 1, 3 do
  920. Swait()
  921. local MINION = CLONE:Clone()
  922. ANIMATE:Clone().Parent = MINION
  923. MINION.Name = "Mummy"
  924. MINION.Parent = Effects
  925. MINION.Head:ClearAllChildren()
  926. MINION.HumanoidRootPart.Anchored = true
  927. MINION.HumanoidRootPart.CFrame = RootPart.CFrame*CF(MRANDOM(-15,15),-10,MRANDOM(-15,15))
  928. local HITFLOOR = Raycast(MINION.HumanoidRootPart.Position+VT(0,10,0), (CF(MINION.HumanoidRootPart.Position, MINION.HumanoidRootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  929. if HITFLOOR then
  930. MINION.HumanoidRootPart.Color = HITFLOOR.Color
  931. WACKYEFFECT({Time = 25, EffectType = "Crystal", Size = VT(1,0,1), Size2 = VT(0,100,0), Transparency = 1, Transparency2 = 0, CFrame = CF(MINION.HumanoidRootPart.Position), MoveToPos = nil, RotationX = 0, RotationY = 15, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = 743521450, SoundPitch = 1.5, SoundVolume = 2})
  932. local HEDMESH = HEADMESHES[MRANDOM(1,#HEADMESHES)]
  933. CreateMesh("SpecialMesh", MINION.Head, "FileMesh", HEDMESH.Mesh, HEDMESH.Texture, VT(1,1,1), VT(0,0,0))
  934. ---------
  935. local PACKAGE = IT("CharacterMesh",MINION)
  936. PACKAGE.BodyPart = "RightArm"
  937. local PACKAGESTUFF = RIGHTARMS[MRANDOM(1,2)]
  938. PACKAGE.MeshId = PACKAGESTUFF.Mesh
  939. PACKAGE.OverlayTextureId = PACKAGESTUFF.Texture
  940. ---------
  941. local PACKAGE = IT("CharacterMesh",MINION)
  942. PACKAGE.BodyPart = "LeftArm"
  943. local PACKAGESTUFF = LEFTARMS[MRANDOM(1,2)]
  944. PACKAGE.MeshId = PACKAGESTUFF.Mesh
  945. PACKAGE.OverlayTextureId = PACKAGESTUFF.Texture
  946. ---------
  947. local PACKAGE = IT("CharacterMesh",MINION)
  948. PACKAGE.BodyPart = "RightLeg"
  949. local PACKAGESTUFF = RIGHTLEGS[MRANDOM(1,2)]
  950. PACKAGE.MeshId = PACKAGESTUFF.Mesh
  951. PACKAGE.OverlayTextureId = PACKAGESTUFF.Texture
  952. ---------
  953. local PACKAGE = IT("CharacterMesh",MINION)
  954. PACKAGE.BodyPart = "LeftLeg"
  955. local PACKAGESTUFF = LEFTLEGS[MRANDOM(1,2)]
  956. PACKAGE.MeshId = PACKAGESTUFF.Mesh
  957. PACKAGE.OverlayTextureId = PACKAGESTUFF.Texture
  958. ---------
  959. local PACKAGE = IT("CharacterMesh",MINION)
  960. PACKAGE.BodyPart = "Torso"
  961. local PACKAGESTUFF = TORSOS[MRANDOM(1,2)]
  962. PACKAGE.MeshId = PACKAGESTUFF.Mesh
  963. PACKAGE.OverlayTextureId = PACKAGESTUFF.Texture
  964. ---------
  965. table.insert(MINIONS,MINION)
  966. else
  967. MINION:remove()
  968. end
  969. end
  970. for e = 1, 100 do
  971. Swait()
  972. for i = 1, #MINIONS do
  973. if MINIONS[i] ~= nil then
  974. WACKYEFFECT({Time = 5, EffectType = "Wave", Size = VT(1,2,1), Size2 = VT(8,0,8), Transparency = 0.5, Transparency2 = 1, CFrame = MINIONS[i].HumanoidRootPart.CFrame*CF(0,7.5-(e*0.1),0) * ANGLES(RAD(0), RAD(i*2), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = MINIONS[i].HumanoidRootPart.Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  975. MINIONS[i].HumanoidRootPart.CFrame = MINIONS[i].HumanoidRootPart.CFrame * CF(0,0.1,0)
  976. end
  977. end
  978. end
  979. for i = 1, #MINIONS do
  980. if MINIONS[i] ~= nil then
  981. MINIONS[i].HumanoidRootPart.Anchored = false
  982. end
  983. end
  984. for i = 1, #MINIONS do
  985. coroutine.resume(coroutine.create(function()
  986. local SHOUTS = {1158091961,1158091668,1158092150}
  987. local TORSO = MINIONS[i].Torso
  988. local MUMMY = MINIONS[i]
  989. local HUMAN = MINIONS[i].Humanoid
  990. HUMAN.MaxHealth = MRANDOM(20,65)
  991. HUMAN.Health = HUMAN.MaxHealth
  992. HUMAN.Died:connect(function()
  993. CreateSound(SHOUTS[MRANDOM(1,3)], TORSO, 3, 0.5, false)
  994. end)
  995. local findNearestTorso = function(POS)
  996. local list = game.Workspace:GetDescendants()
  997. local torso = nil
  998. local dist = 10000
  999. local temp = nil
  1000. local human = nil
  1001. local temp2 = nil
  1002. for x = 1, #list do
  1003. temp2 = list[x]
  1004. if (temp2.className == "Model") and (temp2 ~= Character) and (temp2.Parent ~= Effects) then
  1005. temp = temp2:findFirstChild("Torso") or temp2:findFirstChild("UpperTorso")
  1006. human = temp2:findFirstChild("Humanoid")
  1007. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  1008. if (temp.Position - POS).magnitude < dist then
  1009. torso = temp
  1010. dist = (temp.Position - POS).magnitude
  1011. end
  1012. end
  1013. end
  1014. end
  1015. return torso, dist
  1016. end
  1017. for i = 1, 60 do
  1018. if HUMAN.Health == 0 then
  1019. break
  1020. end
  1021. wait(1)
  1022. local target,dist= findNearestTorso(TORSO.Position)
  1023. if target then
  1024. HUMAN:MoveTo(target.Position)
  1025. if dist < 5 then
  1026. local ANIM = HUMAN:LoadAnimation(ATANIM)
  1027. ANIM:Play()
  1028. CreateSound(SHOUTS[MRANDOM(1,3)], TORSO, 1, 1, false)
  1029. ApplyAoE(TORSO.CFrame*CF(0,0,-1.2).p,3,5,25,3,false)
  1030. end
  1031. end
  1032. end
  1033. TORSO.Parent:BreakJoints()
  1034. Debris:AddItem(MUMMY,4)
  1035. end))
  1036. end
  1037. end))
  1038. ATTACK = false
  1039. end
  1040.  
  1041. function Warp(Pos)
  1042. ATTACK = true
  1043. Raise()
  1044. PLAYANIMS = false
  1045. local SPOT = Pos
  1046. if Pos == "Mouse" then
  1047. SPOT = Mouse.Hit.p
  1048. end
  1049. local PLAYPOS = RootPart.Position
  1050. Rooted = true
  1051. coroutine.resume(coroutine.create(function()
  1052. repeat
  1053. Swait()
  1054. Grasp.C1 = Clerp(Grasp.C1,CF(0, 0, 0) * ANGLES(RAD(45), RAD(0), RAD(45)), 1 / Animation_Speed)
  1055. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1056. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-10 - 4 * COS(SINE / 12)), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1057. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.45, 0) * ANGLES(RAD(150), RAD(7.5), RAD(45)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  1058. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(15), RAD(-12 - 6 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1059. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1060. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1061. until ATTACK == false
  1062. PLAYANIMS = true
  1063. end))
  1064. for i = 1, 10 do
  1065. for _, c in pairs(Weapon:GetChildren()) do
  1066. if c.ClassName == "Part" then
  1067. c.Transparency = c.Transparency + 1/10
  1068. end
  1069. end
  1070. for _, c in pairs(Character:GetChildren()) do
  1071. if c.ClassName == "Part" and c ~= RootPart then
  1072. c.Transparency = c.Transparency + 1/10
  1073. end
  1074. end
  1075. tecks2.TextTransparency = tecks2.TextTransparency + 1/10
  1076. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency + 1/10
  1077. WACKYEFFECT({Time = 25, EffectType = "Swirl", Size = VT(1,1,1)*25, Size2 = VT(0,0,0), Transparency = 1, Transparency2 = 0, CFrame = CF(Torso.Position), MoveToPos = nil, RotationX = 0, RotationY = 15, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = 743521450, SoundPitch = 1.5, SoundVolume = 2})
  1078. wait(0.1)
  1079. end
  1080. CreateSound(743521450, Torso, 5, 0.5, false)
  1081. RootPart.CFrame = CF(SPOT+VT(0,15,0),PLAYPOS)
  1082. UNANCHOR = false
  1083. RootPart.Anchored = true
  1084. for i = 1, 10 do
  1085. wait(0.04)
  1086. WACKYEFFECT({Time = 25, EffectType = "Swirl", Size = VT(0,0,0), Size2 = VT(1,1,1)*25, Transparency = 0, Transparency2 = 1, CFrame = CF(Torso.Position), MoveToPos = nil, RotationX = 0, RotationY = -15, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = 1.5, SoundVolume = 2})
  1087. for _, c in pairs(Weapon:GetChildren()) do
  1088. if c.ClassName == "Part" then
  1089. c.Transparency = c.Transparency - 1/10
  1090. end
  1091. end
  1092. for _, c in pairs(Character:GetChildren()) do
  1093. if c.ClassName == "Part" and c ~= RootPart then
  1094. c.Transparency = c.Transparency - 1/10
  1095. end
  1096. end
  1097. tecks2.TextTransparency = tecks2.TextTransparency - 1/10
  1098. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency - 1/10
  1099. end
  1100. UNANCHOR = true
  1101. RootPart.Anchored = false
  1102. Rooted = false
  1103. ATTACK = false
  1104. end
  1105.  
  1106. function PheonixGlare()
  1107. ATTACK = true
  1108. Rooted = true
  1109. local BURNINGBODIES = {}
  1110. local SIZE = 2
  1111. if Humanoid.Sit == false then
  1112. Raise()
  1113. else
  1114. PLAYANIMS = false
  1115. SIZE = 9
  1116. for i=0, 0.3, 0.1 / Animation_Speed do
  1117. Swait()
  1118. Grasp.C1 = Clerp(Grasp.C1,CF(0, 0, 0) * ANGLES(RAD(45), RAD(0), RAD(45)), 1 / Animation_Speed)
  1119. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-10 - 4 * COS(SINE / 12)), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1120. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.45, 0) * ANGLES(RAD(150), RAD(7.5), RAD(45)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  1121. end
  1122. WACKYEFFECT({Time = 25, EffectType = "Block", Size = VT(1,1,1)*4, Size2 = VT(0,0,0), Transparency = 1, Transparency2 = 0, CFrame = CF(Eye.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = 743521450, SoundPitch = 1, SoundVolume = 2.5})
  1123. WACKYEFFECT({Time = 25, EffectType = "Sphere", Size = VT(1,1,1)*7, Size2 = VT(0,0,0), Transparency = 1, Transparency2 = 0, CFrame = CF(Eye.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1124. WACKYEFFECT({Time = 25, EffectType = "Ring", Size = VT(0,0,0), Size2 = VT(3,3,0), Transparency = 0, Transparency2 = 1, CFrame = CF(Eye.Position) * ANGLES(RAD(90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1125. for i=0, 1, 0.1 / Animation_Speed do
  1126. Swait()
  1127. Grasp.C1 = Clerp(Grasp.C1,CF(0, 0, 0) * ANGLES(RAD(45), RAD(0), RAD(45)), 1 / Animation_Speed)
  1128. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-10 - 4 * COS(SINE / 12)), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1129. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.45, 0) * ANGLES(RAD(150), RAD(7.5), RAD(45)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
  1130. end
  1131. PLAYANIMS = true
  1132. end
  1133. Rooted = true
  1134. local PHEONIX,WBODY,WRWING,WLWING,RWELD2,LWELD2 = Pheonix(SIZE)
  1135. for i=1, 20 do
  1136. Swait()
  1137. RWELD2.C0 = Clerp(RWELD2.C0, CF(2*(SIZE/2),3*(SIZE/2),0.75*SIZE) * ANGLES(RAD(-25), RAD(65), RAD(0)), 0.1 / Animation_Speed)
  1138. LWELD2.C0 = Clerp(LWELD2.C0, CF(-2*(SIZE/2),3*(SIZE/2),0.75*SIZE) * ANGLES(RAD(-25), RAD(-65), RAD(0)), 0.1 / Animation_Speed)
  1139. end
  1140. for i=1, 65 do
  1141. Swait()
  1142. RWELD2.C0 = Clerp(RWELD2.C0, CF(2*(SIZE/2),3*(SIZE/2),0.75*SIZE) * ANGLES(RAD(25), RAD(65), RAD(0)), 0.1 / Animation_Speed)
  1143. LWELD2.C0 = Clerp(LWELD2.C0, CF(-2*(SIZE/2),3*(SIZE/2),0.75*SIZE) * ANGLES(RAD(25), RAD(-65), RAD(0)), 0.1 / Animation_Speed)
  1144. end
  1145. for i = 1, 5 do
  1146. WACKYEFFECT({Time = 25, EffectType = "Sphere", Size = VT(0,0,0), Size2 = VT(35,35,35)*(SIZE/2), Transparency = 0, Transparency2 = 1, CFrame = CF(WBODY.Position) * ANGLES(RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)))*CF(0,0,35*(SIZE/2)), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0.1,0.1,0.1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1147. WACKYEFFECT({Time = 25, EffectType = "Sphere", Size = VT(0,0,0), Size2 = VT(45,45,45)*(SIZE/2), Transparency = 0, Transparency2 = 1, CFrame = CF(WBODY.Position) * ANGLES(RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)))*CF(0,0,35*(SIZE/2)), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = FIRECOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1148. end
  1149. WACKYEFFECT({Time = 25, EffectType = "Sphere", Size = VT(0,0,0), Size2 = VT(200,200,200)*(SIZE/2), Transparency = 0, Transparency2 = 1, CFrame = CF(WBODY.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = FIRECOLOR, SoundID = 462676772, SoundPitch = 1.2, SoundVolume = 10})
  1150. AddChildrenToTable(WBODY.Position,workspace,50*(SIZE/2),BURNINGBODIES)
  1151. ApplyAoE(WBODY.Position,50*(SIZE/2),0,0,130,false)
  1152. for i=1, 15 do
  1153. Swait()
  1154. RWELD2.C0 = Clerp(RWELD2.C0, CF(2*(SIZE/2),3*(SIZE/2),0.75*SIZE) * ANGLES(RAD(25), RAD(-65), RAD(0)), 1 / Animation_Speed)
  1155. LWELD2.C0 = Clerp(LWELD2.C0, CF(-2*(SIZE/2),3*(SIZE/2),0.75*SIZE) * ANGLES(RAD(25), RAD(65), RAD(0)), 1 / Animation_Speed)
  1156. end
  1157. coroutine.resume(coroutine.create(function()
  1158. wait(1)
  1159. for i = 1, 150 do
  1160. for i = 1, #BURNINGBODIES do
  1161. if BURNINGBODIES[i] ~= nil then
  1162. if BURNINGBODIES[i].Name ~= "Mummy" then
  1163. local HUM = BURNINGBODIES[i]:FindFirstChildOfClass("Humanoid")
  1164. if HUM then
  1165. if HUM.Health > 0 then
  1166. for _, c in pairs(BURNINGBODIES[i]:GetChildren()) do
  1167. if c:IsA("BasePart") and c.Transparency < 1 then
  1168. ParticleEmitter({Accel = VT(0,25,0), Speed = 2, Drag = 0, Size1 = 0.3, Size2 = 0, Lifetime1 = 1, Lifetime2 = 1.5, Parent = c, Emit = 4, Offset = 360, Enabled = false})
  1169. end
  1170. end
  1171. HUM.Health = HUM.Health - 0.5
  1172. else
  1173. table.remove(BURNINGBODIES,i)
  1174. end
  1175. else
  1176. table.remove(BURNINGBODIES,i)
  1177. end
  1178. else
  1179. for _, c in pairs(BURNINGBODIES[i]:GetChildren()) do
  1180. if c:IsA("BasePart") and c.Transparency < 1 then
  1181. c.Velocity = VT(MRANDOM(-5,5),MRANDOM(-5,5),MRANDOM(-5,5))*5
  1182. ParticleEmitter({Accel = VT(0,25,0), Speed = 2, Drag = 0, Size1 = 0.5, Size2 = 0, Lifetime1 = 1, Lifetime2 = 1.5, Parent = c, Emit = 45, Offset = 360, Enabled = true})
  1183. end
  1184. end
  1185. BURNINGBODIES[i]:BreakJoints()
  1186. table.remove(BURNINGBODIES,i)
  1187. end
  1188. else
  1189. table.remove(BURNINGBODIES,i)
  1190. end
  1191. end
  1192. wait()
  1193. end
  1194. end))
  1195. coroutine.resume(coroutine.create(function()
  1196. for i = 1, 50 do
  1197. Swait()
  1198. WBODY.Transparency = WBODY.Transparency + 0.5/50
  1199. WRWING.Transparency = WBODY.Transparency
  1200. WLWING.Transparency = WBODY.Transparency
  1201. end
  1202. PHEONIX:remove()
  1203. end))
  1204. Rooted = false
  1205. ATTACK = false
  1206. end
  1207.  
  1208. function ShadeZone()
  1209. local HEADMESHES = {{Mesh = 36869983, Texture = 36869975},{Mesh = 63638055, Texture = 63638307}}
  1210. local RIGHTARMS = {{Mesh = 63637701, Texture = 63637809},{Mesh = 36780156, Texture = 36780292}}
  1211. local LEFTARMS = {{Mesh = 63637682, Texture = 63637809},{Mesh = 36780032, Texture = 36780292}}
  1212. local RIGHTLEGS = {{Mesh = 63637711, Texture = 63637809},{Mesh = 36780195, Texture = 36780292}}
  1213. local LEFTLEGS = {{Mesh = 63637691, Texture = 63637809},{Mesh = 36780079, Texture = 36780292}}
  1214. local TORSOS = {{Mesh = 63637732, Texture = 63637809},{Mesh = 36780113, Texture = 36780292}}
  1215. local HITFLOOR,HITPOS = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 15, Character)
  1216. if HITFLOOR and Effects:FindFirstChild("Shade Zone") == nil then
  1217. ATTACK = true
  1218. local BODIES = {}
  1219. Raise()
  1220. coroutine.resume(coroutine.create(function()
  1221. local ZONE = CreatePart(3, Effects, "Neon", 0, 1, C3(0,0,0), "Shade Zone", VT(45,0,45))
  1222. ZONE.Color = C3(0,0,0)
  1223. MakeForm(ZONE,"Cyl")
  1224. ZONE.CFrame = CF(HITPOS)
  1225. local AURA = CreateSound(1393698948, ZONE, 0, 0.5, true)
  1226. for i =1, 45 do
  1227. Swait()
  1228. AURA.Volume = AURA.Volume + 10/45
  1229. ZONE.Transparency = ZONE.Transparency - 1/45
  1230. ZONE.Size = ZONE.Size + VT(2,0,2)
  1231. end
  1232. local SIZE = ZONE.Size
  1233. for i =1, 400 do
  1234. Swait()
  1235. AddChildrenToTable(ZONE.Position,workspace,ZONE.Size.X/2,BODIES)
  1236. if MRANDOM(1,5) == 1 then
  1237. WACKYEFFECT({Time = 25, EffectType = "Sphere", Size = VT(5,0,5), Size2 = VT(0,135,0), Transparency = 0, Transparency2 = 1, CFrame = CF(ZONE.Position) * ANGLES(RAD(0), RAD(MRANDOM(0,360)), RAD(0))*CF(0,0,MRANDOM(0,math.ceil(ZONE.Size.X/2.1))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  1238. end
  1239. ZONE.Size = SIZE + VT(2 * COS(i / 12),0,2 * COS(i / 12))
  1240. end
  1241. for i =1, 45 do
  1242. Swait()
  1243. AURA.Volume = AURA.Volume - 10/45
  1244. ZONE.Transparency = ZONE.Transparency + 1/45
  1245. ZONE.Size = ZONE.Size - VT(2,0,2)
  1246. end
  1247. ZONE:remove()
  1248. for e = 1, #BODIES do
  1249. Swait()
  1250. if BODIES[e] ~= nil then
  1251. local BOD = BODIES[e]
  1252. for i = 1, 10 do
  1253. for i = 1, #BODIES do
  1254. if (BODIES[i] == BOD and i ~= e) then
  1255. table.remove(BODIES,i)
  1256. end
  1257. end
  1258. end
  1259. coroutine.resume(coroutine.create(function()
  1260. local BODY = BODIES[e]
  1261. local TORSO = BODIES[e]:FindFirstChild("Torso") or BODIES[e]:FindFirstChild("UpperTorso")
  1262. local HUM = BODIES[e]:FindFirstChildOfClass("Humanoid")
  1263. if TORSO and HUM then
  1264. TORSO.Anchored = true
  1265. for i = 1, 15 do
  1266. if HUM.Health > 0 then
  1267. wait(0.1)
  1268. WACKYEFFECT({Time = 15, EffectType = "Block", Size = VT(0,0,0), Size2 = VT(15,15,15), Transparency = 0, Transparency2 = 1, CFrame = CF(TORSO.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(0,0,0), SoundID = 182765513, SoundPitch = MRANDOM(6,8)/10, SoundVolume = 2.5})
  1269. TORSO.CFrame = TORSO.CFrame * ANGLES(RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)))
  1270. HUM.Health = HUM.Health - 1.5
  1271. if HUM.Health == 0 then
  1272. local MINION = CLONE:Clone()
  1273. ANIMATE:Clone().Parent = MINION
  1274. MINION.Name = "Mummy"
  1275. MINION.Parent = Effects
  1276. MINION.Head:ClearAllChildren()
  1277. MINION.Torso.CFrame = TORSO.CFrame
  1278. BODY:remove()
  1279. local HEDMESH = HEADMESHES[MRANDOM(1,#HEADMESHES)]
  1280. CreateMesh("SpecialMesh", MINION.Head, "FileMesh", HEDMESH.Mesh, HEDMESH.Texture, VT(1,1,1), VT(0,0,0))
  1281. ---------
  1282. local PACKAGE = IT("CharacterMesh",MINION)
  1283. PACKAGE.BodyPart = "RightArm"
  1284. local PACKAGESTUFF = RIGHTARMS[MRANDOM(1,2)]
  1285. PACKAGE.MeshId = PACKAGESTUFF.Mesh
  1286. PACKAGE.OverlayTextureId = PACKAGESTUFF.Texture
  1287. ---------
  1288. local PACKAGE = IT("CharacterMesh",MINION)
  1289. PACKAGE.BodyPart = "LeftArm"
  1290. local PACKAGESTUFF = LEFTARMS[MRANDOM(1,2)]
  1291. PACKAGE.MeshId = PACKAGESTUFF.Mesh
  1292. PACKAGE.OverlayTextureId = PACKAGESTUFF.Texture
  1293. ---------
  1294. local PACKAGE = IT("CharacterMesh",MINION)
  1295. PACKAGE.BodyPart = "RightLeg"
  1296. local PACKAGESTUFF = RIGHTLEGS[MRANDOM(1,2)]
  1297. PACKAGE.MeshId = PACKAGESTUFF.Mesh
  1298. PACKAGE.OverlayTextureId = PACKAGESTUFF.Texture
  1299. ---------
  1300. local PACKAGE = IT("CharacterMesh",MINION)
  1301. PACKAGE.BodyPart = "LeftLeg"
  1302. local PACKAGESTUFF = LEFTLEGS[MRANDOM(1,2)]
  1303. PACKAGE.MeshId = PACKAGESTUFF.Mesh
  1304. PACKAGE.OverlayTextureId = PACKAGESTUFF.Texture
  1305. ---------
  1306. local PACKAGE = IT("CharacterMesh",MINION)
  1307. PACKAGE.BodyPart = "Torso"
  1308. local PACKAGESTUFF = TORSOS[MRANDOM(1,2)]
  1309. PACKAGE.MeshId = PACKAGESTUFF.Mesh
  1310. PACKAGE.OverlayTextureId = PACKAGESTUFF.Texture
  1311. ---------
  1312. coroutine.resume(coroutine.create(function()
  1313. local SHOUTS = {1158091961,1158091668,1158092150}
  1314. local TORSO = MINION.Torso
  1315. local MUMMY = MINION
  1316. local HUMAN = MINION.Humanoid
  1317. HUMAN.MaxHealth = MRANDOM(20,65)
  1318. HUMAN.Health = HUMAN.MaxHealth
  1319. HUMAN.Died:connect(function()
  1320. CreateSound(SHOUTS[MRANDOM(1,3)], TORSO, 3, 0.5, false)
  1321. end)
  1322. local findNearestTorso = function(POS)
  1323. local list = game.Workspace:GetDescendants()
  1324. local torso = nil
  1325. local dist = 10000
  1326. local temp = nil
  1327. local human = nil
  1328. local temp2 = nil
  1329. for x = 1, #list do
  1330. temp2 = list[x]
  1331. if (temp2.className == "Model") and (temp2 ~= Character) and (temp2.Parent ~= Effects) then
  1332. temp = temp2:findFirstChild("Torso") or temp2:findFirstChild("UpperTorso")
  1333. human = temp2:findFirstChild("Humanoid")
  1334. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  1335. if (temp.Position - POS).magnitude < dist then
  1336. torso = temp
  1337. dist = (temp.Position - POS).magnitude
  1338. end
  1339. end
  1340. end
  1341. end
  1342. return torso, dist
  1343. end
  1344. for i = 1, 30 do
  1345. if HUMAN.Health == 0 then
  1346. break
  1347. end
  1348. wait(1)
  1349. local target,dist= findNearestTorso(TORSO.Position)
  1350. if target then
  1351. HUMAN:MoveTo(target.Position)
  1352. if dist < 5 then
  1353. local ANIM = HUMAN:LoadAnimation(ATANIM)
  1354. ANIM:Play()
  1355. CreateSound(SHOUTS[MRANDOM(1,3)], TORSO, 1, 1, false)
  1356. ApplyAoE(TORSO.CFrame*CF(0,0,-1.2).p,3,5,25,3,false)
  1357. end
  1358. end
  1359. end
  1360. TORSO.Parent:BreakJoints()
  1361. Debris:AddItem(MUMMY,4)
  1362. end))
  1363. break
  1364. end
  1365. end
  1366. end
  1367. if TORSO then
  1368. TORSO.Anchored = false
  1369. end
  1370. end
  1371. end))
  1372. end
  1373. end
  1374. end))
  1375. ATTACK = false
  1376. end
  1377. end
  1378.  
  1379. function PharaohsThrone()
  1380. local HITFLOOR,HITPOS = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  1381. if HITFLOOR then
  1382. ATTACK = true
  1383. Raise()
  1384. coroutine.resume(coroutine.create(function()
  1385. local PYRAMID = IT("Model")
  1386. PYRAMID.Name = "Pyramid"
  1387. local BASEPART = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Wheat", "Pyramid", VT(100,1,100))
  1388. local FIREPART = CreatePart(3, Effects, "Neon", 0, 1, "Wheat", "Pyramid", VT(110,1,110))
  1389. FIREPART.Touched:Connect(function(hit)
  1390. if FIREPART.Transparency ~= 1 then
  1391. if hit.Parent:FindFirstChildOfClass("Humanoid") then
  1392. if hit.Parent.Name == "Mummy" then
  1393. hit.Parent:BreakJoints()
  1394. else
  1395. hit.Parent:FindFirstChildOfClass("Humanoid").Health = hit.Parent:FindFirstChildOfClass("Humanoid").Health - 25
  1396. end
  1397. end
  1398. end
  1399. end)
  1400. ------
  1401. local PILLAR = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Wheat", "Pyramid", VT(5,25,5))
  1402. MakeForm(PILLAR,"Cyl")
  1403. PILLAR.CFrame = BASEPART.CFrame*CF(25,25,25)
  1404. local PILLARTOP = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Wheat", "Pyramid", VT(6,4,6))
  1405. MakeForm(PILLARTOP,"Cyl")
  1406. PILLARTOP.CFrame = PILLAR.CFrame*CF(0,12.5,0)
  1407. local COAL = CreatePart(3, PYRAMID, "Pebble", 0, 0, "Black", "Pyramid", VT(2,2,2))
  1408. COAL.CFrame = PILLARTOP.CFrame*CF(0,PILLARTOP.Size.Y/2,0)
  1409. local FIRE = ParticleEmitter({Accel = VT(0,15,0), Speed = 3, Drag = 0, Size1 = 2, Size2 = 0, Lifetime1 = 1, Lifetime2 = 2, Parent = COAL, Emit = 45, Offset = 360, Enabled = true})
  1410. FIRE.LockedToPart = true
  1411. ------
  1412. local PILLAR = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Wheat", "Pyramid", VT(5,25,5))
  1413. MakeForm(PILLAR,"Cyl")
  1414. PILLAR.CFrame = BASEPART.CFrame*CF(-25,25,25)
  1415. local PILLARTOP = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Wheat", "Pyramid", VT(6,4,6))
  1416. MakeForm(PILLARTOP,"Cyl")
  1417. PILLARTOP.CFrame = PILLAR.CFrame*CF(0,12.5,0)
  1418. local COAL = CreatePart(3, PYRAMID, "Pebble", 0, 0, "Black", "Pyramid", VT(2,2,2))
  1419. COAL.CFrame = PILLARTOP.CFrame*CF(0,PILLARTOP.Size.Y/2,0)
  1420. local FIRE = ParticleEmitter({Accel = VT(0,15,0), Speed = 3, Drag = 0, Size1 = 2, Size2 = 0, Lifetime1 = 1, Lifetime2 = 2, Parent = COAL, Emit = 45, Offset = 360, Enabled = true})
  1421. FIRE.LockedToPart = true
  1422. ------
  1423. local PILLAR = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Wheat", "Pyramid", VT(5,25,5))
  1424. MakeForm(PILLAR,"Cyl")
  1425. PILLAR.CFrame = BASEPART.CFrame*CF(25,25,-25)
  1426. local PILLARTOP = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Wheat", "Pyramid", VT(6,4,6))
  1427. MakeForm(PILLARTOP,"Cyl")
  1428. PILLARTOP.CFrame = PILLAR.CFrame*CF(0,12.5,0)
  1429. local COAL = CreatePart(3, PYRAMID, "Pebble", 0, 0, "Black", "Pyramid", VT(2,2,2))
  1430. COAL.CFrame = PILLARTOP.CFrame*CF(0,PILLARTOP.Size.Y/2,0)
  1431. local FIRE = ParticleEmitter({Accel = VT(0,15,0), Speed = 3, Drag = 0, Size1 = 2, Size2 = 0, Lifetime1 = 1, Lifetime2 = 2, Parent = COAL, Emit = 45, Offset = 360, Enabled = true})
  1432. FIRE.LockedToPart = true
  1433. ------
  1434. local PILLAR = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Wheat", "Pyramid", VT(5,25,5))
  1435. MakeForm(PILLAR,"Cyl")
  1436. PILLAR.CFrame = BASEPART.CFrame*CF(-25,25,-25)
  1437. local PILLARTOP = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Wheat", "Pyramid", VT(6,4,6))
  1438. MakeForm(PILLARTOP,"Cyl")
  1439. PILLARTOP.CFrame = PILLAR.CFrame*CF(0,12.5,0)
  1440. local COAL = CreatePart(3, PYRAMID, "Pebble", 0, 0, "Black", "Pyramid", VT(2,2,2))
  1441. COAL.CFrame = PILLARTOP.CFrame*CF(0,PILLARTOP.Size.Y/2,0)
  1442. local FIRE = ParticleEmitter({Accel = VT(0,15,0), Speed = 3, Drag = 0, Size1 = 2, Size2 = 0, Lifetime1 = 1, Lifetime2 = 2, Parent = COAL, Emit = 45, Offset = 360, Enabled = true})
  1443. FIRE.LockedToPart = true
  1444. ------
  1445. FIREPART.Color = FIRECOLOR
  1446. FIREPART.CFrame = RootPart.CFrame*CF(0,-3.3,65)
  1447. local FIRE = ParticleEmitter({Accel = VT(0,15,0), Speed = 3, Drag = 0, Size1 = 2, Size2 = 0, Lifetime1 = 1, Lifetime2 = 2, Parent = FIREPART, Emit = 45, Offset = 360, Enabled = true})
  1448. local LASTPART = nil
  1449. for i = 1, 35 do
  1450. local PART = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Wheat", "Pyramid", VT(100-i*2,1,100-i*2))
  1451. PART.CFrame = BASEPART.CFrame*CF(0,i,0)
  1452. LASTPART = PART
  1453. local PART = CreatePart(3, PYRAMID, "Marble", 0, 0, "Cork", "Pyramid", VT(5,1.1,100.1-i*2))
  1454. PART.CFrame = BASEPART.CFrame*CF(0,i,0)
  1455. local PART = CreatePart(3, PYRAMID, "Marble", 0, 0, "Cork", "Pyramid", VT(100.1-i*2,1.1,5))
  1456. PART.CFrame = BASEPART.CFrame*CF(0,i,0)
  1457. local PART = CreatePart(3, PYRAMID, "Granite", 0, 0, "Cork", "Pyramid", VT(7,1.05,100.05-i*2))
  1458. PART.CFrame = BASEPART.CFrame*CF(0,i,0)
  1459. local PART = CreatePart(3, PYRAMID, "Granite", 0, 0, "Cork", "Pyramid", VT(100.05-i*2,1.05,7))
  1460. PART.CFrame = BASEPART.CFrame*CF(0,i,0)
  1461. end
  1462. local PART = CreatePart(3, PYRAMID, "Marble", 0, 0, "Cork", "Pyramid", VT(20,0.1,20))
  1463. PART.CFrame = LASTPART.CFrame*CF(0,LASTPART.Size.Y/2,0)
  1464. FIRE.Rate = 999
  1465. local CHAIR1 = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Dark stone grey", "Throne", VT(7,1,7))
  1466. CHAIR1.CFrame = BASEPART.CFrame*CF(0,36,0)
  1467. local CHAIR2 = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Dark stone grey", "Throne", VT(5,1,5))
  1468. CHAIR2.CFrame = CHAIR1.CFrame*CF(0,1,0)
  1469. local CHAIR3 = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Mid gray", "Throne", VT(3,1,3))
  1470. CHAIR3.CFrame = CHAIR2.CFrame*CF(0,1,0)
  1471. local SEAT = IT("Seat",PYRAMID)
  1472. SEAT.Size = VT(2,0.2,2)
  1473. SEAT.Material = "Concrete"
  1474. SEAT.Anchored = true
  1475. SEAT.BrickColor = BRICKC"Dark orange"
  1476. SEAT.CFrame = CHAIR3.CFrame*CF(0,0.55,-0.5)
  1477. local CHAIR4 = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Mid gray", "Throne", VT(3,5,1))
  1478. CHAIR4.CFrame = CHAIR3.CFrame*CF(0,3,1)
  1479. local CHAIR5 = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Dark orange", "Throne", VT(2,4.7,1))
  1480. CHAIR5.CFrame = CHAIR4.CFrame*CF(0,0,-0.1)
  1481. local CHAIR6 = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Mid gray", "Throne", VT(0.5,2,2))
  1482. CHAIR6.CFrame = CHAIR3.CFrame*CF(1.5,0.75,0)
  1483. local CHAIR7 = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Mid gray", "Throne", VT(0.5,2,2))
  1484. CHAIR7.CFrame = CHAIR3.CFrame*CF(-1.5,0.75,0)
  1485. PYRAMID.PrimaryPart = BASEPART
  1486. PYRAMID:SetPrimaryPartCFrame(RootPart.CFrame*CF(0,-50,65))
  1487. PYRAMID.Parent = Weapon
  1488. for i = 1, 25 do
  1489. Swait()
  1490. FIREPART.Transparency = FIREPART.Transparency - 1/25
  1491. end
  1492. for _, c in pairs(PYRAMID:GetChildren()) do
  1493. if c:IsA("BasePart") then
  1494. c.CanCollide = true
  1495. end
  1496. end
  1497. local RESET = PYRAMID.Changed:Connect(function()
  1498. PYRAMID.Parent = workspace
  1499. end)
  1500. CreateSound(130972023, BASEPART, 10, 0.8, false)
  1501. for i = 1, 46*4 do
  1502. Swait()
  1503. PYRAMID:SetPrimaryPartCFrame(BASEPART.CFrame*CF(0,0.25,0))
  1504. end
  1505. for i = 1, 25 do
  1506. Swait()
  1507. FIREPART.Transparency = FIREPART.Transparency + 1/25
  1508. end
  1509. FIRE.Enabled = false
  1510. local SINKING = false
  1511. SIT.Changed:Connect(function()
  1512. if SIT.Value == false and SINKING == false then
  1513. SINKING = true
  1514. local PRT = CreatePart(3, PYRAMID, "Concrete", 0, 0, "Dark orange", "Throne", VT(2,0.2,2))
  1515. PRT.CFrame = SEAT.CFrame
  1516. SEAT:remove()
  1517. wait(1)
  1518. FIRE.Enabled = true
  1519. for i = 1, 25 do
  1520. Swait()
  1521. FIREPART.Transparency = FIREPART.Transparency - 1/25
  1522. end
  1523. for i = 1, 46*4 do
  1524. Swait()
  1525. FIREPART.Size = FIREPART.Size - VT(0.003*i,0,0.003*i)
  1526. PYRAMID:SetPrimaryPartCFrame(BASEPART.CFrame*CF(0,-0.25,0))
  1527. end
  1528. for i = 1, 25 do
  1529. Swait()
  1530. FIREPART.Size = FIREPART.Size - VT((0.003*i)*45,0,(0.003*i)*45)
  1531. FIREPART.Transparency = FIREPART.Transparency + 1/25
  1532. end
  1533. FIRE.Enabled = false
  1534. Debris:AddItem(FIREPART,5)
  1535. RESET:disconnect()
  1536. PYRAMID:remove()
  1537. end
  1538. end)
  1539. end))
  1540. ATTACK = false
  1541. end
  1542. end
  1543.  
  1544. function Taunt()
  1545. ATTACK = true
  1546. Rooted = false
  1547. CreateSound(1546451566, Head, 7, 1, false)
  1548. for i=0, 3.5, 0.1 / Animation_Speed do
  1549. Swait()
  1550. Grasp.C1 = Clerp(Grasp.C1,CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1551. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0 - 0.15 * COS(SINE / 12), 0 + 0.1 * COS(SINE / 2)) * ANGLES(RAD(3.5 * COS(SINE / 12)), RAD(0), RAD(-35)), 1 / Animation_Speed)
  1552. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-26 + 5.5 * SIN(SINE / 4)), RAD(-25 + 6.5 * COS(SINE / 4)), RAD(35)), 1 / Animation_Speed)
  1553. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 - 0.25 * COS(SINE / 12), 0.45 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(90), RAD(7.5 * COS(SINE / 12)), RAD(45 - 7.5 * COS(SINE / 12))) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1554. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.0, 0.55, -0.6) * ANGLES(RAD(170), RAD(MRANDOM(-4,4)), RAD(60)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
  1555. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1556. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1557. end
  1558. ATTACK = false
  1559. Rooted = false
  1560. end
  1561.  
  1562. --//=================================\\
  1563. --|| ASSIGN THINGS TO KEYS
  1564. --\\=================================//
  1565.  
  1566. function MouseDown(Mouse)
  1567. if ATTACK == false then
  1568. end
  1569. end
  1570.  
  1571. function MouseUp(Mouse)
  1572. HOLD = false
  1573. end
  1574.  
  1575. function KeyDown(Key)
  1576. KEYHOLD = true
  1577. if Humanoid.Sit == false then
  1578. if Key == "z" and ATTACK == false then
  1579. Summon()
  1580. end
  1581.  
  1582. if Key == "b" and ATTACK == false then
  1583. if Weapon:FindFirstChild("Pyramid") == nil then
  1584. Warp("Mouse")
  1585. else
  1586. if Weapon.Pyramid:FindFirstChild("Seat") then
  1587. Warp(Weapon.Pyramid.Seat.Position+VT(0,5,0))
  1588. end
  1589. end
  1590. end
  1591.  
  1592. if Key == "v" and ATTACK == false then
  1593. ShadeZone()
  1594. end
  1595.  
  1596. if Key == "t" and ATTACK == false then
  1597. Taunt()
  1598. end
  1599.  
  1600. if Key == "x" and ATTACK == false then
  1601. if Weapon:FindFirstChild("Pyramid") == nil then
  1602. PharaohsThrone()
  1603. else
  1604. SIT.Value = true
  1605. end
  1606. end
  1607. end
  1608.  
  1609. if Key == "c" and ATTACK == false then
  1610. PheonixGlare()
  1611. end
  1612. end
  1613.  
  1614. function KeyUp(Key)
  1615. KEYHOLD = false
  1616. end
  1617.  
  1618. Mouse.Button1Down:connect(function(NEWKEY)
  1619. MouseDown(NEWKEY)
  1620. end)
  1621. Mouse.Button1Up:connect(function(NEWKEY)
  1622. MouseUp(NEWKEY)
  1623. end)
  1624. Mouse.KeyDown:connect(function(NEWKEY)
  1625. KeyDown(NEWKEY)
  1626. end)
  1627. Mouse.KeyUp:connect(function(NEWKEY)
  1628. KeyUp(NEWKEY)
  1629. end)
  1630.  
  1631. --//=================================\\
  1632. --\\=================================//
  1633.  
  1634.  
  1635. function unanchor()
  1636. if UNANCHOR == true then
  1637. RootPart.Anchored = false
  1638. end
  1639. g = Character:GetChildren()
  1640. for i = 1, #g do
  1641. if g[i].ClassName == "Part" and g[i] ~= RootPart then
  1642. g[i].Anchored = false
  1643. end
  1644. end
  1645. g = Weapon:GetChildren()
  1646. for i = 1, #g do
  1647. if g[i].ClassName == "Part" then
  1648. g[i].Anchored = false
  1649. end
  1650. end
  1651. end
  1652.  
  1653.  
  1654. --//=================================\\
  1655. --|| WRAP THE WHOLE SCRIPT UP
  1656. --\\=================================//
  1657.  
  1658. Humanoid.Changed:connect(function(Jump)
  1659. if Jump == "Jump" and (Disable_Jump == true) then
  1660. Humanoid.Jump = false
  1661. end
  1662. end)
  1663.  
  1664. while true do
  1665. Swait()
  1666. script.Parent = WEAPONGUI
  1667. ANIMATE.Parent = nil
  1668. if Humanoid then
  1669. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  1670. IDLEANIMATION:Play()
  1671. end
  1672. SINE = SINE + CHANGE
  1673. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1674. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1675. Ignore = {Torso,RootPart,RightLeg,LeftLeg,RightLeg,Head,RightArm,LeftArm,PRT}
  1676. local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
  1677. local HITFLOOR,HITPOS = CastProperRay(RootPart.Position, RootPart.Position-VT(0,15,0), 4, Ignore)
  1678. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1679. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1680. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1681. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1682. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1683. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1684. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1685. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1686. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1687. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1688. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1689. end
  1690. if Humanoid.Sit == false then
  1691. SIT.Value = false
  1692. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1693. ANIM = "Jump"
  1694. if PLAYANIMS == true then
  1695. Grasp.C1 = Clerp(Grasp.C1,CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1696. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1697. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1698. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1699. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1700. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  1701. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  1702. end
  1703. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1704. ANIM = "Fall"
  1705. if PLAYANIMS == true then
  1706. Grasp.C1 = Clerp(Grasp.C1,CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1707. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1708. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1709. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1710. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1711. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  1712. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  1713. end
  1714. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1715. ANIM = "Idle"
  1716. if PLAYANIMS == true then
  1717. Grasp.C1 = Clerp(Grasp.C1,CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1718. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1719. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-8 - 4 * COS(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1720. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 - 0.25 * COS(SINE / 12), 0.45 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(90), RAD(7.5 * COS(SINE / 12)), RAD(45 - 7.5 * COS(SINE / 12))) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1721. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(15), RAD(-12 - 6 * COS(SINE / 12))) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1722. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1723. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1724. end
  1725. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1726. ANIM = "Walk"
  1727. if PLAYANIMS == true then
  1728. Grasp.C1 = Clerp(Grasp.C1,CF(0, 0+0.35 * COS(SINE / WALKSPEEDVALUE), 0) * ANGLES(RAD(0), RAD(0), RAD(-20 * COS(SINE / WALKSPEEDVALUE / 2))), 0.5 / Animation_Speed)
  1729. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1730. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1731. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65-0.35 * COS(SINE / WALKSPEEDVALUE), 0) * ANGLES(RAD(90-20 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(25)) * RIGHTSHOULDERC0, 0.35 / Animation_Speed)
  1732. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(15), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
  1733. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
  1734. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
  1735. end
  1736. end
  1737. else
  1738. SIT.Value = true
  1739. if PLAYANIMS == true then
  1740. Grasp.C1 = Clerp(Grasp.C1,CF(0, 0.85, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
  1741. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.5 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / Animation_Speed)
  1742. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-3 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 2 / Animation_Speed)
  1743. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(90), RAD(0), RAD(35)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
  1744. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 - 0.05 * COS(SINE / 12), 0.3) * ANGLES(RAD(90), RAD(0), RAD(5)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  1745. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.35 - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(25), RAD(65), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 2 / Animation_Speed)
  1746. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.35 - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(25), RAD(-65), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 2 / Animation_Speed)
  1747. end
  1748. end
  1749. unanchor()
  1750. Humanoid.MaxHealth = "inf"
  1751. Humanoid.Health = "inf"
  1752. if Rooted == false then
  1753. Disable_Jump = false
  1754. Humanoid.WalkSpeed = Speed
  1755. elseif Rooted == true then
  1756. Disable_Jump = true
  1757. Humanoid.WalkSpeed = 0
  1758. end
  1759. for _, c in pairs(Character:GetChildren()) do
  1760. if c.ClassName == "Part" and c.Name ~= "Eye" then
  1761. c.Material = "Neon"
  1762. if c:FindFirstChildOfClass("ParticleEmitter") then
  1763. c:FindFirstChildOfClass("ParticleEmitter"):remove()
  1764. end
  1765. c.Color = C3(0,0,0)
  1766. if c == Head then
  1767. if c:FindFirstChild("face") then
  1768. c.face:remove()
  1769. end
  1770. end
  1771. elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.Name == "Body Colors" then
  1772. c:remove()
  1773. elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
  1774. c:remove()
  1775. end
  1776. end
  1777. if sick.Parent ~= Torso then
  1778. sick = Instance.new("Sound")
  1779. end
  1780. sick.SoundId = "rbxassetid://890276873"
  1781. sick.Looped = true
  1782. sick.Pitch = 1
  1783. sick.Volume = 4
  1784. sick.Parent = Torso
  1785. sick:Resume()
  1786. Humanoid.Name = "Pharaoh"
  1787. end
  1788.  
  1789. --//=================================\\
  1790. --\\=================================//
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796. --//====================================================\\--
  1797. --|| END OF SCRIPT
  1798. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement