View difference between Paste ID: 2ebKaXfF and 5xBRhL0x
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
3
do
4
	print("FE Compatibility code by Mokiros")
5
	script.Parent = Player.Character
6
7
	--RemoteEvent for communicating
8
	local Event = Instance.new("RemoteEvent")
9
	Event.Name = "UserInput_Event"
10
11
	--Fake event to make stuff like Mouse.KeyDown work
12
	local function fakeEvent()
13
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
14
		t.connect = t.Connect
15
		return t
16
	end
17
18
	--Creating fake input objects with fake variables
19
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
20
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
21
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
22
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
23
	end}
24
	--Merged 2 functions into one by checking amount of arguments
25
	CAS.UnbindAction = CAS.BindAction
26
27
	--This function will trigger the events that have been :Connect()'ed
28
	local function te(self,ev,...)
29
		local t = m[ev]
30
		if t and t._fakeEvent and t.Function then
31
			t.Function(...)
32
		end
33
	end
34
	m.TrigEvent = te
35
	UIS.TrigEvent = te
36
37
	Event.OnServerEvent:Connect(function(plr,io)
38
	    if plr~=Player then return end
39
		if io.isMouse then
40
			m.Target = io.Target
41
			m.Hit = io.Hit
42
		else
43
			local b = io.UserInputState == Enum.UserInputState.Begin
44
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
45
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
46
			end
47
			for _,t in pairs(CAS.Actions) do
48
				for _,k in pairs(t.Keys) do
49
					if k==io.KeyCode then
50
						t.Function(t.Name,io.UserInputState,io)
51
					end
52
				end
53
			end
54
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
55
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
56
	    end
57
	end)
58
	Event.Parent = NLS([==[
59
	local Player = game:GetService("Players").LocalPlayer
60
	local Event = script:WaitForChild("UserInput_Event")
61
62
	local UIS = game:GetService("UserInputService")
63
	local input = function(io,a)
64
		if a then return end
65
		--Since InputObject is a client-side instance, we create and pass table instead
66
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
67
	end
68
	UIS.InputBegan:Connect(input)
69
	UIS.InputEnded:Connect(input)
70
71
	local Mouse = Player:GetMouse()
72
	local h,t
73
	--Give the server mouse data 30 times every second, but only if the values changed
74
	--If player is not moving their mouse, client won't fire events
75
	while wait(1/30) do
76
		if h~=Mouse.Hit or t~=Mouse.Target then
77
			h,t=Mouse.Hit,Mouse.Target
78
			Event:FireServer({isMouse=true,Target=t,Hit=h})
79
		end
80
	end]==],Player.Character)
81
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
82
end
83
--//====================================================\\--
84
--||			   CREATED BY SHACKLUSTER
85
--\\====================================================//--
86
87
wait(0.2)
88
89
Player = owner
90
PlayerGui = Player.PlayerGui
91
Cam = workspace.CurrentCamera
92
Backpack = Player.Backpack
93
Character = Player.Character
94
Humanoid = Character.Humanoid
95
RootPart = Character["HumanoidRootPart"]
96
Torso = Character["Torso"]
97
Head = Character["Head"]
98
RightArm = Character["Right Arm"]
99
LeftArm = Character["Left Arm"]
100
RightLeg = Character["Right Leg"]
101
LeftLeg = Character["Left Leg"]
102
RootJoint = RootPart["RootJoint"]
103
Neck = Torso["Neck"]
104
RightShoulder = Torso["Right Shoulder"]
105
LeftShoulder = Torso["Left Shoulder"]
106
RightHip = Torso["Right Hip"]
107
LeftHip = Torso["Left Hip"]
108
local sick = Instance.new("Sound",Character)
109
sick.SoundId = "rbxassetid://1494340971"
110
sick.Looped = true
111
sick.Pitch = 1
112
sick.Volume = 1
113
sick:Play()
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 = 25
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
--ROBLOXIDLEANIMATION.Parent = Humanoid
160
local WEAPONGUI = IT("ScreenGui", PlayerGui)
161
WEAPONGUI.Name = "Weapon GUI"
162
local Effects = IT("Folder", Character)
163
Effects.Name = "Effects"
164
local ANIMATOR = Humanoid.Animator
165
local ANIMATE = Character.Animate
166
local UNANCHOR = true
167
local PLAYMAINANIM = true
168
local BOLTSOUNDS = {168586621,168586586,178452241}
169
170
--//=================================\\
171
--\\=================================//
172
173
174
--//=================================\\
175
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
176
--\\=================================//
177
178
ArtificialHB = Instance.new("BindableEvent", script)
179
ArtificialHB.Name = "ArtificialHB"
180
181
script:WaitForChild("ArtificialHB")
182
183
frame = Frame_Speed
184
tf = 0
185
allowframeloss = false
186
tossremainder = false
187
lastframe = tick()
188
script.ArtificialHB:Fire()
189
190
game:GetService("RunService").Heartbeat:connect(function(s, p)
191
	tf = tf + s
192
	if tf >= frame then
193
		if allowframeloss then
194
			script.ArtificialHB:Fire()
195
			lastframe = tick()
196
		else
197
			for i = 1, math.floor(tf / frame) do
198
				script.ArtificialHB:Fire()
199
			end
200
		lastframe = tick()
201
		end
202
		if tossremainder then
203
			tf = 0
204
		else
205
			tf = tf - frame * math.floor(tf / frame)
206
		end
207
	end
208
end)
209
210
--//=================================\\
211
--\\=================================//
212
213
--//=================================\\
214
--|| 	      SOME FUNCTIONS
215
--\\=================================//
216
217
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
218
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
219
end
220
221
function PositiveAngle(NUMBER)
222
	if NUMBER >= 0 then
223
		NUMBER = 0
224
	end
225
	return NUMBER
226
end
227
228
function NegativeAngle(NUMBER)
229
	if NUMBER <= 0 then
230
		NUMBER = 0
231
	end
232
	return NUMBER
233
end
234
235
function Swait(NUMBER)
236
	if NUMBER == 0 or NUMBER == nil then
237
		ArtificialHB.Event:wait()
238
	else
239
		for i = 1, NUMBER do
240
			ArtificialHB.Event:wait()
241
		end
242
	end
243
end
244
245
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
246
	local NEWMESH = IT(MESH)
247
	if MESH == "SpecialMesh" then
248
		NEWMESH.MeshType = MESHTYPE
249
		if MESHID ~= "nil" and MESHID ~= "" then
250
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
251
		end
252
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
253
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
254
		end
255
	end
256
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
257
	NEWMESH.Scale = SCALE
258
	NEWMESH.Parent = PARENT
259
	return NEWMESH
260
end
261
262
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
263
	local NEWPART = IT("Part")
264
	NEWPART.formFactor = FORMFACTOR
265
	NEWPART.Reflectance = REFLECTANCE
266
	NEWPART.Transparency = TRANSPARENCY
267
	NEWPART.CanCollide = false
268
	NEWPART.Locked = true
269
	NEWPART.Anchored = true
270
	if ANCHOR == false then
271
		NEWPART.Anchored = false
272
	end
273
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
274
	NEWPART.Name = NAME
275
	NEWPART.Size = SIZE
276
	NEWPART.Position = Torso.Position
277
	NEWPART.Material = MATERIAL
278
	NEWPART:BreakJoints()
279
	NEWPART.Parent = PARENT
280
	return NEWPART
281
end
282
283
	local function weldBetween(a, b)
284
	    local weldd = Instance.new("ManualWeld")
285
	    weldd.Part0 = a
286
	    weldd.Part1 = b
287
	    weldd.C0 = CFrame.new()
288
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
289
	    weldd.Parent = a
290
	    return weldd
291
	end
292
293
294
function QuaternionFromCFrame(cf)
295
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
296
	local trace = m00 + m11 + m22
297
	if trace > 0 then 
298
		local s = math.sqrt(1 + trace)
299
		local recip = 0.5 / s
300
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
301
	else
302
		local i = 0
303
		if m11 > m00 then
304
			i = 1
305
		end
306
		if m22 > (i == 0 and m00 or m11) then
307
			i = 2
308
		end
309
		if i == 0 then
310
			local s = math.sqrt(m00 - m11 - m22 + 1)
311
			local recip = 0.5 / s
312
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
313
		elseif i == 1 then
314
			local s = math.sqrt(m11 - m22 - m00 + 1)
315
			local recip = 0.5 / s
316
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
317
		elseif i == 2 then
318
			local s = math.sqrt(m22 - m00 - m11 + 1)
319
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
320
		end
321
	end
322
end
323
 
324
function QuaternionToCFrame(px, py, pz, x, y, z, w)
325
	local xs, ys, zs = x + x, y + y, z + z
326
	local wx, wy, wz = w * xs, w * ys, w * zs
327
	local xx = x * xs
328
	local xy = x * ys
329
	local xz = x * zs
330
	local yy = y * ys
331
	local yz = y * zs
332
	local zz = z * zs
333
	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))
334
end
335
 
336
function QuaternionSlerp(a, b, t)
337
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
338
	local startInterp, finishInterp;
339
	if cosTheta >= 0.0001 then
340
		if (1 - cosTheta) > 0.0001 then
341
			local theta = ACOS(cosTheta)
342
			local invSinTheta = 1 / SIN(theta)
343
			startInterp = SIN((1 - t) * theta) * invSinTheta
344
			finishInterp = SIN(t * theta) * invSinTheta
345
		else
346
			startInterp = 1 - t
347
			finishInterp = t
348
		end
349
	else
350
		if (1 + cosTheta) > 0.0001 then
351
			local theta = ACOS(-cosTheta)
352
			local invSinTheta = 1 / SIN(theta)
353
			startInterp = SIN((t - 1) * theta) * invSinTheta
354
			finishInterp = SIN(t * theta) * invSinTheta
355
		else
356
			startInterp = t - 1
357
			finishInterp = t
358
		end
359
	end
360
	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
361
end
362
363
function Clerp(a, b, t)
364
	local qa = {QuaternionFromCFrame(a)}
365
	local qb = {QuaternionFromCFrame(b)}
366
	local ax, ay, az = a.x, a.y, a.z
367
	local bx, by, bz = b.x, b.y, b.z
368
	local _t = 1 - t
369
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
370
end
371
372
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
373
	local frame = IT("Frame")
374
	frame.BackgroundTransparency = TRANSPARENCY
375
	frame.BorderSizePixel = BORDERSIZEPIXEL
376
	frame.Position = POSITION
377
	frame.Size = SIZE
378
	frame.BackgroundColor3 = COLOR
379
	frame.BorderColor3 = BORDERCOLOR
380
	frame.Name = NAME
381
	frame.Parent = PARENT
382
	return frame
383
end
384
385
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
386
	local label = IT("TextLabel")
387
	label.BackgroundTransparency = 1
388
	label.Size = UD2(1, 0, 1, 0)
389
	label.Position = UD2(0, 0, 0, 0)
390
	label.TextColor3 = TEXTCOLOR
391
	label.TextStrokeTransparency = STROKETRANSPARENCY
392
	label.TextTransparency = TRANSPARENCY
393
	label.FontSize = TEXTFONTSIZE
394
	label.Font = TEXTFONT
395
	label.BorderSizePixel = BORDERSIZEPIXEL
396
	label.TextScaled = false
397
	label.Text = TEXT
398
	label.Name = NAME
399
	label.Parent = PARENT
400
	return label
401
end
402
403
function NoOutlines(PART)
404
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
405
end
406
407
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
408
	local NEWWELD = IT(TYPE)
409
	NEWWELD.Part0 = PART0
410
	NEWWELD.Part1 = PART1
411
	NEWWELD.C0 = C0
412
	NEWWELD.C1 = C1
413
	NEWWELD.Parent = PARENT
414
	return NEWWELD
415
end
416
417
local S = IT("Sound")
418
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
419
	local NEWSOUND = nil
420
	coroutine.resume(coroutine.create(function()
421
		NEWSOUND = S:Clone()
422
		NEWSOUND.Parent = PARENT
423
		NEWSOUND.Volume = VOLUME
424
		NEWSOUND.Pitch = PITCH
425
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
426
		NEWSOUND:play()
427
		if DOESLOOP == true then
428
			NEWSOUND.Looped = true
429
		else
430
			repeat wait(1) until NEWSOUND.Playing == false
431
			NEWSOUND:remove()
432
		end
433
	end))
434
	return NEWSOUND
435
end
436
437
local EyeSizes={
438
	NumberSequenceKeypoint.new(0,2,0),
439
	NumberSequenceKeypoint.new(1,0,0)
440
}
441
local EyeTrans={
442
	NumberSequenceKeypoint.new(0,0.5,0),
443
	NumberSequenceKeypoint.new(1,1,0)
444
}
445
local PE=Instance.new("ParticleEmitter",nil)
446
PE.LightEmission=.8
447
PE.Color = ColorSequence.new(BRICKC("Alder").Color,BRICKC("Lavender").Color)
448
PE.Size=NumberSequence.new(EyeSizes)
449
PE.Transparency=NumberSequence.new(EyeTrans)
450
PE.Lifetime=NumberRange.new(0.35,1)
451
PE.Rotation=NumberRange.new(0,360)
452
PE.Rate=100
453
PE.VelocitySpread = 10000
454
PE.Acceleration = Vector3.new(0,85,0)
455
PE.Drag = 5
456
PE.Speed = NumberRange.new(0.1,5)
457
PE.Texture="http://www.roblox.com/asset/?id=1460745664"
458
PE.ZOffset = 0.5
459
PE.Name = "PE"
460
PE.Enabled = false
461
462
function Fire(art)
463
	local PARTICLES = PE:Clone()
464
	PARTICLES.Parent = art
465
	PARTICLES.Enabled = true
466
	return PARTICLES
467
end
468
469
function CFrameFromTopBack(at, top, back)
470
	local right = top:Cross(back)
471
	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)
472
end
473
474
--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})
475
function WACKYEFFECT(Table)
476
	local TYPE = (Table.EffectType or "Sphere")
477
	local SIZE = (Table.Size or VT(1,1,1))
478
	local ENDSIZE = (Table.Size2 or VT(0,0,0))
479
	local TRANSPARENCY = (Table.Transparency or 0)
480
	local ENDTRANSPARENCY = (Table.Transparency2 or 1)
481
	local CFRAME = (Table.CFrame or Torso.CFrame)
482
	local MOVEDIRECTION = (Table.MoveToPos or nil)
483
	local ROTATION1 = (Table.RotationX or 0)
484
	local ROTATION2 = (Table.RotationY or 0)
485
	local ROTATION3 = (Table.RotationZ or 0)
486
	local MATERIAL = (Table.Material or "Neon")
487
	local COLOR = (Table.Color or C3(1,1,1))
488
	local TIME = (Table.Time or 45)
489
	local SOUNDID = (Table.SoundID or nil)
490
	local SOUNDPITCH = (Table.SoundPitch or nil)
491
	local SOUNDVOLUME = (Table.SoundVolume or nil)
492
	coroutine.resume(coroutine.create(function()
493
		local PLAYSSOUND = false
494
		local SOUND = nil
495
		local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
496
		if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
497
			PLAYSSOUND = true
498
			SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
499
		end
500
		EFFECT.Color = COLOR
501
		local MSH = nil
502
		if TYPE == "Sphere" then
503
			MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
504
		elseif TYPE == "Block" or TYPE == "Box" then
505
			MSH = IT("BlockMesh",EFFECT)
506
			MSH.Scale = SIZE
507
		elseif TYPE == "Wave" then
508
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
509
		elseif TYPE == "Ring" then
510
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
511
		elseif TYPE == "Slash" then
512
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
513
		elseif TYPE == "Round Slash" then
514
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
515
		elseif TYPE == "Swirl" then
516
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
517
		elseif TYPE == "Skull" then
518
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
519
		elseif TYPE == "Crystal" then
520
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
521
		end
522
		if MSH ~= nil then
523
			local MOVESPEED = nil
524
			if MOVEDIRECTION ~= nil then
525
				MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
526
			end
527
			local GROWTH = SIZE - ENDSIZE
528
			local TRANS = TRANSPARENCY - ENDTRANSPARENCY
529
			if TYPE == "Block" then
530
				EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
531
			else
532
				EFFECT.CFrame = CFRAME
533
			end
534
			for LOOP = 1, TIME+1 do
535
				Swait()
536
				MSH.Scale = MSH.Scale - GROWTH/TIME
537
				if TYPE == "Wave" then
538
					MSH.Offset = VT(0,0,-MSH.Scale.X/8)
539
				end
540
				EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
541
				if TYPE == "Block" then
542
					EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
543
				else
544
					EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
545
				end
546
				if MOVEDIRECTION ~= nil then
547
					local ORI = EFFECT.Orientation
548
					EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
549
					EFFECT.Orientation = ORI
550
				end
551
			end
552
			if PLAYSSOUND == false then
553
				EFFECT:remove()
554
			else
555
				repeat wait(1) until SOUND.Playing == false
556
				EFFECT:remove()
557
			end
558
		else
559
			if PLAYSSOUND == false then
560
				EFFECT:remove()
561
			else
562
				repeat Swait() until SOUND.Playing == false
563
				EFFECT:remove()
564
			end
565
		end
566
	end))
567
end
568
569
function MakeForm(PART,TYPE)
570
	if TYPE == "Cyl" then
571
		local MSH = IT("CylinderMesh",PART)
572
	elseif TYPE == "Ball" then
573
		local MSH = IT("SpecialMesh",PART)
574
		MSH.MeshType = "Sphere"
575
	elseif TYPE == "Wedge" then
576
		local MSH = IT("SpecialMesh",PART)
577
		MSH.MeshType = "Wedge"
578
	end
579
end
580
581
Debris = game:GetService("Debris")
582
583
function CastProperRay(StartPos, EndPos, Distance, Ignore)
584
	local DIRECTION = CF(StartPos,EndPos).lookVector
585
	return Raycast(StartPos, DIRECTION, Distance, Ignore)
586
end
587
588-
local HATWELD = nil
588+
589-
function Pose(WhichPose,Speed,Time,Magic,Gyro,Tors)
589+
590-
	PLAYMAINANIM = false
590+
591-
	if WhichPose == "Cast1" then
591+
592-
		for i=0, Time, 0.1 / Animation_Speed do
592+
593-
			Swait()
593+
594-
			if Magic == true then
594+
595-
				WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
595+
596
	local Dissapear = Table.DoesFade or false
597-
			if Gyro ~= nil and Gyro ~= false then
597+
598-
				Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
598+
599
	local Branches = Table.Branches or false
600-
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(35)), Speed / Animation_Speed)
600+
601-
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-35)), Speed / Animation_Speed)
601+
602-
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(125), RAD(0), RAD(45)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
602+
603-
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
603+
604-
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
604+
605-
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
605+
606
		local ExtraSize = (DISTANCE-E)/15
607-
	elseif WhichPose == "Cast2" then
607+
608-
		for i=0, Time, 0.1 / Animation_Speed do
608+
609-
			Swait()
609+
610-
			if Magic == true then
610+
611-
				WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
611+
612-
				WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = LeftArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
612+
613
			PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,CF(HITPOS)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,SegmentLength/3+(DISTANCE-E)).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
614-
			if Gyro ~= nil and Gyro ~= false then
614+
615-
				Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
615+
616
		if Branches == true then
617-
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
617+
618-
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
618+
619-
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(120), RAD(0), RAD(15)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
619+
620-
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(120), RAD(0), RAD(-15)) * LEFTSHOULDERC0, Speed / Animation_Speed)
620+
621-
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
621+
622-
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
622+
623
					PART.Color = Color
624-
	elseif WhichPose == "RightArmUp" then
624+
625-
		for i=0, Time, 0.1 / Animation_Speed do
625+
626-
			Swait()
626+
627-
			if Magic == true then
627+
628-
				WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
628+
629
					end
630-
			if Gyro ~= nil and Gyro ~= false then
630+
631-
				Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
631+
632
			end
633-
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(15)), Speed / Animation_Speed)
633+
634-
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-15)), Speed / Animation_Speed)
634+
635-
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.2) * ANGLES(RAD(125), RAD(0), RAD(25)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
635+
636-
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
636+
637-
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
637+
638-
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
638+
639
				for _, c in pairs(LIGHTNINGMODEL:GetChildren()) do
640-
	elseif WhichPose == "Taunt" then
640+
641-
		for i=0, Time, 0.1 / Animation_Speed do
641+
642-
			Swait()
642+
643-
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
643+
644-
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
644+
645-
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
645+
646-
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
646+
647-
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
647+
648-
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
648+
649
	end
650-
		HATWELD.Part0 = RightArm
650+
651-
		HATWELD.C0 = CF(0,-1.1,-0.4) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(-20), RAD(0), RAD(0))
651+
652-
		CreateSound(221057812,Torso,10,1,false)
652+
653-
		for i=0, Time*2, 0.1 / Animation_Speed do
653+
654-
			Swait()
654+
655-
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
655+
656-
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(35 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
656+
657-
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(145), RAD(0), RAD(45)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
657+
658-
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(5), RAD(25), RAD(-15)) * LEFTSHOULDERC0, Speed / Animation_Speed)
658+
659-
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
659+
660-
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
660+
661
	CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/35,0), CF(0, 0, 0))
662-
		for i=0, Time, 0.1 / Animation_Speed do
662+
663-
			Swait()
663+
664-
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
664+
665-
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(0)), Speed / Animation_Speed)
665+
666-
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.65, -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
666+
667-
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
667+
668-
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
668+
669-
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
669+
670-
			HATWELD.C0 = Clerp(HATWELD.C0, CF(-0.5,-1.2,-0.3) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(35), RAD(0), RAD(35)), Speed / Animation_Speed)
670+
671
MakeForm(HAT2,"Cyl")
672-
		HATWELD.Part0 = Head
672+
673-
		HATWELD.C0 = CF(0,0.35,0)
673+
674-
	elseif WhichPose == "Prepare key" then
674+
675-
		for i=0, Time, 0.1 / Animation_Speed do
675+
676-
			Swait()
676+
677-
			if Gyro ~= nil and Gyro ~= false then
677+
678-
				Gyro.cframe = CF(RootPart.Position,Tors.Position)
678+
679
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, GEM, CF(0,0,-BELT.Size.X/2), CF(0, 0, 0))
680-
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(65)), Speed / Animation_Speed)
680+
681-
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-65)), Speed / Animation_Speed)
681+
682-
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.25) * ANGLES(RAD(90), RAD(0), RAD(65)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
682+
683-
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
683+
684-
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
684+
685-
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
685+
686
local GEM = CreatePart(3, Character, "Neon", 0, 0, "Lavender", "Gem", VT(0.1,0.25,0.25),false)
687-
	elseif WhichPose == "Turn key" then
687+
688-
		for i=0, Time, 0.1 / Animation_Speed do
688+
689-
			Swait()
689+
690-
			if Gyro ~= nil and Gyro ~= false then
690+
691-
				Gyro.cframe = CF(RootPart.Position,Tors.Position)
691+
692
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,0.7,0), CF(0, 0, 0))
693-
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(75)), Speed / Animation_Speed)
693+
694-
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-75)), Speed / Animation_Speed)
694+
695-
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.25) * ANGLES(RAD(90), RAD(0), RAD(75)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
695+
696-
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
696+
697-
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
697+
698-
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
698+
699
MakeForm(BELT,"Cyl")
700
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,0.35,0), CF(0, 0, 0))
701-
	PLAYMAINANIM = true
701+
702
BELT.Color = C3(15/255,15/255,15/255)
703
MakeForm(BELT,"Cyl")
704
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,-0.35,0), CF(0, 0, 0))
705
local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.3,0.5,1.3),false)
706
MakeForm(BELT,"Ball")
707
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,HAT2.Size.Y/2,0), CF(0, 0, 0))
708
Humanoid.DisplayDistanceType = "None"
709
local naeeym2 = IT("BillboardGui",Character)
710
naeeym2.AlwaysOnTop = true
711
naeeym2.Size = UDim2.new(5,35,2,15)
712
naeeym2.StudsOffset = Vector3.new(0,3,0)
713
naeeym2.MaxDistance = 75
714
naeeym2.Adornee = Character.Head
715
naeeym2.Name = "Name"
716
naeeym2.PlayerToHideFrom = Player
717
local tecks2 = IT("TextLabel",naeeym2)
718
tecks2.BackgroundTransparency = 1
719
tecks2.TextScaled = true
720
tecks2.BorderSizePixel = 0
721
tecks2.Text = "The Warden"
722
tecks2.Font = "Bodoni"
723
tecks2.TextSize = 30
724
tecks2.TextStrokeTransparency = 0.5
725
tecks2.TextColor3 = C3(0,0,0)
726
tecks2.TextStrokeColor3 = BRICKC"Lavender".Color
727
tecks2.Size = UDim2.new(1,0,0.5,0)
728
tecks2.Parent = naeeym2
729
local EYE = CreatePart(3, Character, "Neon", 0, 0, "Lilac", "FaceGradient", VT(0.15,0.15,0.15),false)
730
MakeForm(EYE,"Ball")
731
CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.22,-0.55), CF(0, 0, 0))
732
local EYE = CreatePart(3, Character, "Neon", 0, 0, "Lilac", "FaceGradient", VT(0.05,0.14,0.05),false)
733
EYE.Color = C3(0,0,0)
734
MakeForm(EYE,"Ball")
735
CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.22,-0.6), CF(0, 0, 0))
736
local top = Instance.new("Shirt")
737
top.ShirtTemplate = "rbxassetid://676428254"
738
top.Parent = Character
739
top.Name = "Cloth"
740
local bottom = Instance.new("Pants")
741
bottom.PantsTemplate = "rbxassetid://676428351"
742
bottom.Parent = Character
743
bottom.Name = "Cloth"
744
for _, c in pairs(Character:GetChildren()) do
745
	if c.ClassName == "Part" and c.Name ~= "FaceGradient" and c.Name ~= "Hat" and c.Name ~= "Gem" then
746
		c.Material = "Neon"
747
		if c:FindFirstChildOfClass("ParticleEmitter") then
748
			c:FindFirstChildOfClass("ParticleEmitter"):remove()
749
		end
750
		c.Color = C3(1,1,1)
751
		if c == Head then
752
			if c:FindFirstChild("face") then
753
				c.face:remove()
754
			end
755
		end
756
	elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.ClassName == "Hat" or c.Name == "Body Colors" then
757
		c:remove()
758
	elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
759
		c:remove()
760
	end
761
end
762
local BODY = {}
763
for _, c in pairs(Character:GetDescendants()) do
764
	if c:IsA("BasePart") and c.Name ~= "Handle" then
765
		if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
766
			c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
767
		end
768
		table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
769
	elseif c:IsA("JointInstance") then
770
		table.insert(BODY,{c,c.Parent,nil,nil,nil})
771
	end
772
end
773
for e = 1, #BODY do
774
	if BODY[e] ~= nil then
775
		local STUFF = BODY[e]
776
		local PART = STUFF[1]
777
		local PARENT = STUFF[2]
778
		local MATERIAL = STUFF[3]
779
		local COLOR = STUFF[4]
780
		local TRANSPARENCY = STUFF[5]
781
		if PART.ClassName == "Part" and PART ~= RootPart then
782
			PART.Material = MATERIAL
783
			PART.Color = COLOR
784
			PART.Transparency = TRANSPARENCY
785
		end
786
		PART.AncestryChanged:Connect(function()
787
			PART.Parent = PARENT
788
		end)
789
	end
790
end
791
function refit()
792
	Character.Parent = workspace
793
	for e = 1, #BODY do
794
		if BODY[e] ~= nil then
795
			local STUFF = BODY[e]
796
			local PART = STUFF[1]
797
			local PARENT = STUFF[2]
798
			local MATERIAL = STUFF[3]
799
			local COLOR = STUFF[4]
800
			local TRANSPARENCY = STUFF[5]
801
			if PART.ClassName == "Part" and PART ~= RootPart then
802
				PART.Material = MATERIAL
803
				PART.Color = COLOR
804
				PART.Transparency = TRANSPARENCY
805
			end
806
			if PART.Parent ~= PARENT then
807
				Humanoid:remove()
808
				PART.Parent = PARENT
809
				Humanoid = IT("Humanoid",Character)
810
			end
811
		end
812
	end
813
end
814
local SKILLTEXTCOLOR = BRICKC"Lavender".Color
815
local SKILLFONT = "Bodoni"
816
local SKILLTEXTSIZE = 7
817
818
Humanoid.Died:connect(function()
819
	refit()
820
end)
821
822
local SKILL1FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.23, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
823
local SKILL2FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.50, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
824
local SKILL3FRAME = CreateFrame(WEAPONGUI, 0.75, 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")
825
local SKILL4FRAME = CreateFrame(WEAPONGUI, 0.75, 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")
826
local SKILL5FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.365, 0, 0.70, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
827
828
local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Warden Zap", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 1")
829
local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Warden Thunder", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 2")
830
local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Inferno Ring", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 3")
831
local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Warden Wall", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 4")
832
local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Prison Key", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 5")
833
834
--//=================================\\
835
--||			DAMAGING
836
--\\=================================//
837
838
function ApplyAoE(POSITION,RANGE,FLING,BURN)
839
	local CHILDREN = workspace:GetDescendants()
840
	for index, CHILD in pairs(CHILDREN) do
841
		if CHILD.ClassName == "Model" and CHILD ~= Character then
842
			local HUM = CHILD:FindFirstChildOfClass("Humanoid")
843
			if HUM then
844
				local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
845
				if TORSO then
846
					if HUM.Health > 0 and (TORSO.Position - POSITION).Magnitude <= RANGE then
847
						CHILD:BreakJoints()
848
						if FLING ~= 0 then
849
							for _, c in pairs(CHILD:GetChildren()) do
850
								if c:IsA("BasePart") and c.Transparency == 0 then
851
									if BURN == true then
852
										Fire(c)
853
									end
854
									local bv = Instance.new("BodyVelocity") 
855
									bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
856
									bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
857
									bv.Parent = c
858
									Debris:AddItem(bv,0.05)
859
								end
860
							end
861
						end
862
					end
863
				end
864
			end
865
		end
866
	end
867
end
868
869
--//=================================\\
870
--||	ATTACK FUNCTIONS AND STUFF
871
--\\=================================//
872
873
function Warden_Zap()
874
	ATTACK = true
875
	Rooted = false
876
	local GYRO = IT("BodyGyro",RootPart)
877
	GYRO.D = 750
878
	GYRO.P = 20000
879
	GYRO.MaxTorque = VT(0,40000000,0)
880
	CreateSound(348663022,RightArm,1.5,2,false)
881
	Pose("Cast1",0.8,1,true,GYRO)
882
	local LightningTable = Lightning({Color = SKILLTEXTCOLOR, Start = RightArm.CFrame*CF(0,-1,0).p, End = Mouse.Hit.p, SegmentL = 2, Thickness = 0.2, DoesFade = true, Ignore = Character, MaxDist = 100, Branches = false})
883
	local Hitpos = LightningTable.End
884
	ApplyAoE(Hitpos,10,35)
885
	WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(1,1,1)*15, Transparency = 0, Transparency2 = 1, CFrame = CF(Hitpos)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Lavender".Color, SoundID = BOLTSOUNDS[MRANDOM(1,#BOLTSOUNDS)], SoundPitch = MRANDOM(8,12)/10, SoundVolume = 5})
886
	for i = 1, 4 do
887
		WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(0,45,0), Transparency = 0, Transparency2 = 1, CFrame = CF(Hitpos)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
888
	end
889
	Pose("Cast1",0.8,1,true)
890
	GYRO:remove()
891
	ATTACK = false
892
	Rooted = false
893
end
894
895
function Warden_Thunder()
896
	ATTACK = true
897
	Rooted = false
898
	local GYRO = IT("BodyGyro",RootPart)
899
	GYRO.D = 750
900
	GYRO.P = 20000
901
	GYRO.MaxTorque = VT(0,40000000,0)
902
	CreateSound(469345336,Torso,3,2,false)
903
	Pose("Cast2",1.5,2,true,GYRO)
904
	coroutine.resume(coroutine.create(function()
905
		local FRAME = RootPart.CFrame
906
		for i = 1, 25 do
907
			local POS = FRAME*CF(MRANDOM(-17,17),0,-i*15)
908
			local LightningTable = Lightning({Color = SKILLTEXTCOLOR, Start = POS*CF(0,85,0).p, End = POS*CF(0,-15,0).p, SegmentL = 3, Thickness = 0.4, DoesFade = true, Ignore = Character, MaxDist = 400, Branches = true})
909
			local Hitpos = LightningTable.End
910
			ApplyAoE(Hitpos,20,15)
911
			WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(1,1,1)*15, Transparency = 0, Transparency2 = 1, CFrame = CF(Hitpos)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Lavender".Color, SoundID = BOLTSOUNDS[MRANDOM(1,#BOLTSOUNDS)], SoundPitch = MRANDOM(8,12)/10, SoundVolume = 5})
912
			for i = 1, 4 do
913
				WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(0,75,0), Transparency = 0, Transparency2 = 1, CFrame = CF(Hitpos)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
914
			end
915
			wait(0.05)
916
		end
917
	end))
918
	Pose("Cast2",1.5,0.7,true)
919
	GYRO:remove()
920
	ATTACK = false
921
	Rooted = false
922
end
923
924
function Inferno_Ring()
925
	ATTACK = true
926
	Rooted = false
927
	local GYRO = IT("BodyGyro",RootPart)
928
	GYRO.D = 750
929
	GYRO.P = 20000
930
	GYRO.MaxTorque = VT(0,40000000,0)
931
	local FIRE = IT("Model",Effects)
932
	FIRE.Name = "Fire"
933
	local MAIN = CreatePart(3, FIRE, "Neon", 0, 1, "Lavender", "Center", VT(0,0,0))
934
	FIRE.PrimaryPart = MAIN
935
	local FIRES = {}
936
	for i = 1, 45 do
937
		local PRT = CreatePart(3, FIRE, "Neon", 0, 1, "Lavender", "RingPart", VT(3,3,3))
938
		PRT.CFrame = MAIN.CFrame*ANGLES(RAD(0),RAD((360/45)*i),RAD(0))*CF(0,0,20)
939
		local F = Fire(PRT)
940
		table.insert(FIRES,F)
941
	end
942
	repeat
943
		FIRE:SetPrimaryPartCFrame(CF(Mouse.Hit.p))
944
		Pose("Cast1",1.5,0.01,false,GYRO)
945
	until HOLD == true
946
	coroutine.resume(coroutine.create(function()
947
		for i = 1, 4 do
948
			ApplyAoE(MAIN.Position,21,-15,true)
949
			CreateSound(463598785,MAIN,3,1,false)
950
			for E = 1, #FIRES do
951
				if FIRES[E] ~= nil then
952
					FIRES[E].Acceleration = VT(0,300,0)
953
					FIRES[E].Lifetime=NumberRange.new(0.35,1.5)
954
				end
955
			end
956
			wait(0.3)
957
		end
958
		for E = 1, #FIRES do
959
			if FIRES[E] ~= nil then
960
				FIRES[E].Enabled = false
961
			end
962
		end
963
		Debris:AddItem(FIRE,5)
964
	end))
965
	CreateSound(215395388,RightArm,3,2,false)
966
	Pose("RightArmUp",1.5,0.5,true)
967
	GYRO:remove()
968
	ATTACK = false
969
	Rooted = false
970
end
971
972
function Warden_Wall()
973
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 8, Character)
974
	if HITFLOOR ~= nil then
975
		if HITFLOOR.Anchored == true then
976
			local WALL = HITFLOOR:Clone()
977
			WALL.Size = VT(45,45,5)
978
			WALL.Parent = Effects
979
			WALL.Name = "Wall"
980
			WALL.CFrame = RootPart.CFrame*CF(0,-65/2.1,-5)*ANGLES(RAD(-15),RAD(0),RAD(0))
981
			CreateSound(130972023,WALL,5,0.8,false)
982
			ATTACK = true
983
			Rooted = true
984
			local HIT = WALL.Touched:Connect(function(hit)
985
				if hit.Parent ~= Character then
986
					hit:BreakJoints()
987
				end
988
			end)
989
			coroutine.resume(coroutine.create(function()
990
				WACKYEFFECT({Time = 35, EffectType = "Box", Size = WALL.Size, Size2 = WALL.Size*2, Transparency = 0, Transparency2 = 1, CFrame = WALL.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
991
				for i = 1, 90 do
992
					Swait()
993
					WALL.CFrame = WALL.CFrame*CF(0,0.5,0)
994
				end
995
				HIT:disconnect()
996
				wait(5)
997
				for i = 1, 46 do
998
					Swait()
999
					WALL.CFrame = WALL.CFrame*CF(0,-1,0)
1000
				end
1001
				WALL:remove()
1002
			end))
1003
			Pose("RightArmUp",1.5,1.2,true)
1004
			ATTACK = false
1005
			Rooted = false
1006
		end
1007
	end
1008
end
1009
1010
function Prison_Key()
1011
	if Mouse.Target ~= nil then
1012
		if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
1013
			local HUM = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
1014
			local TORSO = HUM.Parent:FindFirstChild("Torso") or HUM.Parent:FindFirstChild("UpperTorso")
1015
			local GYRO = IT("BodyGyro",RootPart)
1016
			GYRO.D = 750
1017
			GYRO.P = 20000
1018
			GYRO.MaxTorque = VT(0,40000000,0)
1019
			local grav = Instance.new("BodyPosition",TORSO)
1020
			grav.D = 15
1021
			grav.P = 20000
1022
			grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
1023
			grav.position = TORSO.Position
1024
			local GYRO2 = IT("BodyGyro",TORSO)
1025
			GYRO2.D = 750
1026
			GYRO2.P = 20000
1027
			GYRO2.MaxTorque = VT(0,40000000,0)
1028
			GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
1029
			grav.Name = "Jail"
1030
			local LOCKPARTS = {}
1031
			ATTACK = true
1032
			Rooted = false
1033
			local LOCK = IT("Model",Effects)
1034
			LOCK.Name = "Lock"
1035
			local LOCK2 = IT("Model",LOCK)
1036
			LOCK2.Name = "Metal"
1037
			--CREATE LOCK--
1038
				local BASE = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 2.5, 1))
1039
				LOCK.PrimaryPart = BASE
1040
				BASE.CFrame = CF(TORSO.Position,RootPart.Position)*CF(0,0,-4)
1041
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 1, 3))
1042
				PRT.CFrame = BASE.CFrame*CF(0,-1.25,0)*ANGLES(RAD(90),RAD(0),RAD(0))
1043
				MakeForm(PRT,"Cyl")
1044
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(1, 1, 1))
1045
				PRT.Color = C3(0,0,0)
1046
				PRT.CFrame = BASE.CFrame*CF(0,0.3,-0.01)*ANGLES(RAD(90),RAD(0),RAD(0))
1047
				MakeForm(PRT,"Cyl")
1048
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(0.5, 1, 1))
1049
				PRT.Color = C3(0,0,0)
1050
				PRT.CFrame = BASE.CFrame*CF(0,-0.2,-0.01)
1051
				for i = 1, 45 do
1052
					local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
1053
					PRT.CFrame = BASE.CFrame*CF(0,2,0)*ANGLES(RAD(0),RAD(0),RAD(-90+(360/90*i)))*CF(0,1,0)
1054
				end
1055
				local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
1056
				PRT.CFrame = BASE.CFrame*CF(0,1.5,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0)
1057
				LOCK2.PrimaryPart = PRT
1058
			---------------
1059
			local CHILDREN = LOCK:GetDescendants()
1060
			for index, CHILD in pairs(CHILDREN) do
1061
				if CHILD:IsA("BasePart") then
1062
					CHILD.Transparency = 1
1063
				end
1064
			end
1065
			for i = 1, 75 do
1066
				LOCK:SetPrimaryPartCFrame(CF(TORSO.Position,RootPart.Position)*CF(0,0,-4))
1067
				Swait()
1068
				GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
1069
				GYRO.cframe = CF(RootPart.Position,TORSO.Position)
1070
				local CHILDREN = LOCK:GetDescendants()
1071
				for index, CHILD in pairs(CHILDREN) do
1072
					if CHILD:IsA("BasePart") then
1073
						CHILD.Transparency = CHILD.Transparency - 1/75
1074
					end
1075
				end
1076
			end
1077
			HUM.DisplayDistanceType = "None"
1078
			local KEY = IT("Model",Effects)
1079
			KEY.Name = "Key"
1080
			--CREATE KEY--
1081
				local KBASE = CreatePart(3, KEY, "Neon", 0, 0, "Lavender", "KeyBase", VT(0.1, 1, 0.1),false)
1082
				KEY.PrimaryPart = KBASE
1083
				KBASE.CFrame = RightArm.CFrame*CF(0,-2.1,0)*ANGLES(RAD(0),RAD(90),RAD(0))
1084
				local WLD = weldBetween(RightArm,KBASE)
1085
				for i = 1, 45 do
1086
					local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Lavender", "Key", VT(0.1, 0.1, 0.1),false)
1087
					PRT.CFrame = KBASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD((360/45*i)))*CF(0,0.25,0)
1088
					weldBetween(KBASE,PRT)
1089
				end
1090
				local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Lavender", "Key", VT(0.3, 0.1, 0.1),false)
1091
				PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.45,0)
1092
				weldBetween(KBASE,PRT)
1093
				local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Lavender", "Key", VT(0.3, 0.1, 0.1),false)
1094
				PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.25,0)
1095
				weldBetween(KBASE,PRT)
1096
			--------------
1097
			Rooted = true
1098
			Pose("Prepare key",1.5,1.2,false,GYRO,TORSO)
1099
			coroutine.resume(coroutine.create(function()
1100
				for i = 1, 10 do
1101
					Swait()
1102
					GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
1103
					GYRO.cframe = CF(RootPart.Position,TORSO.Position)
1104
				end
1105
				CreateSound(1149318312,BASE,5,1,false)
1106
				CreateSound(160772554,BASE,3,1,false)
1107
				LOCK2:SetPrimaryPartCFrame(BASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0))
1108
				for i = 1, 4 do
1109
					WACKYEFFECT({Time = 35, EffectType = "Crystal", Size = VT(1,1,1), Size2 = VT(0,15,0), Transparency = 0, Transparency2 = 1, CFrame = BASE.CFrame*CF(1,1.45,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
1110
				end
1111
				WACKYEFFECT({Time = 35, EffectType = "Sphere", Size = VT(0,0,0), Size2 = VT(1,1,1)*25, Transparency = 0, Transparency2 = 1, CFrame = TORSO.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = MRANDOM(8,12)/10, SoundVolume = 5})
1112
				wait(1)
1113
				TORSO.Parent.Parent = LOCK
1114
				for i = 1, 75 do
1115
					Swait()
1116
					local CHILDREN = KEY:GetDescendants()
1117
					for index, CHILD in pairs(CHILDREN) do
1118
						if CHILD:IsA("BasePart") then
1119
							CHILD.Transparency = i/25
1120
						end
1121
					end
1122
					local CHILDREN = LOCK:GetDescendants()
1123
					for index, CHILD in pairs(CHILDREN) do
1124
						if CHILD:IsA("BasePart") and CHILD.Name ~= "HumanoidRootPart" then
1125
							CHILD.Transparency = CHILD.Transparency + 1/75
1126
						elseif CHILD.ClassName == "Decal" then
1127
							CHILD.Transparency = CHILD.Transparency + 1/75
1128
						end
1129
					end
1130
				end
1131
				TORSO.Parent:ClearAllChildren()
1132
				KEY:remove()
1133
				LOCK:remove()
1134
			end))
1135
			Pose("Turn key",0.8,1.2,false,GYRO,TORSO)
1136
			GYRO:remove()
1137
			ATTACK = false
1138
			Rooted = false
1139
		end
1140
	end
1141
end
1142
1143
function Hat()
1144
	ATTACK = true
1145
	Rooted = false
1146
	Pose("Taunt",0.4,1.2,false)
1147
	ATTACK = false
1148
	Rooted = false
1149
end
1150
1151
--//=================================\\
1152
--||	  ASSIGN THINGS TO KEYS
1153
--\\=================================//
1154
1155
function MouseDown(Mouse)
1156
	HOLD = true
1157
	if ATTACK == false then
1158
	end
1159
end
1160
1161
function MouseUp(Mouse)
1162
HOLD = false
1163
end
1164
1165
function KeyDown(Key)
1166
	KEYHOLD = true
1167
	if Key == "z" and ATTACK == false then
1168
		Warden_Zap()
1169
	end
1170
1171
	if Key == "b" and ATTACK == false then
1172
		Warden_Thunder()
1173
	end
1174
1175
	if Key == "c" and ATTACK == false then
1176
		Inferno_Ring()
1177
	end
1178
1179
	if Key == "v" and ATTACK == false then
1180
		Warden_Wall()
1181
	end
1182
1183
	if Key == "x" and ATTACK == false then
1184
		Prison_Key()
1185
	end
1186
1187
	if Key == "t" and ATTACK == false then
1188
		Hat()
1189
	end
1190
end
1191
1192
function KeyUp(Key)
1193
	KEYHOLD = false
1194
end
1195
1196
	Mouse.Button1Down:connect(function(NEWKEY)
1197
		MouseDown(NEWKEY)
1198
	end)
1199
	Mouse.Button1Up:connect(function(NEWKEY)
1200
		MouseUp(NEWKEY)
1201
	end)
1202
	Mouse.KeyDown:connect(function(NEWKEY)
1203
		KeyDown(NEWKEY)
1204
	end)
1205
	Mouse.KeyUp:connect(function(NEWKEY)
1206
		KeyUp(NEWKEY)
1207
	end)
1208
1209
--//=================================\\
1210
--\\=================================//
1211
1212
1213
function unanchor()
1214
	if UNANCHOR == true then
1215
		g = Character:GetChildren()
1216
		for i = 1, #g do
1217
			if g[i].ClassName == "Part" then
1218
				g[i].Anchored = false
1219
			end
1220
		end
1221
	end
1222
end
1223
1224
1225
--//=================================\\
1226
--||	WRAP THE WHOLE SCRIPT UP
1227
--\\=================================//
1228
1229
Humanoid.Changed:connect(function(Jump)
1230
	if Jump == "Jump" and (Disable_Jump == true) then
1231
		Humanoid.Jump = false
1232
	end
1233
end)
1234
1235
while true do
1236
	Swait()
1237
	script.Parent = WEAPONGUI
1238
	Humanoid.Parent = Character
1239
	if Humanoid then
1240
		local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
1241
		IDLEANIMATION:Play()
1242
	end
1243
	if ANIMATE.Parent == Character then
1244
		ANIMATE:Destroy()
1245
	end
1246
	SINE = SINE + CHANGE
1247
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
1248
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
1249
	Humanoid.HipHeight = 1
1250
	Humanoid.Name = "Warden"
1251
	Humanoid.PlatformStand = false
1252
	if PLAYMAINANIM == true then
1253
		if TORSOVELOCITY < 1 then
1254
			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)
1255
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1256
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1257
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1258
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), 0.15 / Animation_Speed)
1259
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1260
		elseif TORSOVELOCITY > 1 then
1261
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1262
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(10 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1263
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-35), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1264
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-35), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1265
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-20)), 0.15 / Animation_Speed)
1266
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(10)), 0.15 / Animation_Speed)
1267
		end
1268
	end
1269
	unanchor()
1270
	Humanoid.MaxHealth = "inf"
1271
	Humanoid.Health = "inf"
1272
	if Rooted == false then
1273
		Disable_Jump = false
1274
		Humanoid.WalkSpeed = Speed
1275
	elseif Rooted == true then
1276
		Disable_Jump = true
1277
		Humanoid.WalkSpeed = 0
1278
	end
1279
	for _, c in pairs(Character:GetChildren()) do
1280
		if c.ClassName == "Part" and c.Name ~= "Eye" then
1281
			c.Material = "Neon"
1282
			if c:FindFirstChildOfClass("ParticleEmitter") then
1283
				c:FindFirstChildOfClass("ParticleEmitter"):remove()
1284
			end
1285
			c.Color = C3(1,1,1)
1286
			if c == Head then
1287
				if c:FindFirstChild("face") then
1288
					c.face:remove()
1289
				end
1290
			end
1291
		elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.ClassName == "Hat" or c.Name == "Body Colors" then
1292
			c:remove()
1293
		elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
1294
			c:remove()
1295
		end
1296
	end
1297
	sick.SoundId = "rbxassetid://1494340971"
1298
	sick.Looped = true
1299
	sick.Pitch = 1
1300
	sick.Volume = 3
1301
	sick:Resume()
1302
	sick.Parent = Torso
1303
	refit()
1304
	if Head:FindFirstChildOfClass("Sound") then
1305
		Head:FindFirstChildOfClass("Sound"):remove()
1306
	end
1307
end
1308
1309
--//=================================\\
1310
--\\=================================//
1311
1312
1313
1314
1315
1316
--//====================================================\\--
1317
--||			  		 END OF SCRIPT
1318
--\\====================================================//--