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