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