View difference between Paste ID: umjxWfG7 and 3b2mLyVR
SHOW: | | - or go back to the newest paste.
1
--//====================================================\\--
2
--||			   CREATED BY CARL YT
3
--\\====================================================//--
4
5
wait(0.2)
6
7
 if game:GetService("RunService"):IsClient()then error("say h/ not hl/ ya dummy")end;print("get rekt");InternalData = {}
8
do
9
    script.Parent = owner.Character
10
    local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
11
    local function NewFakeEvent()
12
        local Bind = Instance.new("BindableEvent")
13
        local Fake;Fake = {Connections = {},
14
        fakeEvent=true;
15
        Connect=function(self,Func)
16
            Bind.Event:connect(Func)
17
            self.Connections[Bind] = true
18
            return setmetatable({Connected = true},{
19
            __index = function (self,Index)
20
                if Index:lower() == "disconnect" then
21
                    return function() Fake.Connections[Bind] = false;self.Connected = false end
22
                end
23
                return Fake[Index]
24
            end;
25
            __tostring = function() return "Connection" end;
26
        })
27
        end}
28
        Fake.connect = Fake.Connect;return Fake;
29
    end
30
    local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
31
    local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
32
    local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
33
        self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
34
    end};ContextActionService.UnBindAction = ContextActionService.BindAction
35
    local function TriggerEvent(self,Event,...)
36
        local Trigger = Mouse[Event]
37
        if Trigger and Trigger.fakeEvent and Trigger.Connections then
38
            for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
39
        end
40
    end
41
    Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
42
    Event.OnServerEvent:Connect(function(FiredBy,Input)
43
        if FiredBy.Name ~= owner.Name then return end
44
        if Input.MouseEvent then
45
            Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
46
        else
47
            local Begin = Input.UserInputState == Enum.UserInputState.Begin
48
            if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
49
            for _,Action in pairs(ContextActionService.Actions) do
50
                for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
51
            end
52
            Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
53
            UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
54
        end
55
    end)
56
    InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
57
    Event.Parent = NLS([[
58
        local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
59
        local Input = function(Input,gameProcessedEvent)
60
            if gameProcessedEvent then return end
61
            Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
62
        end
63
        UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
64
        local Hit,Target
65
        while wait(1/30) do
66
            if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
67
                Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
68
            end
69
        end
70
    ]],owner.Character)
71
end
72
RealGame = game;game = setmetatable({},{
73
    __index = function (self,Index)
74
        local Sandbox = function (Thing)
75
            if Thing:IsA("Player") then
76
                local RealPlayer = Thing
77
                return setmetatable({},{
78
                    __index = function (self,Index)
79
                        local Type = type(RealPlayer[Index])
80
                        if Type == "function" then
81
                            if Index:lower() == "getmouse" or Index:lower() == "mouse" then
82
                                return function (self)return InternalData["Mouse"] end
83
                            end
84
                            return function (self,...)return RealPlayer[Index](RealPlayer,...) end
85
                        end
86
                        return RealPlayer[Index]
87
                    end;
88
                    __tostring = function(self) return RealPlayer.Name end
89
                })
90
            end
91
        end
92
        if RealGame[Index] then
93
            local Type = type(RealGame[Index])
94
            if Type == "function" then
95
                if Index:lower() == "getservice" or Index:lower() == "service" then
96
                    return function (self,Service)
97
                        local FakeServices = {
98
                            ["players"] = function()
99
                                return setmetatable({},{
100
                                    __index = function (self2,Index2)
101
                                        local RealService = RealGame:GetService(Service)
102
                                        local Type2 = type(Index2)
103
                                        if Type2 == "function" then
104
                                            return function (self,...) return RealService[Index2](RealService,...)end
105
                                        else
106
                                            if Index2:lower() == "localplayer" then return Sandbox(owner) end
107
                                            return RealService[Index2]
108
                                        end
109
                                    end;
110
                                    __tostring = function(self) return RealGame:GetService(Service).Name end
111
                                })
112
                            end;
113
                            ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
114
                            ["userinputservice"] = function() return InternalData["UserInputService"] end;
115
                            ["runservice"] = function()
116
                                return setmetatable({},{
117
                                    __index = function(self2,Index2)
118
                                        local RealService = RealGame:GetService(Service)
119
                                        local Type2 = type(Index2)
120
                                        if Type2 == "function" then
121
                                            return function (self,...) return RealService[Index2](RealService,...) end
122
                                        else
123
                                            local RunServices = {
124
                                                ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
125
                                                ["renderstepped"] = function() return RealService["Stepped"] end
126
                                            }
127
                                            if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
128
                                            return RealService[Index2]
129
                                        end
130
                                    end
131
                                })
132
                            end
133
                        }
134
                        if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
135
                        return RealGame:GetService(Service)
136
                    end
137
                end
138
                return function (self,...) return RealGame[Index](RealGame,...) end
139
            else
140
                if game:GetService(Index) then return game:GetService(Index) end
141
                return RealGame[Index]
142
            end
143
        end
144
        return nil
145
    end
146
});Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("running the script noob")
147
148
Player = game:GetService("Players").LocalPlayer
149
PlayerGui = Player.PlayerGui
150
Cam = workspace.CurrentCamera
151
Backpack = Player.Backpack
152
Character = Player.Character
153
Humanoid = Character.Humanoid
154
Mouse = Player:GetMouse()
155
RootPart = Character["HumanoidRootPart"]
156
Torso = Character["Torso"]
157
Head = Character["Head"]
158
RightArm = Character["Right Arm"]
159
LeftArm = Character["Left Arm"]
160
RightLeg = Character["Right Leg"]
161
LeftLeg = Character["Left Leg"]
162
RootJoint = RootPart["RootJoint"]
163
Neck = Torso["Neck"]
164
RightShoulder = Torso["Right Shoulder"]
165
LeftShoulder = Torso["Left Shoulder"]
166
RightHip = Torso["Right Hip"]
167
LeftHip = Torso["Left Hip"]
168
local sick = Instance.new("Sound",Character)
169
sick.SoundId = "rbxassetid://749590008"
170
sick.Looped = true
171
sick.Pitch = 1
172
sick.Volume = 1
173
sick:Play()
174
175
IT = Instance.new
176
CF = CFrame.new
177
VT = Vector3.new
178
RAD = math.rad
179
C3 = Color3.new
180
UD2 = UDim2.new
181
BRICKC = BrickColor.new
182
ANGLES = CFrame.Angles
183
EULER = CFrame.fromEulerAnglesXYZ
184
COS = math.cos
185
ACOS = math.acos
186
SIN = math.sin
187
ASIN = math.asin
188
ABS = math.abs
189
MRANDOM = math.random
190
FLOOR = math.floor
191
192
--//=================================\\
193
--|| 	      USEFUL VALUES
194
--\\=================================//
195
196
Animation_Speed = 3
197
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
198
local Speed = 25
199
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
200
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
201
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
202
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
203
local DAMAGEMULTIPLIER = 1
204
local ANIM = "Idle"
205
local ATTACK = false
206
local EQUIPPED = false
207
local HOLD = false
208
local COMBO = 1
209
local Rooted = false
210
local SINE = 0
211
local KEYHOLD = false
212
local CHANGE = 2 / Animation_Speed
213
local WALKINGANIM = false
214
local VALUE1 = false
215
local VALUE2 = false
216
local ROBLOXIDLEANIMATION = IT("Animation")
217
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
218
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=265082452"
219
--ROBLOXIDLEANIMATION.Parent = Humanoid
220
local WEAPONGUI = IT("ScreenGui", PlayerGui)
221
WEAPONGUI.Name = "Weapon GUI"
222
local Effects = IT("Folder", Character)
223
Effects.Name = "Effects"
224
local ANIMATOR = Humanoid.Animator
225
local ANIMATE = Character.Animate
226
local UNANCHOR = true
227
local PLAYMAINANIM = true
228
local BOLTSOUNDS = {168586621,168586586,178452241}
229
230
--//=================================\\
231
--\\=================================//
232
233
234
--//=================================\\
235
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
236
--\\=================================//
237
238
ArtificialHB = Instance.new("BindableEvent", script)
239
ArtificialHB.Name = "ArtificialHB"
240
241
script:WaitForChild("ArtificialHB")
242
243
frame = Frame_Speed
244
tf = 0
245
allowframeloss = false
246
tossremainder = false
247
lastframe = tick()
248
script.ArtificialHB:Fire()
249
250
game:GetService("RunService").Heartbeat:connect(function(s, p)
251
	tf = tf + s
252
	if tf >= frame then
253
		if allowframeloss then
254
			script.ArtificialHB:Fire()
255
			lastframe = tick()
256
		else
257
			for i = 1, math.floor(tf / frame) do
258
				script.ArtificialHB:Fire()
259
			end
260
		lastframe = tick()
261
		end
262
		if tossremainder then
263
			tf = 0
264
		else
265
			tf = tf - frame * math.floor(tf / frame)
266
		end
267
	end
268
end)
269
270
--//=================================\\
271
--\\=================================//
272
273
--//=================================\\
274
--|| 	      SOME FUNCTIONS
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("Lime green").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"Lime green".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"Lime green".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"Lime green".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"Lime green".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, "Lime green", "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, "Lime green", "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, "Lime green", "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, "Lime green", "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, "Lime green", "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, "Lime green", "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, "Lime green", "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, "Lime green", "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, "Lime green", "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, "Lime green", "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, "Lime green", "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, "Lime green", "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, "Lime green", "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 Goku 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"Lime green".Color
902
tecks2.Size = UDim2.new(1,0,0.5,0)
903
tecks2.Parent = naeeym2
904
local EYE = CreatePart(3, Character, "Neon", 0, 0, "Lime green", "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, "Lime green", "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, "Lime green", "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, "Lime green", "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://1133065064"
919
top.Parent = Character
920
top.Name = "Cloth"
921
local bottom = Instance.new("Pants")
922
bottom.PantsTemplate = "rbxassetid://1133066424"
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"Lime green".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] Goku Warden Zap", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 1")
1010
local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Goku Warden Thunder", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 2")
1011
local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Circle Field", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 3")
1012
local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Goku Warden Wall", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 4")
1013
local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Jail Key", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 5")
1014
1015
--//=================================\\
1016
--||			DAMAGING
1017
--\\=================================//
1018
1019
function ApplyAoE(POSITION,RANGE,FLING,BURN)
1020
	local CHILDREN = workspace:GetDescendants()
1021
	for index, CHILD in pairs(CHILDREN) do
1022
		if CHILD.ClassName == "Model" and CHILD ~= Character then
1023
			local HUM = CHILD:FindFirstChildOfClass("Humanoid")
1024
			if HUM then
1025
				local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
1026
				if TORSO then
1027
					if HUM.Health > 0 and (TORSO.Position - POSITION).Magnitude <= RANGE then
1028
						CHILD:BreakJoints()
1029
						if FLING ~= 0 then
1030
							for _, c in pairs(CHILD:GetChildren()) do
1031
								if c:IsA("BasePart") and c.Transparency == 0 then
1032
									if BURN == true then
1033
										Fire(c)
1034
									end
1035
									local bv = Instance.new("BodyVelocity") 
1036
									bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
1037
									bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
1038
									bv.Parent = c
1039
									Debris:AddItem(bv,0.05)
1040
								end
1041
							end
1042
						end
1043
					end
1044
				end
1045
			end
1046
		end
1047
	end
1048
end
1049
1050
--//=================================\\
1051
--||	ATTACK FUNCTIONS AND STUFF
1052
--\\=================================//
1053
1054
function Warden_Zap()
1055
	ATTACK = true
1056
	Rooted = false
1057
	local GYRO = IT("BodyGyro",RootPart)
1058
	GYRO.D = 750
1059
	GYRO.P = 20000
1060
	GYRO.MaxTorque = VT(0,40000000,0)
1061
	CreateSound(348663022,RightArm,1.5,2,false)
1062
	Pose("Cast1",0.8,1,true,GYRO)
1063
	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})
1064
	local Hitpos = LightningTable.End
1065
	ApplyAoE(Hitpos,10,35)
1066
	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"Lime green".Color, SoundID = BOLTSOUNDS[MRANDOM(1,#BOLTSOUNDS)], SoundPitch = MRANDOM(8,12)/10, SoundVolume = 5})
1067
	for i = 1, 4 do
1068
		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"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
1069
	end
1070
	Pose("Cast1",0.8,1,true)
1071
	GYRO:remove()
1072
	ATTACK = false
1073
	Rooted = false
1074
end
1075
1076
function Warden_Thunder()
1077
	ATTACK = true
1078
	Rooted = false
1079
	local GYRO = IT("BodyGyro",RootPart)
1080
	GYRO.D = 750
1081
	GYRO.P = 20000
1082
	GYRO.MaxTorque = VT(0,40000000,0)
1083
	CreateSound(469345336,Torso,3,2,false)
1084
	Pose("Cast2",1.5,2,true,GYRO)
1085
	coroutine.resume(coroutine.create(function()
1086
		local FRAME = RootPart.CFrame
1087
		for i = 1, 25 do
1088
			local POS = FRAME*CF(MRANDOM(-17,17),0,-i*15)
1089
			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})
1090
			local Hitpos = LightningTable.End
1091
			ApplyAoE(Hitpos,20,15)
1092
			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"Lime green".Color, SoundID = BOLTSOUNDS[MRANDOM(1,#BOLTSOUNDS)], SoundPitch = MRANDOM(8,12)/10, SoundVolume = 5})
1093
			for i = 1, 4 do
1094
				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"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
1095
			end
1096
			wait(0.05)
1097
		end
1098
	end))
1099
	Pose("Cast2",1.5,0.7,true)
1100
	GYRO:remove()
1101
	ATTACK = false
1102
	Rooted = false
1103
end
1104
1105
function Inferno_Ring()
1106
	ATTACK = true
1107
	Rooted = false
1108
	local GYRO = IT("BodyGyro",RootPart)
1109
	GYRO.D = 750
1110
	GYRO.P = 20000
1111
	GYRO.MaxTorque = VT(0,40000000,0)
1112
	local FIRE = IT("Model",Effects)
1113
	FIRE.Name = "Fire"
1114
	local MAIN = CreatePart(3, FIRE, "Neon", 0, 1, "Lime green", "Center", VT(0,0,0))
1115
	FIRE.PrimaryPart = MAIN
1116
	local FIRES = {}
1117
	for i = 1, 45 do
1118
		local PRT = CreatePart(3, FIRE, "Neon", 0, 1, "Lime green", "RingPart", VT(3,3,3))
1119
		PRT.CFrame = MAIN.CFrame*ANGLES(RAD(0),RAD((360/45)*i),RAD(0))*CF(0,0,20)
1120
		local F = Fire(PRT)
1121
		table.insert(FIRES,F)
1122
	end
1123
	repeat
1124
		FIRE:SetPrimaryPartCFrame(CF(Mouse.Hit.p))
1125
		Pose("Cast1",1.5,0.01,false,GYRO)
1126
	until HOLD == true
1127
	coroutine.resume(coroutine.create(function()
1128
		for i = 1, 4 do
1129
			ApplyAoE(MAIN.Position,21,-15,true)
1130
			CreateSound(463598785,MAIN,3,1,false)
1131
			for E = 1, #FIRES do
1132
				if FIRES[E] ~= nil then
1133
					FIRES[E].Acceleration = VT(0,300,0)
1134
					FIRES[E].Lifetime=NumberRange.new(0.35,1.5)
1135
				end
1136
			end
1137
			wait(0.3)
1138
		end
1139
		for E = 1, #FIRES do
1140
			if FIRES[E] ~= nil then
1141
				FIRES[E].Enabled = false
1142
			end
1143
		end
1144
		Debris:AddItem(FIRE,5)
1145
	end))
1146
	CreateSound(215395388,RightArm,3,2,false)
1147
	Pose("RightArmUp",1.5,0.5,true)
1148
	GYRO:remove()
1149
	ATTACK = false
1150
	Rooted = false
1151
end
1152
1153
function Warden_Wall()
1154
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 8, Character)
1155
	if HITFLOOR ~= nil then
1156
		if HITFLOOR.Anchored == true then
1157
			local WALL = HITFLOOR:Clone()
1158
			WALL.Size = VT(45,45,5)
1159
			WALL.Parent = Effects
1160
			WALL.Name = "Wall"
1161
			WALL.CFrame = RootPart.CFrame*CF(0,-65/2.1,-5)*ANGLES(RAD(-15),RAD(0),RAD(0))
1162
			CreateSound(130972023,WALL,5,0.8,false)
1163
			ATTACK = true
1164
			Rooted = true
1165
			local HIT = WALL.Touched:Connect(function(hit)
1166
				if hit.Parent ~= Character then
1167
					hit:BreakJoints()
1168
				end
1169
			end)
1170
			coroutine.resume(coroutine.create(function()
1171
				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"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
1172
				for i = 1, 90 do
1173
					Swait()
1174
					WALL.CFrame = WALL.CFrame*CF(0,0.5,0)
1175
				end
1176
				HIT:disconnect()
1177
				wait(5)
1178
				for i = 1, 46 do
1179
					Swait()
1180
					WALL.CFrame = WALL.CFrame*CF(0,-1,0)
1181
				end
1182
				WALL:remove()
1183
			end))
1184
			Pose("RightArmUp",1.5,1.2,true)
1185
			ATTACK = false
1186
			Rooted = false
1187
		end
1188
	end
1189
end
1190
1191
function Prison_Key()
1192
	if Mouse.Target ~= nil then
1193
		if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
1194
			local HUM = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
1195
			local TORSO = HUM.Parent:FindFirstChild("Torso") or HUM.Parent:FindFirstChild("UpperTorso")
1196
			local GYRO = IT("BodyGyro",RootPart)
1197
			GYRO.D = 750
1198
			GYRO.P = 20000
1199
			GYRO.MaxTorque = VT(0,40000000,0)
1200
			local grav = Instance.new("BodyPosition",TORSO)
1201
			grav.D = 15
1202
			grav.P = 20000
1203
			grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
1204
			grav.position = TORSO.Position
1205
			local GYRO2 = IT("BodyGyro",TORSO)
1206
			GYRO2.D = 750
1207
			GYRO2.P = 20000
1208
			GYRO2.MaxTorque = VT(0,40000000,0)
1209
			GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
1210
			grav.Name = "Jail"
1211
			local LOCKPARTS = {}
1212
			ATTACK = true
1213
			Rooted = false
1214
			local LOCK = IT("Model",Effects)
1215
			LOCK.Name = "Lock"
1216
			local LOCK2 = IT("Model",LOCK)
1217
			LOCK2.Name = "Metal"
1218
			--CREATE LOCK--
1219
				local BASE = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 2.5, 1))
1220
				LOCK.PrimaryPart = BASE
1221
				BASE.CFrame = CF(TORSO.Position,RootPart.Position)*CF(0,0,-4)
1222
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 1, 3))
1223
				PRT.CFrame = BASE.CFrame*CF(0,-1.25,0)*ANGLES(RAD(90),RAD(0),RAD(0))
1224
				MakeForm(PRT,"Cyl")
1225
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(1, 1, 1))
1226
				PRT.Color = C3(0,0,0)
1227
				PRT.CFrame = BASE.CFrame*CF(0,0.3,-0.01)*ANGLES(RAD(90),RAD(0),RAD(0))
1228
				MakeForm(PRT,"Cyl")
1229
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(0.5, 1, 1))
1230
				PRT.Color = C3(0,0,0)
1231
				PRT.CFrame = BASE.CFrame*CF(0,-0.2,-0.01)
1232
				for i = 1, 45 do
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,2,0)*ANGLES(RAD(0),RAD(0),RAD(-90+(360/90*i)))*CF(0,1,0)
1235
				end
1236
				local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
1237
				PRT.CFrame = BASE.CFrame*CF(0,1.5,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0)
1238
				LOCK2.PrimaryPart = PRT
1239
			---------------
1240
			local CHILDREN = LOCK:GetDescendants()
1241
			for index, CHILD in pairs(CHILDREN) do
1242
				if CHILD:IsA("BasePart") then
1243
					CHILD.Transparency = 1
1244
				end
1245
			end
1246
			for i = 1, 75 do
1247
				LOCK:SetPrimaryPartCFrame(CF(TORSO.Position,RootPart.Position)*CF(0,0,-4))
1248
				Swait()
1249
				GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
1250
				GYRO.cframe = CF(RootPart.Position,TORSO.Position)
1251
				local CHILDREN = LOCK:GetDescendants()
1252
				for index, CHILD in pairs(CHILDREN) do
1253
					if CHILD:IsA("BasePart") then
1254
						CHILD.Transparency = CHILD.Transparency - 1/75
1255
					end
1256
				end
1257
			end
1258
			HUM.DisplayDistanceType = "None"
1259
			local KEY = IT("Model",Effects)
1260
			KEY.Name = "Key"
1261
			--CREATE KEY--
1262
				local KBASE = CreatePart(3, KEY, "Neon", 0, 0, "Lime green", "KeyBase", VT(0.1, 1, 0.1),false)
1263
				KEY.PrimaryPart = KBASE
1264
				KBASE.CFrame = RightArm.CFrame*CF(0,-2.1,0)*ANGLES(RAD(0),RAD(90),RAD(0))
1265
				local WLD = weldBetween(RightArm,KBASE)
1266
				for i = 1, 45 do
1267
					local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Lime green", "Key", VT(0.1, 0.1, 0.1),false)
1268
					PRT.CFrame = KBASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD((360/45*i)))*CF(0,0.25,0)
1269
					weldBetween(KBASE,PRT)
1270
				end
1271
				local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Lime green", "Key", VT(0.3, 0.1, 0.1),false)
1272
				PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.45,0)
1273
				weldBetween(KBASE,PRT)
1274
				local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Lime green", "Key", VT(0.3, 0.1, 0.1),false)
1275
				PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.25,0)
1276
				weldBetween(KBASE,PRT)
1277
			--------------
1278
			Rooted = true
1279
			Pose("Prepare key",1.5,1.2,false,GYRO,TORSO)
1280
			coroutine.resume(coroutine.create(function()
1281
				for i = 1, 10 do
1282
					Swait()
1283
					GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
1284
					GYRO.cframe = CF(RootPart.Position,TORSO.Position)
1285
				end
1286
				CreateSound(1149318312,BASE,5,1,false)
1287
				CreateSound(160772554,BASE,3,1,false)
1288
				LOCK2:SetPrimaryPartCFrame(BASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0))
1289
				for i = 1, 4 do
1290
					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"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
1291
				end
1292
				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"Lime green".Color, SoundID = nil, SoundPitch = MRANDOM(8,12)/10, SoundVolume = 5})
1293
				wait(1)
1294
				TORSO.Parent.Parent = LOCK
1295
				for i = 1, 75 do
1296
					Swait()
1297
					local CHILDREN = KEY:GetDescendants()
1298
					for index, CHILD in pairs(CHILDREN) do
1299
						if CHILD:IsA("BasePart") then
1300
							CHILD.Transparency = i/25
1301
						end
1302
					end
1303
					local CHILDREN = LOCK:GetDescendants()
1304
					for index, CHILD in pairs(CHILDREN) do
1305
						if CHILD:IsA("BasePart") and CHILD.Name ~= "HumanoidRootPart" then
1306
							CHILD.Transparency = CHILD.Transparency + 1/75
1307
						elseif CHILD.ClassName == "Decal" then
1308
							CHILD.Transparency = CHILD.Transparency + 1/75
1309
						end
1310
					end
1311
				end
1312
				TORSO.Parent:ClearAllChildren()
1313
				KEY:remove()
1314
				LOCK:remove()
1315
			end))
1316
			Pose("Turn key",0.8,1.2,false,GYRO,TORSO)
1317
			GYRO:remove()
1318
			ATTACK = false
1319
			Rooted = false
1320
		end
1321
	end
1322
end
1323
1324
function Hat()
1325
	ATTACK = true
1326
	Rooted = false
1327
	Pose("Taunt",0.4,1.2,false)
1328
	ATTACK = false
1329
	Rooted = false
1330
end
1331
1332
--//=================================\\
1333
--||	  ASSIGN THINGS TO KEYS
1334
--\\=================================//
1335
1336
function MouseDown(Mouse)
1337
	HOLD = true
1338
	if ATTACK == false then
1339
	end
1340
end
1341
1342
function MouseUp(Mouse)
1343
HOLD = false
1344
end
1345
1346
function KeyDown(Key)
1347
	KEYHOLD = true
1348
	if Key == "z" and ATTACK == false then
1349
		Warden_Zap()
1350
	end
1351
1352
	if Key == "b" and ATTACK == false then
1353
		Warden_Thunder()
1354
	end
1355
1356
	if Key == "c" and ATTACK == false then
1357
		Inferno_Ring()
1358
	end
1359
1360
	if Key == "v" and ATTACK == false then
1361
		Warden_Wall()
1362
	end
1363
1364
	if Key == "x" and ATTACK == false then
1365
		Prison_Key()
1366
	end
1367
1368
	if Key == "t" and ATTACK == false then
1369
		Hat()
1370
	end
1371
end
1372
1373
function KeyUp(Key)
1374
	KEYHOLD = false
1375
end
1376
1377
	Mouse.Button1Down:connect(function(NEWKEY)
1378
		MouseDown(NEWKEY)
1379
	end)
1380
	Mouse.Button1Up:connect(function(NEWKEY)
1381
		MouseUp(NEWKEY)
1382
	end)
1383
	Mouse.KeyDown:connect(function(NEWKEY)
1384
		KeyDown(NEWKEY)
1385
	end)
1386
	Mouse.KeyUp:connect(function(NEWKEY)
1387
		KeyUp(NEWKEY)
1388
	end)
1389
1390
--//=================================\\
1391
--\\=================================//
1392
1393
1394
function unanchor()
1395
	if UNANCHOR == true then
1396
		g = Character:GetChildren()
1397
		for i = 1, #g do
1398
			if g[i].ClassName == "Part" then
1399
				g[i].Anchored = false
1400
			end
1401
		end
1402
	end
1403
end
1404
1405
1406
--//=================================\\
1407
--||	WRAP THE WHOLE SCRIPT UP
1408
--\\=================================//
1409
1410
Humanoid.Changed:connect(function(Jump)
1411
	if Jump == "Jump" and (Disable_Jump == true) then
1412
		Humanoid.Jump = false
1413
	end
1414
end)
1415
1416
while true do
1417
	Swait()
1418
	script.Parent = WEAPONGUI
1419
	Humanoid.Parent = Character
1420
	if Humanoid then
1421
		local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
1422
		IDLEANIMATION:Play()
1423
	end
1424
	if ANIMATE.Parent == Character then
1425
		ANIMATE:Destroy()
1426
	end
1427
	SINE = SINE + CHANGE
1428
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
1429
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
1430
	Humanoid.HipHeight = 1
1431
	Humanoid.Name = "Warden"
1432
	Humanoid.PlatformStand = false
1433
	if PLAYMAINANIM == true then
1434
		if TORSOVELOCITY < 1 then
1435
			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)
1436
			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)
1437
			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)
1438
			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)
1439
			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)
1440
			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)
1441
		elseif TORSOVELOCITY > 1 then
1442
			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)
1443
			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)
1444
			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)
1445
			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)
1446
			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)
1447
			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)
1448
		end
1449
	end
1450
	unanchor()
1451
	Humanoid.MaxHealth = "inf"
1452
	Humanoid.Health = "inf"
1453
	if Rooted == false then
1454
		Disable_Jump = false
1455
		Humanoid.WalkSpeed = Speed
1456
	elseif Rooted == true then
1457
		Disable_Jump = true
1458
		Humanoid.WalkSpeed = 0
1459
	end
1460
	for _, c in pairs(Character:GetChildren()) do
1461
		if c.ClassName == "Part" and c.Name ~= "Eye" then
1462
			c.Material = "Neon"
1463
			if c:FindFirstChildOfClass("ParticleEmitter") then
1464
				c:FindFirstChildOfClass("ParticleEmitter"):remove()
1465
			end
1466
			c.Color = C3(1,1,1)
1467
			if c == Head then
1468
				if c:FindFirstChild("face") then
1469
					c.face:remove()
1470
				end
1471
			end
1472
		elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.ClassName == "Hat" or c.Name == "Body Colors" then
1473
			c:remove()
1474
		elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
1475
			c:remove()
1476
		end
1477
	end
1478
	sick.SoundId = "rbxassetid://1494340971"
1479
	sick.Looped = true
1480
	sick.Pitch = 1
1481
	sick.Volume = 3
1482
	sick:Resume()
1483
	sick.Parent = Torso
1484
	refit()
1485
	if Head:FindFirstChildOfClass("Sound") then
1486
		Head:FindFirstChildOfClass("Sound"):remove()
1487
	end
1488
end
1489
1490
--//=================================\\
1491
--\\=================================//
1492
1493
1494
1495
1496
1497
--//====================================================\\--
1498
--||			  		 END OF SCRIPT
1499
--\\====================================================//--