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