View difference between Paste ID: hUJS1U4u and igWNwe0y
SHOW: | | - or go back to the newest paste.
1
local User = "demonsnowman" --replace with your username
2-
local User = "loroquen" --replace with your username
2+
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
local Player = game:GetService("Players")[User]
52
local Mouse,mouse,UserInputService,ContextActionService
53
do
54
	script.Parent = Player.Character
55
	local CAS = {Actions={}}
56
	local Event = Instance.new("RemoteEvent")
57
	Event.Name = "UserInput_Event"
58
	Event.Parent = Player.Character
59
	local fakeEvent = function()
60
		local t = {_fakeEvent=true}
61
		t.Connect = function(self,f)self.Function=f end
62
		t.connect = t.Connect
63
		return t
64
	end
65
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
66
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
67
	function CAS:BindAction(name,fun,touch,...)
68
		CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
69
	end
70
	function CAS:UnbindAction(name)
71
		CAS.Actions[name] = nil
72
	end
73
	local function te(self,ev,...)
74
		local t = m[ev]
75
		if t and t._fakeEvent and t.Function then
76
			t.Function(...)
77
		end
78
	end
79
	m.TrigEvent = te
80
	UIS.TrigEvent = te
81
	Event.OnServerEvent:Connect(function(plr,io)
82
	    if plr~=Player then return end
83
		if io.isMouse then
84
			m.Target = io.Target
85
			m.Hit = io.Hit
86
		elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
87
	        if io.UserInputState == Enum.UserInputState.Begin then
88
				m:TrigEvent("Button1Down")
89
			else
90
				m:TrigEvent("Button1Up")
91
			end
92
		else
93
			for n,t in pairs(CAS.Actions) do
94
				for _,k in pairs(t.Keys) do
95
					if k==io.KeyCode then
96
						t.Function(t.Name,io.UserInputState,io)
97
					end
98
				end
99
			end
100
	        if io.UserInputState == Enum.UserInputState.Begin then
101
	            m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
102
				UIS:TrigEvent("InputBegan",io,false)
103
			else
104
				m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
105
				UIS:TrigEvent("InputEnded",io,false)
106
	        end
107
	    end
108
	end)
109
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
110
end
111
112
113
local ServiceData = setmetatable({},{__index = function(s,i) return game:service(i) end})
114
local PlayersOfServer = ServiceData.Players
115
local Character = Player.Character
116
local Humanoid = Character.Humanoid
117
local LeftArm = Character["Left Arm"]
118
local RightArm = Character["Right Arm"]
119
local LeftLeg = Character["Left Leg"]
120
local RightLeg = Character["Right Leg"]
121
local Head = Character.Head
122
local Torso = Character.Torso
123
local RootPart = Character.HumanoidRootPart
124
local RootJoint = RootPart.RootJoint
125
local PlayerGui = Player.PlayerGui
126
local Cam = workspace.CurrentCamera
127
local Backpack = Player.Backpack
128
local RootPart = Character["HumanoidRootPart"]
129
local Torso = Character["Torso"]
130
local Head = Character["Head"]
131
local RootJoint = RootPart["RootJoint"]
132
local Neck = Torso["Neck"]
133
local RightShoulder = Torso["Right Shoulder"]
134
local LeftShoulder = Torso["Left Shoulder"]
135
local RightHip = Torso["Right Hip"]
136
local LeftHip = Torso["Left Hip"]
137
138
IT = Instance.new
139
CF = CFrame.new
140
VT = Vector3.new
141
RAD = math.rad
142
C3 = Color3.new
143
C3RBG = Color3.fromRGB
144
UD2 = UDim2.new
145
BRICKC = BrickColor.new
146
ANGLES = CFrame.Angles
147
EULER = CFrame.fromEulerAnglesXYZ
148
COS = math.cos
149
ACOS = math.acos
150
SIN = math.sin
151
ASIN = math.asin
152
ABS = math.abs
153
MRANDOM = math.random
154
FLOOR = math.floor
155
156
local hax = IT("Model")
157
hax.Name = "I\'\m gonna die"
158
hax.Parent = workspace.Terrain
159
160
local megahax = IT("Folder",hax)
161
megahax.Name = "\"Mega Epic Folder\""
162
163
local suprememhax = IT("Folder",PlayerGui)
164
suprememhax.Name = "Random \"Nil\" Folder"
165
script.Parent = suprememhax
166
167
pumpk = Instance.new("Sound", Head)
168
pumpk.SoundId = "rbxassetid://1771675015"
169
pumpk.Volume = 2
170
pumpk.Looped = true
171
pumpk:Play()
172
173
174
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
175
	local NEWMESH = IT(MESH)
176
	if MESH == "SpecialMesh" then
177
		NEWMESH.MeshType = MESHTYPE
178
		if MESHID ~= "nil" and MESHID ~= "" then
179
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
180
		end
181
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
182
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
183
		end
184
	end
185
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
186
	NEWMESH.Scale = SCALE
187
	NEWMESH.Parent = PARENT
188
	return NEWMESH
189
end
190
191
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
192
	local NEWPART = IT("Part")
193
	NEWPART.formFactor = FORMFACTOR
194
	NEWPART.Reflectance = REFLECTANCE
195
	NEWPART.Transparency = TRANSPARENCY
196
	NEWPART.CanCollide = false
197
	NEWPART.Locked = true
198
	NEWPART.Anchored = true
199
	if ANCHOR == false then
200
		NEWPART.Anchored = false
201
	end
202
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
203
	NEWPART.Name = NAME
204
	NEWPART.Size = SIZE
205
	NEWPART.Position = Torso.Position
206
	NEWPART.Material = MATERIAL
207
	NEWPART:BreakJoints()
208
	NEWPART.Parent = PARENT
209
	return NEWPART
210
end
211
212
213
function CreatePart1(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, NAME, SIZE, ANCHOR)
214
	local NEWPART = IT("Part")
215
	NEWPART.formFactor = FORMFACTOR
216
	NEWPART.Reflectance = REFLECTANCE
217
	NEWPART.Transparency = TRANSPARENCY
218
	NEWPART.CanCollide = false
219
	NEWPART.Locked = true
220
	NEWPART.Anchored = true
221
	if ANCHOR == false then
222
		NEWPART.Anchored = false
223
	end
224
	NEWPART.Name = NAME
225
	NEWPART.Size = SIZE
226
	NEWPART.Position = Torso.Position
227
	NEWPART.Material = MATERIAL
228
	NEWPART:BreakJoints()
229
	NEWPART.Parent = PARENT
230
	return NEWPART
231
end
232
233
234
--customize--
235
236
Player_Size = 1
237
Animation_Speed = 3
238
local SIZE = 1
239
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
240
241
local Speed = 20
242
--local Effects = {}
243
244
gem_mode = 1
245
246
--endoslol--
247
248
	local function weldBetween(a, b)
249
	    local weldd = Instance.new("ManualWeld")
250
	    weldd.Part0 = a
251
	    weldd.Part1 = b
252
	    weldd.C0 = CFrame.new()
253
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
254
	    weldd.Parent = a
255
	    return weldd
256
	end
257
258
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
259
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
260
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
261
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
262
local ANIM = "Idle"
263
local ATTACK = false
264
local EQUIPPED = false
265
local HOLD = false
266
local COMBO = 1
267
local Rooted = false
268
local SINE = 0
269
local KEYHOLD = false
270
local CHANGE = 2 / Animation_Speed
271
local WALKINGANIM = false
272
local WALK = 0
273
local VALUE1 = 1
274
local VALUE2 = false
275
local UIS = ServiceData.UserInputService
276
local CAS = ServiceData.ContextActionService
277
local WEAPONGUI = IT("ScreenGui", PlayerGui)
278
WEAPONGUI.Name = "Weapon GUI"
279
local Weapon = IT("Model")
280
Weapon.Name = "Adds"
281
local HITFLOOR = nil
282
local Effects = IT("Folder", Character)
283
Effects.Name = "Effects"
284
local FADERS = true
285
local ANIMATOR = Humanoid.Animator
286
local ANIMATE = Character:WaitForChild("Animate")
287
288
local EveryStroke = { 
289
"Gold", 
290
"Really red", 
291
"Bright blue", 
292
"Bright reddish lilac", 
293
"Olivine", 
294
"New Yeller" 
295
} 
296
297
local EveryColor = { 
298
"Bright orange", 
299
"Persimmon", 
300
"Teal", 
301
"Eggplant", 
302
"Mint", 
303
"Bright yellow"
304
} 
305
306
local TweenService = game:GetService("TweenService")
307
local Colours = {Color3.fromRGB(218, 133, 65),Color3.fromRGB(255, 89, 89),Color3.fromRGB(18, 238, 212),Color3.fromRGB(123, 0, 123),Color3.fromRGB(177, 229, 166),Color3.fromRGB(245, 205, 48)}
308
local Colours2 = {Color3.fromRGB(239, 184, 56),Color3.fromRGB(255, 0, 0),Color3.fromRGB(13, 105, 172),Color3.new(0.639216, 0.635294, 0.647059
309
),Color3.fromRGB(148, 190, 129),Color3.fromRGB(255, 255, 0)}
310
local Int = 0
311
--[[
312
while wait(0.45) do
313
    if Int == #Colours then Int = 0 end
314
    Int = Int+1
315
TweenService:Create(part,TweenInfo.new(1),{TextColor3 = Colours[Int]}):Play()
316
TweenService:Create(part,TweenInfo.new(1),{TextStrokeColor3 = Colours2[Int]}):Play()
317
end
318
]]
319
320
ChangeColorNumber = 1 
321
--BrickColor.new(Rainbow[ChangeColorNumber]).Color
322
323
--[[
324
Head.face:Destroy()
325
326
for i,v in pairs(Character:GetChildren()) do
327
    	if v:IsA("Hat") then
328
        	v:Destroy()
329
    	end
330
end
331
for i,v in pairs(Character:GetChildren()) do
332
    	if v:IsA("Accessory") then
333
		v:Destroy()
334
    	end
335
end
336
for i,v in pairs(Character:GetChildren()) do
337
    	if v:IsA("Hair") then
338
        	v:Destroy()
339
    	end
340
end
341
for i,v in pairs(Character:GetChildren()) do
342
    	if v:IsA("Shirt") then
343
        	v:Destroy()
344
    	end
345
end
346
for i,v in pairs(Character:GetChildren()) do
347
    	if v:IsA("Pants") then
348
       		v:Destroy()
349
    	end
350
end
351
for i,v in pairs(Character:GetChildren()) do
352
    	if v:IsA("Graphic Shirt") then
353
        	v:Destroy()
354
    	end
355
end
356
for i,v in pairs(Character:GetChildren()) do
357
	if v:IsA("GraphicShirt") then
358
		v:Destroy()
359
	end
360
end
361
362
Head.BrickColor = BrickColor.new("White")
363
RightArm.BrickColor = BrickColor.new("White")
364
LeftArm.BrickColor = BrickColor.new("White")
365
Torso.BrickColor = BrickColor.new("White")
366
RightLeg.BrickColor = BrickColor.new("White")
367
LeftLeg.BrickColor = BrickColor.new("White")
368
]]--
369
370
ArtificialHB = Instance.new("BindableEvent", script)
371
ArtificialHB.Name = "ArtificialHB"
372
373
script:WaitForChild("ArtificialHB")
374
375
frame = Frame_Speed
376
tf = 0
377
allowframeloss = false
378
tossremainder = false
379
lastframe = tick()
380
script.ArtificialHB:Fire()
381
382
game:GetService("RunService").Heartbeat:connect(function(s, p)
383
	tf = tf + s
384
	if tf >= frame then
385
		if allowframeloss then
386
			script.ArtificialHB:Fire()
387
			lastframe = tick()
388
		else
389
			for i = 1, math.floor(tf / frame) do
390
				script.ArtificialHB:Fire()
391
			end
392
		lastframe = tick()
393
		end
394
		if tossremainder then
395
			tf = 0
396
		else
397
			tf = tf - frame * math.floor(tf / frame)
398
		end
399
	end
400
end)
401
402
--//=================================\\
403
--||  Davo's fixed Rainbow Function
404
--\\=================================//
405
406
-->|Fixed By XDavodioX|<--
407
408
local cR=255
409
local cG=0
410
local cB=0
411
local flg5=1 local omgidk=1
412
local add=10.5
413
game:GetService('RunService').Heartbeat:connect(function()
414
	if omgidk>10000 then omgidk=0 end
415
	omgidk=omgidk+1
416
	if cR>=255 then flg5=1 end
417
	if cG>=255 then flg5=2 end
418
	if cB>=255 then flg5=3 end
419
	if flg5==1 then cR=cR-add cG=cG+add end
420
	if flg5==2 then cG=cG-add cB=cB+add end
421
	if flg5==3 then cB=cB-add cR=cR+add end
422
end)
423
424
--[Now useable in FE scripts/requires!]--
425
426
--//=================================\\
427
--||     End of Rainbow Function
428
--\\=================================//
429
430
--//=================================\\
431
--|| 	      SOME FUNCTIONS
432
--\\=================================//
433
434
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
435
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
436
end
437
438
function PositiveAngle(NUMBER)
439
	if NUMBER >= 0 then
440
		NUMBER = 0
441
	end
442
	return NUMBER
443
end
444
445
function NegativeAngle(NUMBER)
446
	if NUMBER <= 0 then
447
		NUMBER = 0
448
	end
449
	return NUMBER
450
end
451
452
function Swait(NUMBER)
453
	if NUMBER == 0 or NUMBER == nil then
454
		ArtificialHB.Event:wait()
455
	else
456
		for i = 1, NUMBER do
457
			ArtificialHB.Event:wait()
458
		end
459
	end
460
end
461
462
463
464
function QuaternionFromCFrame(cf)
465
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
466
	local trace = m00 + m11 + m22
467
	if trace > 0 then 
468
		local s = math.sqrt(1 + trace)
469
		local recip = 0.5 / s
470
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
471
	else
472
		local i = 0
473
		if m11 > m00 then
474
			i = 1
475
		end
476
		if m22 > (i == 0 and m00 or m11) then
477
			i = 2
478
		end
479
		if i == 0 then
480
			local s = math.sqrt(m00 - m11 - m22 + 1)
481
			local recip = 0.5 / s
482
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
483
		elseif i == 1 then
484
			local s = math.sqrt(m11 - m22 - m00 + 1)
485
			local recip = 0.5 / s
486
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
487
		elseif i == 2 then
488
			local s = math.sqrt(m22 - m00 - m11 + 1)
489
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
490
		end
491
	end
492
end
493
 
494
function QuaternionToCFrame(px, py, pz, x, y, z, w)
495
	local xs, ys, zs = x + x, y + y, z + z
496
	local wx, wy, wz = w * xs, w * ys, w * zs
497
	local xx = x * xs
498
	local xy = x * ys
499
	local xz = x * zs
500
	local yy = y * ys
501
	local yz = y * zs
502
	local zz = z * zs
503
	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))
504
end
505
 
506
function QuaternionSlerp(a, b, t)
507
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
508
	local startInterp, finishInterp;
509
	if cosTheta >= 0.0001 then
510
		if (1 - cosTheta) > 0.0001 then
511
			local theta = ACOS(cosTheta)
512
			local invSinTheta = 1 / SIN(theta)
513
			startInterp = SIN((1 - t) * theta) * invSinTheta
514
			finishInterp = SIN(t * theta) * invSinTheta
515
		else
516
			startInterp = 1 - t
517
			finishInterp = t
518
		end
519
	else
520
		if (1 + cosTheta) > 0.0001 then
521
			local theta = ACOS(-cosTheta)
522
			local invSinTheta = 1 / SIN(theta)
523
			startInterp = SIN((t - 1) * theta) * invSinTheta
524
			finishInterp = SIN(t * theta) * invSinTheta
525
		else
526
			startInterp = t - 1
527
			finishInterp = t
528
		end
529
	end
530
	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
531
end
532
533
function Clerp(a, b, t)
534
	local qa = {QuaternionFromCFrame(a)}
535
	local qb = {QuaternionFromCFrame(b)}
536
	local ax, ay, az = a.x, a.y, a.z
537
	local bx, by, bz = b.x, b.y, b.z
538
	local _t = 1 - t
539
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
540
end
541
542
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
543
	local frame = IT("Frame")
544
	frame.BackgroundTransparency = TRANSPARENCY
545
	frame.BorderSizePixel = BORDERSIZEPIXEL
546
	frame.Position = POSITION
547
	frame.Size = SIZE
548
	frame.BackgroundColor3 = COLOR
549
	frame.BorderColor3 = BORDERCOLOR
550
	frame.Name = NAME
551
	frame.Parent = PARENT
552
	return frame
553
end
554
555
function CreateLabel(PARENT, TEXT, COLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
556
	local label = IT("TextLabel")
557
	label.BackgroundTransparency = 1
558
	label.Size = UD2(1, 0, 1, 0)
559
	label.Position = UD2(0, 0, 0, 0)
560
	label.TextColor3 = COLOR
561
	label.TextStrokeTransparency = STROKETRANSPARENCY
562
	label.TextTransparency = TRANSPARENCY
563
	label.FontSize = TEXTFONTSIZE
564
	label.Font = TEXTFONT
565
	label.BorderSizePixel = BORDERSIZEPIXEL
566
	label.TextScaled = false
567
	label.Text = TEXT
568
	label.Name = NAME
569
	label.Parent = PARENT
570
	return label
571
end
572
573
function NoOutlines(PART)
574
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
575
end
576
577
578
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
579
	local NEWWELD = IT(TYPE)
580
	NEWWELD.Part0 = PART0
581
	NEWWELD.Part1 = PART1
582
	NEWWELD.C0 = C0
583
	NEWWELD.C1 = C1
584
	NEWWELD.Parent = PARENT
585
	return NEWWELD
586
end
587
588
function CharacterFade(COLOR,TIMER,MOVEDIRECTION,PARENT)
589
	coroutine.resume(coroutine.create(function()
590
		local FADE = IT("Model",Effects)
591
		if PARENT ~= nil then
592
			FADE.Parent = PARENT
593
		end
594
		FADE.Name = "FadingEffect"
595
		for _, c in pairs(Character:GetChildren()) do
596
			if c.ClassName == "Part" then
597
				c.CanCollide = false
598
				local FADER = CreatePart(3, FADE, "Neon", 0, 0.75, BRICKC("Pearl"), c.Name, c.Size, true)
599
				FADER.CFrame = c.CFrame
600
				FADER.Color = COLOR
601
				if FADER.Name == "Head" then
602
					Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FADER
603
				elseif FADER.Name == "HumanoidRootPart" then
604
					FADE.PrimaryPart = FADER
605
					FADER.Transparency = 1
606
				end
607
			end
608
		end
609
		local TRANS = 0.25/TIMER
610
		local DIST = nil
611
		if MOVEDIRECTION ~= nil then
612
			DIST = (FADE.PrimaryPart.Position - MOVEDIRECTION).Magnitude
613
		end
614
		for i = 1, TIMER do
615
			Swait()
616
			for _, c in pairs(FADE:GetChildren()) do
617
				if c.ClassName == "Part" then
618
					c.Transparency = c.Transparency + TRANS
619
				end
620
			end
621
			if MOVEDIRECTION ~= nil then
622
				local ORI = FADE.PrimaryPart.Orientation
623
				FADE:SetPrimaryPartCFrame(CF(CF(FADE.PrimaryPart.Position,MOVEDIRECTION)*CF(0,0,-DIST/TIMER).p) * ANGLES(RAD(ORI.X), RAD(ORI.Y), RAD(ORI.Z)))
624
			end
625
		end
626
		FADE:remove()
627
	end))
628
end
629
630
function CreateSound(ID, PARENT, VOLUME, PITCH)
631
	local NEWSOUND = nil
632
	coroutine.resume(coroutine.create(function()
633
		NEWSOUND = IT("Sound", PARENT)
634
		NEWSOUND.Volume = VOLUME
635
		NEWSOUND.Pitch = PITCH
636
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
637
		Swait()
638
		NEWSOUND:play()
639
		game:GetService("Debris"):AddItem(NEWSOUND, 10)
640
	end))
641
	return NEWSOUND
642
end
643
644
function CreateClientSound(ID, PARENT, VOLUME, PITCH, TIME)
645
	local NEWCLIENTSOUND = nil
646
	local NEWCLIENTSOUNDDATA = nil
647
	if script:FindFirstChild("ClientSound") == nil then
648
		return error("ClientSound not found!")
649
	else
650
		NEWCLIENTSOUNDDATA = script.ClientSound
651
		local pt = NEWCLIENTSOUNDDATA:WaitForChild("SoundParent")
652
		local si = NEWCLIENTSOUNDDATA:WaitForChild("SoundID")
653
		local vo = NEWCLIENTSOUNDDATA:WaitForChild("SoundVolume")
654
		local pi = NEWCLIENTSOUNDDATA:WaitForChild("SoundPitch")
655
		local dt = NEWCLIENTSOUNDDATA:WaitForChild("DestroyTime")
656
		pt.Value = PARENT
657
		si.Value = tonumber(ID)
658
		vo.Value = tonumber(VOLUME)
659
		pi.Value = tonumber(PITCH)
660
		dt.Value = tonumber(TIME)
661
		NEWCLIENTSOUND = script.ClientSound:Clone()
662
		NEWCLIENTSOUND.Parent = PlayerGui
663
		NEWCLIENTSOUND.Disabled = false
664
	end
665
end
666
667
function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
668
	local Sound = IT("Sound")
669
	Sound.SoundId = "rbxassetid://".. tostring(id or 0)
670
	Sound.Pitch = pitch or 1
671
	Sound.Volume = volume or 1
672
	Sound.Looped = looped or false
673
	if(autoPlay)then
674
		coroutine.wrap(function()
675
			repeat wait() until Sound.IsLoaded
676
			Sound.Playing = autoPlay or false
677
		end)()
678
	end
679
	if(not looped and effect)then
680
		Sound.Stopped:connect(function()
681
			Sound.Volume = 0
682
			Sound:destroy()
683
		end)
684
	elseif(effect)then
685
		
686
	end
687
	Sound.Parent =parent or Torso
688
	return Sound
689
end
690
691
function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf)
692
	local soundPart = NewInstance("Part",Effects,{Transparency=1,CFrame=cf or Torso.CFrame,Anchored=true,CanCollide=false,Size=V3.N()})
693
	local Sound = IT("Sound")
694
	Sound.SoundId = "rbxassetid://".. tostring(id or 0)
695
	Sound.Pitch = pitch or 1
696
	Sound.Volume = volume or 1
697
	Sound.Looped = looped or false
698
	if(autoPlay)then
699
		coroutine.wrap(function()
700
			repeat wait() until Sound.IsLoaded
701
			Sound.Playing = autoPlay or false
702
		end)()
703
	end
704
	if(not looped and effect)then
705
		Sound.Stopped:connect(function()
706
			Sound.Volume = 0
707
			soundPart:destroy()
708
		end)
709
	elseif(effect)then
710
		warn("Sound can't be looped and a sound effect!")
711
	end
712
	Sound.Parent = soundPart
713
	return Sound
714
end
715
716
function CreateOutfit()
717
	if script:FindFirstChild("Outfit Mesh") == nil then
718
		return error("Outfit Folder not found!")
719
	else
720
		for _, b in pairs(script["Outfit Mesh"]:children()) do
721
			b.Parent = Character
722
		end
723
	end
724
end
725
726
function CreateShield()
727
	local Shield = IT("MeshPart")
728
	Shield.Color = Color3.fromRGB(13, 105, 172)
729
	Shield.Transparency = 1
730
	Shield.CFrame = CF(Torso.Position)
731
	Shield.CanCollide = false
732
	Shield.Size = VT(5.4,6,5.4) --VT(3, 6.7, 5.44)
733
	Shield.Name = "BulletShield"
734
	Shield.Material = Enum.Material.Plastic
735
	Shield.Parent = workspace
736
	local ShieldMesh = IT("Weld")
737
	ShieldMesh.Parent = Shield
738
	ShieldMesh.Part0 = Shield
739
	ShieldMesh.Part1 = Torso
740
end
741
742
function CreateSnapGui()
743
	for a, t in pairs(PlayersOfServer:GetPlayers()) do
744
		if script:FindFirstChild("ThanosSnap") == nil then
745
			return error("Thanos Snap Gui not found!")
746
		else
747
			local guisc = script.GuiScript:Clone()
748
			local clgui = script.ThanosSnap:Clone()
749
			clgui.Parent = t.PlayerGui
750
			guisc.Parent = clgui
751
			guisc.Disabled = false
752
		end
753
	end
754
end
755
756
function CreateSelectionBox(PARENT, THICKNESS, COLOR, TRANS, SURFACECOLOR, SURFACETRANS)
757
	local box = IT("SelectionBox")
758
	box.Parent = PARENT
759
	box.Adornee = PARENT
760
	box.Color3 = COLOR
761
	box.Transparency = TRANS
762
	box.LineThickness = THICKNESS
763
	if SURFACECOLOR ~= nil then
764
		box.SurfaceColor3 = SURFACECOLOR
765
	else
766
		box.SurfaceColor3 = Color3.new(1,1,1)
767
	end
768
	if SURFACETRANS ~= nil then
769
		box.SurfaceTransparency = SURFACETRANS
770
	else
771
		box.SurfaceTransparency = 1
772
	end
773
	return box
774
end
775
776
function CreateModelSelectionBox(MODEL, THICKNESS, COLOR, TRANS, SURFACECOLOR, SURFACETRANS)
777
	for f, g in pairs(MODEL:GetChildren()) do
778
		if g.ClassName == "Part" or g.ClassName == "MeshPart" then
779
			CreateSelectionBox(g , THICKNESS, COLOR, TRANS, SURFACECOLOR, SURFACETRANS)
780
		end
781
	end
782
end
783
784
function CFrameFromTopBack(at, top, back)
785
	local right = top:Cross(back)
786
	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)
787
end
788
789
function CreateWave(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
790
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, COLOR, "Effect", VT(0,0,0))
791
	local mesh = IT("SpecialMesh",wave)
792
	mesh.MeshType = "FileMesh"
793
	mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
794
	mesh.Scale = SIZE
795
	mesh.Offset = VT(0,0,-SIZE.X/8)
796
	wave.CFrame = CFRAME
797
	coroutine.resume(coroutine.create(function(PART)
798
		for i = 1, WAIT do
799
			Swait()
800
			mesh.Scale = mesh.Scale + GROW
801
			mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
802
			if DOESROT == true then
803
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
804
			end
805
			wave.Transparency = wave.Transparency + (0.5/WAIT)
806
			if wave.Transparency > 0.99 then
807
				wave:remove()
808
			end
809
		end
810
	end))
811
end
812
813
function CreateWave2(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
814
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, COLOR, "Effect", VT(0,0,0))
815
	local mesh = IT("SpecialMesh",wave)
816
	mesh.MeshType = "FileMesh"
817
	mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
818
	mesh.Scale = SIZE
819
	--mesh.Offset = VT(0,0,-SIZE.X/8)
820
	wave.CFrame = CFRAME
821
	coroutine.resume(coroutine.create(function(PART)
822
		for i = 1, WAIT do
823
			Swait()
824
			mesh.Scale = mesh.Scale + GROW
825
			--mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
826
			if DOESROT == true then
827
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
828
			end
829
			wave.Transparency = wave.Transparency + (0.5/WAIT)
830
			if wave.Transparency > 0.99 then
831
				wave:remove()
832
			end
833
		end
834
	end))
835
end
836
837
function CreateRing(SIZE,DOESROT,ROT,WAIT,CFRAME,COLOR,GROW)
838
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
839
	local mesh = IT("SpecialMesh",wave)
840
	mesh.MeshType = "FileMesh"
841
	mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
842
	mesh.Scale = SIZE
843
	mesh.Offset = VT(0,0,0)
844
	wave.CFrame = CFRAME
845
	coroutine.resume(coroutine.create(function(PART)
846
		for i = 1, WAIT do
847
			Swait()
848
			mesh.Scale = mesh.Scale + GROW
849
			if DOESROT == true then
850
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
851
			end
852
			wave.Transparency = wave.Transparency + (0.5/WAIT)
853
			if wave.Transparency > 0.99 then
854
				wave:remove()
855
			end
856
		end
857
	end))
858
end
859
860
function CreateSwirl(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
861
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, Color3.fromRGB(CR,CG,CB), "Effect", VT(0,0,0))
862
	local mesh = IT("SpecialMesh",wave)
863
	mesh.MeshType = "FileMesh"
864
	mesh.MeshId = "http://www.roblox.com/asset/?id=1051557"
865
	mesh.Scale = SIZE
866
	wave.CFrame = CFRAME
867
	coroutine.resume(coroutine.create(function(PART)
868
		for i = 1, WAIT do
869
			Swait()
870
			mesh.Scale = mesh.Scale + GROW
871
			mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
872
			if DOESROT == true then
873
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
874
			end
875
			wave.Transparency = wave.Transparency + (0.5/WAIT)
876
			if wave.Transparency > 0.99 then
877
				wave:remove()
878
			end
879
		end
880
	end))
881
end
882
883
884
function Slice(SIZE,WAIT,CFRAME,COLOR,GROW)
885
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, Color3.fromRGB(CR,CG,CB), "Effect", VT(1,1,1), true)
886
	local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
887
	wave.CFrame = CFRAME
888
	coroutine.resume(coroutine.create(function(PART)
889
		for i = 1, WAIT do
890
			Swait()
891
			mesh.Scale = mesh.Scale * GROW
892
			wave.Transparency = wave.Transparency + (0.5/WAIT)
893
			if wave.Transparency > 0.99 then
894
				wave:remove()
895
			end
896
		end
897
	end))
898
end
899
900
function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW)
901
    local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(1,1,1), true)
902
    local mesh = IT("SpecialMesh",wave)
903
    mesh.MeshType = "Sphere"
904
    mesh.Scale = SIZE
905
    mesh.Offset = VT(0,0,0)
906
    wave.CFrame = CFRAME
907
    coroutine.resume(coroutine.create(function(PART)
908
        for i = 1, WAIT do
909
            Swait()
910
            mesh.Scale = mesh.Scale + GROW
911
            wave.Transparency = wave.Transparency + (1/WAIT)
912
            if wave.Transparency > 0.99 then
913
                wave:remove()
914
            end
915
        end
916
    end))
917
end
918
919
function MakeForm(PART,TYPE)
920
	if TYPE == "Cyl" then
921
		local MSH = IT("CylinderMesh",PART)
922
	elseif TYPE == "Ball" then
923
		local MSH = IT("SpecialMesh",PART)
924
		MSH.MeshType = "Sphere"
925
	elseif TYPE == "Wedge" then
926
		local MSH = IT("SpecialMesh",PART)
927
		MSH.MeshType = "Wedge"
928
	end
929
end
930
931
function CreateDebreeRing(FLOOR,POSITION,SIZE,BLOCKSIZE,SWAIT)
932
	if FLOOR ~= nil then
933
		coroutine.resume(coroutine.create(function()
934
			local PART = CreatePart(3, Effects, "Plastic", 0, 1, "Pearl", "DebreeCenter", VT(0,0,0))
935
			PART.CFrame = CF(POSITION)
936
			for i = 1, 45 do
937
				local RingPiece = CreatePart(3, Effects, "Plastic", 0, 0, "Pearl", "DebreePart", BLOCKSIZE)
938
				RingPiece.Material = FLOOR.Material
939
				RingPiece.Color = FLOOR.Color
940
				RingPiece.CFrame = PART.CFrame * ANGLES(RAD(0), RAD(i*8), RAD(0)) * CF(SIZE*4, 0, 0) * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
941
				Debris:AddItem(RingPiece,SWAIT/100)
942
			end
943
			PART:remove()
944
		end))
945
	end
946
end
947
948
function CheckTableForString(Table, String)
949
	for i, v in pairs(Table) do
950
		if string.find(string.lower(String), string.lower(v)) then
951
			return true
952
		end
953
	end
954
	return false
955
end
956
957
function CheckIntangible(Hit)
958
	local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
959
	if Hit and Hit.Parent then
960
		if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
961
			return true
962
		end
963
	end
964
	return false
965
end
966
967
function R_RANDOM(CFRAME,DIST)
968
	return CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,-DIST)
969
end
970
971
function WACKYEFFECT(Table)
972
	local TYPE = (Table.EffectType or "Sphere")
973
	local SIZE = (Table.Size or VT(1,1,1))
974
	local ENDSIZE = (Table.Size2 or VT(0,0,0))
975
	local TRANSPARENCY = (Table.Transparency or 0)
976
	local ENDTRANSPARENCY = (Table.Transparency2 or 1)
977
	local CFRAME = (Table.CFrame or Torso.CFrame)
978
	local MOVEDIRECTION = (Table.MoveToPos or nil)
979
	local ROTATION1 = (Table.RotationX or 0)
980
	local ROTATION2 = (Table.RotationY or 0)
981
	local ROTATION3 = (Table.RotationZ or 0)
982
	local MATERIAL = (Table.Material or "Neon")
983
	local COLOR = (Table.Color or C3(1,1,1))
984
	local TIME = (Table.Time or 45)
985
	local SOUNDID = (Table.SoundID or nil)
986
	local SOUNDPITCH = (Table.SoundPitch or nil)
987
	local SOUNDVOLUME = (Table.SoundVolume or nil)
988
	coroutine.resume(coroutine.create(function()
989
		local PLAYSSOUND = false
990
		local SOUND = nil
991
		local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
992
		if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
993
			PLAYSSOUND = true
994
			SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
995
		end
996
		EFFECT.Color = COLOR
997
		local MSH = nil
998
		if TYPE == "Sphere" then
999
			MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
1000
		elseif TYPE == "Block" then
1001
			MSH = IT("BlockMesh",EFFECT)
1002
			MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
1003
		elseif TYPE == "Wave" then
1004
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
1005
		elseif TYPE == "Ring" then
1006
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
1007
		elseif TYPE == "Slash" then
1008
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
1009
		elseif TYPE == "Round Slash" then
1010
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
1011
		elseif TYPE == "Swirl" then
1012
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
1013
		elseif TYPE == "Skull" then
1014
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
1015
		elseif TYPE == "Crystal" then
1016
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
1017
		end
1018
		if MSH ~= nil then
1019
			local MOVESPEED = nil
1020
			if MOVEDIRECTION ~= nil then
1021
				MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
1022
			end
1023
			local GROWTH = SIZE - ENDSIZE
1024
			local TRANS = TRANSPARENCY - ENDTRANSPARENCY
1025
			if TYPE == "Block" then
1026
				EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
1027
			else
1028
				EFFECT.CFrame = CFRAME
1029
			end
1030
			for LOOP = 1, TIME+1 do
1031
				Swait()
1032
				MSH.Scale = MSH.Scale - GROWTH/TIME
1033
				if TYPE == "Wave" then
1034
					MSH.Offset = VT(0,0,-MSH.Scale.X/8)
1035
				end
1036
				EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
1037
				if TYPE == "Block" then
1038
					EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
1039
				else
1040
					EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
1041
				end
1042
				if MOVEDIRECTION ~= nil then
1043
					local ORI = EFFECT.Orientation
1044
					EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
1045
					EFFECT.Orientation = ORI
1046
				end
1047
			end
1048
			if PLAYSSOUND == false then
1049
				EFFECT:remove()
1050
			else
1051
				repeat Swait() until SOUND.Playing == false
1052
				EFFECT:remove()
1053
			end
1054
		else
1055
			if PLAYSSOUND == false then
1056
				EFFECT:remove()
1057
			else
1058
				repeat Swait() until SOUND.Playing == false
1059
				EFFECT:remove()
1060
			end
1061
		end
1062
	end))
1063
end
1064
1065
function SpawnTrail(FROM,TO,BIG)
1066
	local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Really red", "Trail", VT(0,0,0))
1067
	MakeForm(TRAIL,"Cyl")
1068
	local DIST = (FROM - TO).Magnitude
1069
	if BIG == true then
1070
		TRAIL.Size = VT(0.5,DIST,0.5)
1071
	else
1072
		TRAIL.Size = VT(0.25,DIST,0.25)
1073
	end
1074
	TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
1075
	coroutine.resume(coroutine.create(function()
1076
		for i = 1, 5 do
1077
			Swait()
1078
			TRAIL.Transparency = TRAIL.Transparency + 0.1
1079
		end
1080
		TRAIL:remove()
1081
	end))
1082
end
1083
1084
Debris = game:GetService("Debris")
1085
1086
function MagicSphere1(SIZE,WAIT,CFRAME,COLOR,GROW)
1087
    local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Eye", VT(1,1,1), true)
1088
    wave.Color = COLOR
1089
    local mesh = CreateMesh("SpecialMesh", wave, "Sphere", "", "", SIZE, VT(0,0,0))
1090
    wave.CFrame = CFRAME
1091
    coroutine.resume(coroutine.create(function(PART)
1092
        for i = 1, WAIT do
1093
            Swait()
1094
            mesh.Scale = mesh.Scale + GROW
1095
            wave.Transparency = wave.Transparency + (1/WAIT)
1096
            if wave.Transparency > 0.99 then
1097
                wave:remove()
1098
            end
1099
        end
1100
    end))
1101
end
1102
1103
function FireArc(Part, ToLocation, AmountOfTime, Height, DoesCourontine)
1104
	if DoesCourontine == false then
1105
		local Direction = CF(Part.Position, ToLocation)
1106
		local Distance = (Part.Position - ToLocation).magnitude
1107
		for i = 1, AmountOfTime do
1108
			Swait()
1109
			Part.CFrame = Direction * CF(0, AmountOfTime / 200 + (AmountOfTime / Height - i * 2 / Height), -Distance / AmountOfTime)
1110
			Direction = Part.CFrame
1111
		end
1112
		Part:remove()
1113
	elseif DoesCourontine == true then
1114
		coroutine.resume(coroutine.create(function()
1115
			local Direction = CF(Part.Position, ToLocation)
1116
			local Distance = (Part.Position - ToLocation).magnitude
1117
			for i = 1, AmountOfTime do
1118
				Swait()
1119
				Part.CFrame = Direction * CF(0, AmountOfTime / 200 + (AmountOfTime / Height - i * 2 / Height), -Distance / AmountOfTime)
1120
				Direction = Part.CFrame
1121
			end
1122
			Part:remove()
1123
		end))
1124
	end
1125
end
1126
1127
function CreateFlyingDebree2(FLOOR,POSITION,AMOUNT,BLOCKSIZE,SWAIT,STRENGTH)
1128
	if FLOOR ~= nil then
1129
		for i = 1, AMOUNT do
1130
			local DEBREE = CreatePart(3, Effects, "Neon", 0, 0, "Deep orange", "Debree", BLOCKSIZE, false)
1131
			DEBREE.Material = FLOOR.Material
1132
			DEBREE.Color = FLOOR.Color
1133
			DEBREE.CFrame = POSITION * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
1134
			DEBREE.Velocity = VT(MRANDOM(-STRENGTH,STRENGTH),STRENGTH,MRANDOM(-STRENGTH,STRENGTH))
1135
			coroutine.resume(coroutine.create(function()
1136
				Swait(15)
1137
				DEBREE.Parent = workspace
1138
				DEBREE.CanCollide = true
1139
				Debris:AddItem(DEBREE,SWAIT)
1140
			end))
1141
		end
1142
	end
1143
end
1144
1145
function Slice2(KIND, SIZE, WAIT, CFRAME, COLOR, GROW)
1146
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1, 1, 1), true)
1147
	local mesh
1148
	if KIND == "Base" then
1149
		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0, SIZE / 10, SIZE / 10), VT(0, 0, 0))
1150
	elseif KIND == "Thin" then
1151
		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE / 10, 0, SIZE / 10), VT(0, 0, 0))
1152
	elseif KIND == "Round" then
1153
		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE / 10, 0, SIZE / 10), VT(0, 0, 0))
1154
	end
1155
	wave.CFrame = CFRAME
1156
	coroutine.resume(coroutine.create(function(PART)
1157
		for i = 1, WAIT do
1158
			Swait()
1159
			mesh.Scale = mesh.Scale + GROW / 10
1160
			wave.Transparency = wave.Transparency + 0.5 / WAIT
1161
			if wave.Transparency > 0.99 then
1162
				wave:remove()
1163
			end
1164
		end
1165
	end))
1166
end
1167
1168
function CreateDebreeRing2(FLOOR,POSITION,SIZE,BLOCKSIZE,SWAIT)
1169
	if FLOOR ~= nil then
1170
		coroutine.resume(coroutine.create(function()
1171
			local PART = CreatePart(3, Effects, "Plastic", 0, 1, "Lime green", "DebreeCenter", VT(0,0,0))
1172
			PART.CFrame = CF(POSITION)
1173
			for i = 1, 45 do
1174
				local RingPiece = CreatePart(3, Effects, "Plastic", 0, 0, "Really blue", "DebreePart", BLOCKSIZE)
1175
				RingPiece.Material = FLOOR.Material
1176
				RingPiece.Color = FLOOR.Color
1177
				RingPiece.CFrame = PART.CFrame * ANGLES(RAD(0), RAD(i*8), RAD(0)) * CF(SIZE*4, 0, 0) * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
1178
				Debris:AddItem(RingPiece,SWAIT)
1179
			end
1180
			PART:remove()
1181
		end))
1182
	end
1183
end
1184
1185
function AddChildrenToTable(FROM, PARENT, DIST, TABLE)
1186
	for _, c in pairs(PARENT:GetChildren()) do
1187
		if c.ClassName == "Model" then
1188
			if c ~= Character and c:FindFirstChildOfClass("Humanoid") and (c:FindFirstChild("Torso") or c:FindFirstChild("UpperTorso")) then
1189
				local HUMANOID = c:FindFirstChildOfClass("Humanoid")
1190
				local TORSO = c:FindFirstChild("Torso") or c:FindFirstChild("UpperTorso")
1191
				if DIST > (TORSO.Position - FROM).Magnitude then
1192
					table.insert(TABLE, c)
1193
				end
1194
				AddChildrenToTable(FROM, c, DIST, TABLE)
1195
			elseif c.ClassName == "Folder" then
1196
				AddChildrenToTable(FROM, c, DIST, TABLE)
1197
			end
1198
		end
1199
	end
1200
end
1201
1202
function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
1203
	local Direction = CFrame.new(StartPos, Vec).lookVector
1204
	local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
1205
	local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
1206
	if RayHit and CheckIntangible(RayHit) then
1207
		if DelayIfHit then
1208
			wait()
1209
		end
1210
		RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
1211
	end
1212
	return RayHit, RayPos, RayNormal
1213
end
1214
1215
function CastProperRay(StartPos, EndPos, Distance, Ignore)
1216
	local DIRECTION = CF(StartPos,EndPos).lookVector
1217
	return Raycast(StartPos, DIRECTION, Distance, Ignore)
1218
end
1219
1220
function turnto(position)
1221
	RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
1222
end
1223
1224
local BODY = {}
1225
1226
for _, c in pairs(Character:GetDescendants()) do
1227
	if c:IsA("BasePart") and c.Name ~= "Handle" then
1228
		if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
1229
			c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
1230
		end
1231
		table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
1232
	elseif c:IsA("JointInstance") then
1233
		table.insert(BODY,{c,c.Parent,nil,nil,nil})
1234
	end
1235
end
1236
1237
for e = 1, #BODY do
1238
	if BODY[e] ~= nil then
1239
		local STUFF = BODY[e]
1240
		local PART = STUFF[1]
1241
		local PARENT = STUFF[2]
1242
		local MATERIAL = STUFF[3]
1243
		local COLOR = STUFF[4]
1244
		local TRANSPARENCY = STUFF[5]
1245
		if PART.ClassName == "Part" and PART ~= RootPart then
1246
			PART.Material = MATERIAL
1247
			PART.Color = COLOR
1248
			PART.Transparency = TRANSPARENCY
1249
		end
1250
		PART.AncestryChanged:Connect(function()
1251
			PART.Parent = PARENT
1252
		end)
1253
	end
1254
end
1255
1256
function refit()
1257
	Character.Parent = megahax
1258
	for e = 1, #BODY do
1259
		if BODY[e] ~= nil then
1260
			local STUFF = BODY[e]
1261
			local PART = STUFF[1]
1262
			local PARENT = STUFF[2]
1263
			local MATERIAL = STUFF[3]
1264
			local COLOR = STUFF[4]
1265
			local TRANSPARENCY = STUFF[5]
1266
			if PART.ClassName == "Part" and PART ~= RootPart then
1267
				PART.Material = MATERIAL
1268
				PART.Color = COLOR
1269
				PART.Transparency = TRANSPARENCY
1270
			end
1271
			if PART.Parent ~= PARENT then
1272
				Humanoid:remove()
1273
				PART.Parent = PARENT
1274
				Humanoid = IT("Humanoid",Character)
1275
			end
1276
		end
1277
	end
1278
end
1279
1280
Humanoid.Died:connect(function()
1281
	ATTACK = false
1282
	refit()
1283
end)
1284
1285
Humanoid.HealthChanged:connect(function()
1286
	ATTACK = false
1287
	refit()
1288
end)
1289
1290
--Weapon MAKE--
1291
1292
--Design-- 
1293
1294
local Gauntlet = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Gauntlet", VT(0, 0, 0),false)
1295
local HandleMesh = CreateMesh("SpecialMesh", Gauntlet, "FileMesh", "1757389224", "1782744902", VT(0.062,0.062,0.062), VT(0,0, 0))
1296
local Weld = CreateWeldOrSnapOrMotor("Weld", Gauntlet, LeftArm, Gauntlet, CF(0.265, -0.54, 0) * ANGLES(RAD(330), RAD(0), RAD(20)), CF(0, 0, 0))
1297
1298
local basgui = IT("GuiMain")
1299
basgui.Parent = PlayerGui
1300
basgui.Name = "VISgui"
1301
local fullscreenz = IT("Frame")
1302
fullscreenz.Parent = basgui
1303
fullscreenz.BackgroundColor3 = Color3.new(255, 255, 255)
1304
fullscreenz.BackgroundTransparency = 1
1305
fullscreenz.BorderColor3 = Color3.new(17, 17, 17)
1306
fullscreenz.Size = UDim2.new(1, 0, 1, 0)
1307
fullscreenz.Position = UDim2.new(0, 0, 0, 0)
1308
1309
local imgl2 = Instance.new("ImageLabel",fullscreenz)
1310
imgl2.BackgroundTransparency = 1
1311
imgl2.BorderSizePixel = 0
1312
imgl2.ImageTransparency = 0.432
1313
imgl2.ImageColor3 = Color3.new(255,255,255)
1314
imgl2.Position = UDim2.new(0.90,-200,0.794,-200)
1315
imgl2.Size = UDim2.new(0,400,0,400)
1316
imgl2.Image = "rbxassetid://2480004800"
1317
1318
local circl = imgl2:Clone()
1319
circl.Parent = fullscreenz
1320
circl.ImageTransparency = 1
1321
circl.Size = UDim2.new(0,550,0,550)
1322
circl.Position = UDim2.new(0.75,25,0.55,25)
1323
circl.ImageColor3 = Color3.new(255,255,255)
1324
circl.Image = "rbxassetid://278749933"
1325
1326
local ned = Instance.new("TextLabel",fullscreenz)
1327
ned.ZIndex = 2
1328
ned.Font = "Antique"
1329
ned.BackgroundTransparency = 1
1330
ned.BorderSizePixel = 0.65
1331
ned.Size = UDim2.new(0.3,0,0.2,0)
1332
ned.Position = UDim2.new(0.7,0,0.788,0)
1333
ned.TextColor3 = BrickColor.new("White").Color
1334
ned.TextStrokeColor3 = BrickColor.new("White").Color
1335
ned.TextScaled = true
1336
ned.TextStrokeTransparency = 0
1337
ned.Text = "Soul Gem"
1338
ned.TextSize = 17.3
1339
ned.Rotation = 1
1340
ned.TextXAlignment = "Right"
1341
ned.TextYAlignment = "Bottom"
1342
1343
1344
1345
function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR)
1346
	local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
1347
	STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0))
1348
	local BODYGYRO = IT("BodyGyro", STATPART)
1349
	local BODYPOSITION = IT("BodyPosition", STATPART)
1350
	BODYPOSITION.P = 2000
1351
	BODYPOSITION.D = 100
1352
	BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge)
1353
	BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2))
1354
	game:GetService("Debris"):AddItem(STATPART ,5)
1355
	local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
1356
	BILLBOARDGUI.Adornee = STATPART
1357
	BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
1358
	BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
1359
	BILLBOARDGUI.AlwaysOnTop = false
1360
	local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
1361
	TEXTLABEL.BackgroundTransparency = 1
1362
	TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
1363
	TEXTLABEL.Text = TEXT
1364
	TEXTLABEL.Font = "SciFi"
1365
	TEXTLABEL.FontSize="Size42"
1366
	TEXTLABEL.TextColor3 = COLOR
1367
	TEXTLABEL.TextStrokeTransparency = 1
1368
	TEXTLABEL.TextScaled = true
1369
	TEXTLABEL.TextWrapped = true
1370
	coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
1371
		if LABELTYPE == "Normal" then
1372
			for i = 1, 30 do
1373
				Swait()
1374
				STATPART.Position = STATPART.Position + VT(0, (15-i)/10 ,0)
1375
				TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
1376
			end
1377
		elseif LABELTYPE == "Debuff" then
1378
			for i = 1, 30 do
1379
				Swait()
1380
				STATPART.Position = STATPART.Position - VT(0, i/10 ,0)
1381
				TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
1382
			end
1383
		elseif LABELTYPE == "Shock" then
1384
			local ORIGIN = STATPART.Position
1385
			for i = 1, 30 do
1386
				Swait()
1387
				STATPART.Position = ORIGIN + VT(MRANDOM(-2,2),MRANDOM(-2,2),MRANDOM(-2,2))
1388
				TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
1389
			end
1390
		end
1391
		THEPART.Parent = nil
1392
	end),STATPART, BODYPOSITION, TEXTLABEL)
1393
end
1394
1395
--Attack functions--
1396
1397
local masos = Instance.new("Model",game:GetService("Lighting"))
1398
local IDFSGPARTICLE = Instance.new("ParticleEmitter")
1399
IDFSGPARTICLE.Name = "idontfeelsogood"
1400
IDFSGPARTICLE.Parent = masos
1401
IDFSGPARTICLE.Speed = NumberRange.new(1, 1)
1402
IDFSGPARTICLE.LightInfluence = 1
1403
IDFSGPARTICLE.Texture = "rbxassetid://252644715"
1404
IDFSGPARTICLE.Size = NumberSequence.new(0.20000000298023,0)
1405
IDFSGPARTICLE.Acceleration = Vector3.new(3, 0, 0)
1406
IDFSGPARTICLE.Lifetime = NumberRange.new(2, 2)
1407
IDFSGPARTICLE.Rate = 200
1408
IDFSGPARTICLE.RotSpeed = NumberRange.new(-60, 60)
1409
IDFSGPARTICLE.Enabled = false
1410
1411
function GiveSpecialMesh(object, size, idmesh)
1412
	if object ~= nil then 
1413
		local mesho = Instance.new("SpecialMesh")
1414
		mesho.Parent = object
1415
		mesho.Scale = size
1416
		mesho.MeshId = "rbxassetid://" ..idmesh
1417
	end
1418
end
1419
1420
function GiveIDFSG(model)
1421
	if model ~= nil then
1422
		local yee = IDFSGPARTICLE:Clone()
1423
		yee.Parent = model
1424
		yee.Color = ColorSequence.new(model.Color)
1425
		yee.Enabled = true
1426
	end
1427
end
1428
1429
function TurnBaby(who)
1430
	if who ~= nil and who ~= Character then
1431
		local hedos = who:FindFirstChild("Head")
1432
		local laos = who:FindFirstChild("Left Arm")
1433
		local llos = who:FindFirstChild("Left Leg")
1434
		local raos = who:FindFirstChild("Right Arm")
1435
		local rlos = who:FindFirstChild("Right Leg")
1436
		local toros = who:FindFirstChild("Torso")
1437
		if toros ~= nil and llos ~= nil and raos ~= nil and laos ~= nil and hedos ~= nil and rlos ~= nil then
1438
			laos.Transparency = 1
1439
			raos.Transparency = 1
1440
			toros.Size = Vector3.new(0.34,0.34,0.34)
1441
			llos.Size = Vector3.new(0.34,0.34,0.34)
1442
			rlos.Size = Vector3.new(0.34,0.34,0.34)
1443
			hedos.Size = Vector3.new(0.34,0.34,0.34)
1444
			rlos.Size = Vector3.new(0.34,0.34,0.34)
1445
			laos.Size = Vector3.new(0.34,0.34,0.34)
1446
		end
1447
	end
1448
end
1449
1450
function ResetCharacter(Boi)
1451
	if Boi ~= Character then
1452
		Boi:LoadCharacter()
1453
	end
1454
end
1455
1456
function BegoneBye(thaobject)
1457
	if thaobject ~= nil then
1458
		GiveIDFSG(thaobject)
1459
		coroutine.wrap(function()
1460
			for i = 0,1,0.01 do
1461
				wait()
1462
				if thaobject.Name == "HumanoidRootPart" then
1463
					thaobject:Destroy()
1464
				else
1465
					thaobject.Transparency = i
1466
				end
1467
			end
1468
			if thaobject.Transparency >= 0.9 then
1469
				thaobject:Destroy()	
1470
			end
1471
		end)()
1472
	end
1473
end
1474
1475
function BegoneByeModel(thaobject)
1476
	for f, g in pairs(thaobject:GetChildren()) do
1477
		if g.ClassName == "Part" or g.ClassName == "MeshPart" then
1478
			BegoneBye(g)
1479
		end
1480
	end
1481
end
1482
1483
function killnearest(position, range, maxstrength)
1484
	for i, v in ipairs(workspace:GetChildren()) do
1485
		do
1486
			local body = v:GetChildren()
1487
			for part = 1, #body do
1488
				if (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character and range > (body[part].Position - position).Magnitude then
1489
					if v.ClassName == "Model" then
1490
						v:BreakJoints()
1491
					end
1492
					local bv = Instance.new("BodyVelocity")
1493
					bv.maxForce = Vector3.new(1000000000, 1000000000, 1000000000)
1494
					bv.velocity = CF(position, body[part].Position).lookVector * maxstrength
1495
					bv.Parent = body[part]
1496
					Debris:AddItem(bv, 0.2)
1497
					body[part].Parent = Effects
1498
					body[part].Material = "Neon"
1499
					body[part].Color = Color3.fromRGB(167, 94, 155)
1500
					body[part].CanCollide = true
1501
					coroutine.resume(coroutine.create(function()
1502
						wait(5)
1503
						if body[part].Parent == Effects then
1504
							body[part]:remove()
1505
						end
1506
					end))
1507
				end
1508
			end
1509
			if v.ClassName == "Part" and v.Anchored == false and range > (v.Position - position).Magnitude then
1510
				v.Velocity = CFrame.new(position, v.Position).lookVector * 5 * maxstrength
1511
			end
1512
		end
1513
	end
1514
end
1515
1516
function killnearest2(position, range, maxstrength, mode)
1517
	for i, v in ipairs(workspace:GetChildren()) do
1518
		do
1519
			local body = v:GetChildren()
1520
			for part = 1, #body do
1521
				if (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character and range > (body[part].Position - position).Magnitude then
1522
					if v.ClassName == "Model" then
1523
						if mode == "IDFSG" then
1524
							BegoneByeModel(v)
1525
						elseif mode == "NORMAL" then
1526
							v:BreakJoints()
1527
						end
1528
					end
1529
					local bv = Instance.new("BodyVelocity")
1530
					bv.maxForce = Vector3.new(1000000000, 1000000000, 1000000000)
1531
					bv.velocity = CF(position, body[part].Position).lookVector * maxstrength
1532
					bv.Parent = body[part]
1533
					Debris:AddItem(bv, 0.2)
1534
				end
1535
			end
1536
		end
1537
	end
1538
end
1539
1540
function Transparency(TRANS)
1541
	for _, c in pairs(Character:GetChildren()) do
1542
		if c.ClassName == "Part" and c ~= RootPart then
1543
			c.Transparency = TRANS
1544
			if c:FindFirstChildOfClass("Decal") then
1545
				c:FindFirstChildOfClass("Decal").Transparency = TRANS
1546
			end
1547
		elseif c.ClassName == "Accessory" then
1548
			c.Handle.Transparency = TRANS
1549
		elseif c.ClassName == "Model" then
1550
			for _, q in pairs(c:GetChildren()) do
1551
				if q.ClassName == "Part" then
1552
					q.Transparency = TRANS
1553
					if q:FindFirstChildOfClass("Decal") then
1554
						q:FindFirstChildOfClass("Decal").Transparency = TRANS
1555
					end
1556
				end
1557
			end
1558
		end
1559
	end
1560
end
1561
1562
function Petrify(Char)
1563
    local NewCharacter = IT("Model",Effects)
1564
    NewCharacter.Name = "StonedPerson"
1565
    for _, c in pairs(Char:GetDescendants()) do
1566
        if c:IsA("BasePart") and c.Transparency == 0 then
1567
            if c.Parent == Char then
1568
                
1569
            end
1570
            c:BreakJoints()
1571
            c.Material = "Cobblestone"
1572
            c.Color = C3(0.5,0.5,0.5)
1573
            c.CanCollide = true
1574
            c.Transparency = 0
1575
            if c:FindFirstChildOfClass("SpecialMesh") then
1576
                c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
1577
            end
1578
            if c.Name == "Head" then
1579
                c:ClearAllChildren()
1580
                c.Size = VT(c.Size.Y,c.Size.Y,c.Size.Y)
1581
            end
1582
            if c.ClassName == "MeshPart" then
1583
                c.TextureID = ""
1584
            end
1585
            if c:FindFirstChildOfClass("BodyPosition") then
1586
                c:FindFirstChildOfClass("BodyPosition"):remove()
1587
            end
1588
            if c:FindFirstChildOfClass("ParticleEmitter") then
1589
                c:FindFirstChildOfClass("ParticleEmitter"):remove()
1590
            end
1591
            c.Parent = NewCharacter
1592
            c.Name = "DeadPart"
1593
            c.Velocity = VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45))/15
1594
            c.RotVelocity = VT(MRANDOM(-45,45),MRANDOM(-15,85),MRANDOM(-45,45))
1595
        end
1596
    end
1597
    Char:remove()
1598
    Debris:AddItem(NewCharacter,5)
1599
end
1600
1601
function RealityBeam(FROM,TO,BRUTAL)
1602
    local AIMHIT,AIMPOS,NORMAL = CastProperRay(FROM,TO,2000,Character)
1603
    coroutine.resume(coroutine.create(function()
1604
        if AIMHIT ~= nil then
1605
            if AIMHIT.Parent ~= Character then
1606
                if AIMHIT.Parent:FindFirstChildOfClass("Humanoid") or AIMHIT.Parent.Parent:FindFirstChildOfClass("Humanoid") then
1607
                    if AIMHIT.Parent:FindFirstChildOfClass("Humanoid") then
1608
                        if BRUTAL == true then
1609
                            Petrify(AIMHIT.Parent)
1610
                        else
1611
                            AIMHIT.Parent:BreakJoints()
1612
                            if AIMHIT.Name == "Head" then
1613
                                AIMHIT.Name = "HEADSHOT"
1614
                                AIMHIT:remove()
1615
                            end
1616
                        end
1617
                    else
1618
                        if BRUTAL == true then
1619
                            Petrify(AIMHIT.Parent.Parent)
1620
                        else
1621
                            AIMHIT.Parent.Parent:BreakJoints()
1622
                        end
1623
                    end
1624
                end
1625
            end
1626
        end
1627
    end))
1628
    SpawnTrail(FROM,AIMPOS)
1629
    return AIMHIT,AIMPOS,NORMAL
1630
end
1631
1632
function TimeStopCharacter(who)
1633
	if who.Parent ~= Character and who:FindFirstChild("HumanoidRootPart") then
1634
		local TORSO = who:FindFirstChild("HumanoidRootPart")
1635
		local bex = IT("Part")
1636
		bex.Parent = Effects
1637
		bex.Orientation = VT(TORSO.Orientation)
1638
		bex.Size = VT(0.001,0.001,0.001)
1639
		bex.Transparency = 1
1640
		bex.CFrame = CF(TORSO.Position)
1641
		bex.CanCollide = false
1642
		bex.Name = "" ..math.random(10000,99999)
1643
		bex.Anchored = true
1644
		local wed = IT("Weld")
1645
		wed.Parent = bex
1646
		wed.Part0 = bex
1647
		wed.Part1 = TORSO
1648
		CreateSound("2099904460", bex, 0.7, MRANDOM(7, 12) / 10)
1649
		CreateModelSelectionBox(TORSO.Parent, 0.123, Color3.fromRGB(75, 151, 75), 0, nil, nil)
1650
	end
1651
end
1652
1653
function TimeStopPart(prt)
1654
	if prt.Parent ~= Character then
1655
	if prt:IsA("Part") or prt:IsA("MeshPart") then
1656
		if prt:FindFirstChild("Already Stopped") ~= nil then
1657
			return
1658
		end
1659
		local vale = IT("StringValue")
1660
		vale.Parent = prt
1661
		vale.Name = "Already Stopped"
1662
		vale.Value = "nil"
1663
		local bex = IT("Part")
1664
		bex.Parent = Effects
1665
		bex.Orientation = VT(prt.Orientation)
1666
		bex.Size = VT(0.001,0.001,0.001)
1667
		bex.Transparency = 1
1668
		bex.CFrame = CF(prt.Position)
1669
		bex.CanCollide = false
1670
		bex.Name = "" ..math.random(10000,99999)
1671
		bex.Anchored = true
1672
		local wed = IT("Weld")
1673
		wed.Parent = bex
1674
		wed.Part0 = bex
1675
		wed.Part1 = prt
1676
		CreateSound("2099904460", bex, 0.7, MRANDOM(7, 12) / 10)
1677
		if prt.Transparency < 1 then
1678
		CreateSelectionBox(prt, 0.123, Color3.fromRGB(75, 151, 75), 0, nil, nil)
1679
		end
1680
	end
1681
	end
1682
end
1683
1684
function IDontFeelSoGood(whom)
1685
	if whom ~= Character then
1686
		for i,v in pairs(whom:GetDescendants()) do
1687
			
1688
			if v:IsA("BasePart") and v ~= whom.RootPart then
1689
				local function sandbox(var,func)
1690
					local env = getfenv(func)
1691
					local newenv = setmetatable({},{
1692
						__index = function(self,k)
1693
							if k=="script" then
1694
								return var
1695
							else 
1696
								return env[k]
1697
							end
1698
						end,
1699
					})
1700
					setfenv(func,newenv)
1701
					return func
1702
				end
1703
				
1704
				local cors = {}
1705
				local mas = Instance.new("Model",game:GetService("Lighting"))
1706
				local ParticleEmitter0 = Instance.new("ParticleEmitter")
1707
				ParticleEmitter0.Name = "idontfeelsogood"
1708
				ParticleEmitter0.Parent = mas
1709
				ParticleEmitter0.Speed = NumberRange.new(1, 1)
1710
				ParticleEmitter0.LightInfluence = 1
1711
				ParticleEmitter0.Texture = "rbxassetid://252644715"
1712
				ParticleEmitter0.Size = NumberSequence.new(0.20000000298023,0)
1713
				ParticleEmitter0.Acceleration = Vector3.new(3, 0, 0)
1714
				ParticleEmitter0.Lifetime = NumberRange.new(2, 2)
1715
				ParticleEmitter0.Rate = 200
1716
				ParticleEmitter0.RotSpeed = NumberRange.new(-60, 60)
1717
				ParticleEmitter0.Enabled = false
1718
				for i,v in pairs(mas:GetChildren()) do
1719
					v.Parent = whom --script
1720
					pcall(function() v:MakeJoints() end)
1721
				end
1722
				mas:Destroy()
1723
				for i,v in pairs(cors) do
1724
					spawn(function()
1725
						pcall(v)
1726
					end)
1727
				end
1728
				local Particlee = ParticleEmitter0:Clone()
1729
				Particlee.Parent = v
1730
				Particlee.Color = ColorSequence.new(v.BrickColor.Color)
1731
				whom.Torso.Anchored = true
1732
				Particlee.Enabled = true
1733
				CreateSound("1874339971", whom.Torso, 7, 1)
1734
				coroutine.wrap(function()
1735
					for i = 0,0.7,0.01 do
1736
						wait()
1737
						Head.face.Transparency = i
1738
						v.Transparency = i
1739
					end
1740
				
1741
					Particlee.Enabled = false
1742
					wait(5)
1743
					whom:Destroy()
1744
					Particlee:Destroy()
1745
					ParticleEmitter0:Destroy()
1746
					cors = {}
1747
				end)()
1748
			end
1749
		end
1750
	end
1751
end
1752
1753
--Attacks--
1754
1755
function change_gem()
1756
	imgl2.ImageTransparency = 1
1757
	circl.ImageTransparency = 0.12
1758
	ned.TextStrokeTransparency = 1
1759
	ned.TextTransparency = 1
1760
	CreateClientSound("847061203",workspace,3,1,0.7)
1761
	Swait(20)
1762
	circl.ImageTransparency = 1
1763
	imgl2.ImageTransparency = 0.435
1764
	ned.TextStrokeTransparency = 0
1765
	ned.TextTransparency = 0
1766
end
1767
1768
function SNAP()
1769
	ATTACK = true
1770
	Rooted = true
1771
	pumpk:Pause()
1772
	for i=0, 0.1, 0.1 / Animation_Speed do
1773
		Swait()
1774
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed)
1775
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1776
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(23)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1777
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) *  ANGLES(RAD(0), RAD(0), RAD(-23)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1778
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1779
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1780
	end
1781
	for i= 1, 3 do
1782
		Swait()
1783
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"Lilac",VT(i/3,i/3,0))
1784
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"New Yeller",VT(i/3,i/3,0))
1785
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"Bright green",VT(i/3,i/3,0))
1786
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"Bright Orange",VT(i/3,i/3,0))
1787
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"Eggplant",VT(i/3,i/3,0))
1788
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"Bright blue",VT(i/3,i/3,0))
1789
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"Really red",VT(i/3,i/3,0))
1790
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed)
1791
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1792
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(40)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1793
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) *  ANGLES(RAD(0), RAD(0), RAD(-23)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1794
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1795
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1796
	end
1797
	CreateSound("2930668938", workspace, 10, 1)
1798
	CreateSnapGui()
1799
	for i,v in pairs(workspace:GetChildren()) do
1800
		if v.ClassName == "Model" and v ~= Character then
1801
			BegoneByeModel(v)
1802
		end
1803
	end
1804
1805
	for i= 1, 6 do
1806
		Swait()
1807
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"Lilac",VT(i/3,i/3,0))
1808
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"New Yeller",VT(i/3,i/3,0))
1809
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"Bright green",VT(i/3,i/3,0))
1810
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"Bright Orange",VT(i/3,i/3,0))
1811
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"Eggplant",VT(i/3,i/3,0))
1812
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"Bright blue",VT(i/3,i/3,0))
1813
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"Really red",VT(i/3,i/3,0))
1814
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed)
1815
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1816
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1817
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) *  ANGLES(RAD(0), RAD(0), RAD(-23)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1818
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1819
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1820
	end
1821
	for i=0, 0.83, 1.5 / Animation_Speed do
1822
		Swait()
1823
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(20), RAD(0), RAD(20)), 0.15 / Animation_Speed)
1824
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1825
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(23)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1826
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) *  ANGLES(RAD(0), RAD(0), RAD(-23)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1827
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(20), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1828
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(20), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1829
	end
1830
	ATTACK = false
1831
	Rooted = false
1832
	pumpk:Resume()
1833
end
1834
1835
local punchallowed = false
1836
1837
function Punch()
1838
	ATTACK = true
1839
	Rooted = false
1840
	punchallowed = true
1841
	repeat
1842
	CreateSound("145487017", LeftArm, 3, .8)
1843
	for i = 1, 16 do
1844
		Swait()
1845
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(10), RAD(0), RAD(-89)), 0.15 / Animation_Speed)
1846
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1847
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1848
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) *  ANGLES(RAD(85), RAD(0), RAD(-17)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1849
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(7), RAD(0)), 0.15 / Animation_Speed)
1850
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(-7), RAD(0)), 0.15 / Animation_Speed)
1851
	end
1852
	Swait(5)
1853
	for i = 1, 10 do
1854
		Swait()
1855
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-22)), 0.15 / Animation_Speed)
1856
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1857
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1858
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) *  ANGLES(RAD(12), RAD(0), RAD(-4)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1859
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(7), RAD(0)), 0.15 / Animation_Speed)
1860
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(-7), RAD(0)), 0.15 / Animation_Speed)
1861
	end
1862
	Swait(5)
1863
	until HOLD == false
1864
	Swait(2)
1865
	ATTACK = false
1866
	Rooted = false
1867
	punchallowed = false
1868
end
1869
1870
LeftArm.Touched:connect(function(h)
1871
	if punchallowed == true then
1872
		if h.Parent ~= Character and h.Name ~= "Baseplate" and h.Name ~= "Base" then
1873
			h:BreakJoints()
1874
			h.Anchored = false
1875
			local vel = Instance.new("BodyVelocity", h)
1876
			if gem_mode == 1 or gem_mode == 2 or gem_mode == 3 or gem_mode == 6 then
1877
				CreateSound("2401098476", h, 9e999, 1)
1878
				vel.Velocity = h.CFrame.lookVector * -43
1879
			elseif gem_mode == 4 then
1880
				CreateSound("440145223", h, 3, 1)
1881
				vel.Velocity = h.CFrame.lookVector * -231
1882
				MagicSphere(VT(0.5,0.5,0.5),11,CF(h.Position),Color3.fromRGB(167, 94, 155),VT(0.6,0.6,0.6))
1883
				h.Color = Color3.fromRGB(137, 64, 135)
1884
			elseif gem_mode == 5 then
1885
				if h:FindFirstChild("Already Stopped") ~= nil then
1886
			return
1887
				end
1888
				h.Anchored = true
1889
				vel.Velocity = h.CFrame.lookVector * 0
1890
				MagicSphere(VT(0.8,0.8,0.8),11,CF(h.Position),Color3.fromRGB(75, 151, 75),VT(0.7,0.7,0.7))
1891
				h.Color = Color3.fromRGB(45, 131, 45)
1892
				TimeStopPart(h)
1893
			elseif gem_mode == 7 then
1894
				CreateSound("138210320", h, 3, 1)
1895
				vel.Velocity = h.CFrame.lookVector * -666
1896
				MagicSphere(VT(0.8,0.8,0.8),11,CF(h.Position),Color3.fromRGB(255, 255, 0),VT(0.7,0.7,0.7))
1897
			end
1898
			vel.MaxForce = VT(math.huge,math.huge,math.huge)
1899
			if gem_mode == 7 then
1900
				Swait(10)
1901
			else
1902
				Swait(3)
1903
			end
1904
			Swait(3)
1905
			if gem_mode == 7 then
1906
				h:Destroy()
1907
			else
1908
				vel:Destroy()
1909
			end
1910
		end
1911
	end
1912
end)
1913
1914
function Space_Teleport()
1915
	ATTACK = true
1916
	Rooted = true
1917
	local POS = VT(RootPart.Position.X, Mouse.Hit.p.Y + 6, RootPart.Position.Z)
1918
	local ROOT = CreatePart(3, Effects, "Neon", 0, 1, "Really yellow", "Warphole", VT(0, 0, 0))
1919
	
1920
	local SpacePortal = script.ThanosPortal:Clone()
1921
	SpacePortal.CFrame = RootPart.CFrame * CF(0, 0, -3) * ANGLES(RAD(0), RAD(0), RAD(0))
1922
	
1923
	local SpacePortal2 = script.ThanosPortal:Clone()
1924
	SpacePortal2.CFrame = CF(Mouse.Hit.p + VT(0, 6, 0), POS) * ANGLES(RAD(0), RAD(0), RAD(0))
1925
	
1926
	ROOT.CFrame = CF(SpacePortal2.Position, RootPart.Position)
1927
	
1928
	SpacePortal.Parent = Effects
1929
	SpacePortal2.Parent = Effects
1930
	
1931
	CreateSound("1127492102", RootPart, 10, 0.7)
1932
	CreateSound("1127492102", RootPart, 10, 0.7)
1933
	for i = 1, 75 do
1934
		Swait()
1935
		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)
1936
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1937
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(19.7)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1938
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) *  ANGLES(RAD(90), RAD(0), RAD(-17)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1939
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(7), RAD(0)), 0.15 / Animation_Speed)
1940
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(-7), RAD(0)), 0.15 / Animation_Speed)
1941
	end
1942
	VALUE1 = true
1943
	for i = 1, 15 do
1944
		Transparency(i / 15)
1945
		Swait()
1946
		RootPart.CFrame = RootPart.CFrame * CF(0, 0, -0.13)
1947
		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)
1948
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1949
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-90 * COS(SINE / 12)), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1950
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90 * COS(SINE / 12)), RAD(0), RAD(-30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1951
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0.2) * ANGLES(RAD(90 * COS(SINE / 12)), RAD(90), RAD(0)), 1)
1952
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0.2) * ANGLES(RAD(-90 * COS(SINE / 12)), RAD(-90), RAD(0)), 1)
1953
	end
1954
	RootPart.CFrame = ROOT.CFrame
1955
	ROOT:remove()
1956
	for i = 1, 15 do
1957
		Transparency(1 - i / 15)
1958
		Swait()
1959
		RootPart.CFrame = RootPart.CFrame * CF(0, 0, -0.5)
1960
		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)
1961
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1962
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-90 * COS(SINE / 12)), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1963
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90 * COS(SINE / 12)), RAD(0), RAD(-30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1964
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0.2) * ANGLES(RAD(90 * COS(SINE / 12)), RAD(90), RAD(0)), 1)
1965
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0.2) * ANGLES(RAD(-90 * COS(SINE / 12)), RAD(-90), RAD(0)), 1)
1966
	end
1967
	VALUE1 = false
1968
	coroutine.resume(coroutine.create(function()
1969
		for i = 1, 75 do
1970
			Swait()
1971
			SpacePortal.CFrame = SpacePortal.CFrame * ANGLES(RAD(0), RAD(i), RAD(0))
1972
			SpacePortal2.CFrame = SpacePortal2.CFrame * ANGLES(RAD(0), RAD(i), RAD(0))
1973
		end
1974
		SpacePortal:remove()
1975
		SpacePortal2:remove()
1976
	end))
1977
	ATTACK = false
1978
	Rooted = false
1979
end
1980
1981
function Portal_Disapear()
1982
	ATTACK = true
1983
	Rooted = false
1984
	if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChild("HumanoidRootPart") ~= nil then
1985
		local SpacePortal = script.ThanosPortal:Clone()
1986
		SpacePortal.CFrame = Mouse.Target.Parent.HumanoidRootPart * CF(0, 0, -3) * ANGLES(RAD(0), RAD(90), RAD(0))
1987
	end
1988
	ATTACK = false
1989
	Rooted = false
1990
end
1991
1992
function AreaPower()
1993
	ATTACK = true
1994
	Rooted = true
1995
	CreateSound("384105511",Torso,10,.85)
1996
	for i = 1, 25 do
1997
		Swait()
1998
		CreateRing(VT(0,0,0),false,0,5,RootPart.CFrame*ANGLES(RAD(0),RAD(90),RAD(0)),"Lilac",VT(i/5,i/5,0))
1999
		CreateRing(VT(0,0,0),false,0,5,RootPart.CFrame*ANGLES(RAD(0),RAD(0),RAD(0)),"Lilac",VT(i/5,i/5,0))
2000
		CreateRing(VT(0,0,0),false,0,25,RootPart.CFrame*ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),"Plum",VT(i/3,i/3,0))
2001
		killnearest(RootPart.Position, 40, 100)
2002
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-3), RAD(0), RAD(-12)), 0.15 / Animation_Speed)
2003
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
2004
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-4), RAD(0), RAD(11)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
2005
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) *  ANGLES(RAD(160), RAD(20), RAD(-90)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
2006
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(7), RAD(0)), 0.15 / Animation_Speed)
2007
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(-7), RAD(0)), 0.15 / Animation_Speed)
2008
	end
2009
	ATTACK = false
2010
	Rooted = false
2011
end
2012
2013
function Laser()
2014
    ATTACK = true
2015
    Rooted = false
2016
       repeat
2017
       local GYRO = IT("BodyGyro",RootPart)
2018
        GYRO.D = 175
2019
        GYRO.P = 20000
2020
        GYRO.MaxTorque = VT(0,40000,0)
2021
        GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
2022
            for i=0, 0.0, 0.1 / Animation_Speed do
2023
                Swait()
2024
                GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
2025
		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)
2026
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
2027
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(19.7)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
2028
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) *  ANGLES(RAD(170), RAD(MRANDOM(10,20)), RAD(MRANDOM(10,20))) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
2029
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(7), RAD(0)), 0.15 / Animation_Speed)
2030
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(-7), RAD(0)), 0.15 / Animation_Speed)
2031
        end
2032
       RealityBeam(LeftArm.Position,Mouse.Hit.p,true)
2033
            WACKYEFFECT({Time = 25, EffectType = "Block", Size = VT(0.3,0,0.3), Size2 = VT(0.3,0.3,0.3), Transparency = 0, Transparency2 = 1, CFrame = LeftArm.CFrame, MoveToPos = LeftArm.CFrame*CF(0,0.5,0).p, RotationX = 0, RotationY = 15, RotationZ = 0, Material = "Neon", Color = Color3.fromRGB(255, 89, 89), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
2034
           GYRO:remove()
2035
    ATTACK = false
2036
    Rooted = false
2037
    until KEYHOLD == false
2038
end
2039
2040
function Begone()
2041
	ATTACK = true
2042
	Rooted = true
2043
	if Mouse.Target.Parent ~= Character and Mouse.Target:FindFirstChildOfClass("Part") ~= nil then
2044
		local TORSO = Mouse.Target:FindFirstChildOfClass("Part")
2045
		if TORSO then
2046
			local GYRO = IT("BodyGyro", RootPart)
2047
			GYRO.D = 750
2048
			GYRO.P = 2000
2049
			GYRO.MaxTorque = VT(0, 40000, 0)
2050
			for i = 0, 0.3, 0.1 / Animation_Speed do
2051
				Swait()
2052
				GYRO.cframe = CF(RootPart.Position, TORSO.Position)
2053
				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)
2054
				Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1*SIZE) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
2055
				LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25*SIZE, 0.5*SIZE, 0.5*SIZE) * ANGLES(RAD(-35), RAD(25 - 2.5 * SIN(SINE / 12)), RAD(55 - 2.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
2056
				RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
2057
				LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
2058
				RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.6, 0.75, -0.5) * ANGLES(RAD(0), RAD(-25), RAD(12)) * ANGLES(RAD(125 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1.5 / Animation_Speed)
2059
				if ANIM == "Idle" then
2060
					RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
2061
					LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
2062
				elseif ANIM == "Walk" then
2063
					RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-25 - 2.5 * SIN(SINE / 22)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 5.5 * SIN(SINE / 22)), RAD(0), RAD(0)), 1 / Animation_Speed)
2064
					LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 22)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 22)), RAD(0), RAD(0)), 1 / Animation_Speed)
2065
				elseif ANIM == "Jump" or ANIM == "Fall" then
2066
					RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
2067
					LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
2068
				end
2069
			end
2070
			GYRO:remove()
2071
			CreateSound("1874339971", TORSO, 10, 1)
2072
			BegoneBye(TORSO)
2073
			for i = 0, 0.25, 0.1 / Animation_Speed do
2074
				Swait()
2075
				GYRO.cframe = CF(RootPart.Position, TORSO.Position)
2076
				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)
2077
				Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1*SIZE) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
2078
				LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25*SIZE, 0.5*SIZE, 0.5*SIZE) * ANGLES(RAD(-35), RAD(25 - 2.5 * SIN(SINE / 12)), RAD(55 - 2.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
2079
				RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
2080
				LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)		
2081
				RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1, 0.5, 0.5) * ANGLES(RAD(0), RAD(-45), RAD(12)) * ANGLES(RAD(45 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.75 / Animation_Speed)
2082
			end
2083
		end
2084
	end
2085
	ATTACK = false
2086
	Rooted = false
2087
end
2088
2089
function Timestopper()
2090
	ATTACK = true
2091
	Rooted = false
2092
	if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChild("HumanoidRootPart") ~= nil then
2093
		CreateSound("384105511",RootPart,3.3,1)
2094
		for i = 1, 25 do
2095
		Swait()
2096
		CreateRing(VT(0,0,0),false,0,5,LeftArm.CFrame*ANGLES(RAD(0),RAD(90),RAD(0)),"Camo",VT(i/7.5,i/7.5,0))
2097
		CreateRing(VT(0,0,0),false,0,5,LeftArm.CFrame*ANGLES(RAD(0),RAD(0),RAD(0)),"Camo",VT(i/7.5,i/7.5,0))
2098
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-3), RAD(0), RAD(-12)), 0.15 / Animation_Speed)
2099
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
2100
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-4), RAD(0), RAD(11)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
2101
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) *  ANGLES(RAD(94), RAD(12), RAD(-70)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
2102
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(7), RAD(0)), 0.15 / Animation_Speed)
2103
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(-7), RAD(0)), 0.15 / Animation_Speed)
2104
	end
2105
		local TORSO = Mouse.Target.Parent:FindFirstChild("HumanoidRootPart")
2106
		local bex = IT("Part")
2107
		bex.Parent = Effects
2108
		bex.Orientation = VT(TORSO.Orientation)
2109
		bex.Size = VT(0.001,0.001,0.001)
2110
		bex.Transparency = 1
2111
		bex.CFrame = CF(TORSO.Position)
2112
		bex.CanCollide = false
2113
		bex.Name = "" ..math.random(10000,99999)
2114
		bex.Anchored = true
2115
		local wed = IT("Weld")
2116
		wed.Parent = bex
2117
		wed.Part0 = bex
2118
		wed.Part1 = TORSO
2119
		CreateSound("2099904460", bex, 0.7, MRANDOM(7, 12) / 10)
2120
		CreateModelSelectionBox(TORSO.Parent, 0.123, Color3.fromRGB(75, 151, 75), 0, nil, nil)
2121
	end
2122
	ATTACK = false
2123
	Rooted = false
2124
end
2125
2126
function FullPowerBlast()
2127
	ATTACK = true
2128
	Rooted = true
2129
	CreateSound("581516887",Torso,2,0.88)
2130
	for i=0, 1.5, 0.1 / Animation_Speed do
2131
		Swait()
2132
		turnto(Mouse.Hit.p)
2133
		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)
2134
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
2135
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(19.7)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
2136
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) *  ANGLES(RAD(90), RAD(0), RAD(-17)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
2137
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(7), RAD(0)), 0.15 / Animation_Speed)
2138
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(-7), RAD(0)), 0.15 / Animation_Speed)
2139
	end
2140
	for i = 1, 50 do
2141
		Swait()
2142
	end
2143
	local LOOP = 0
2144
	local BEAM1 = CreatePart(3, Effects, "Neon", 0, 0, BRICKC("Lilac"), "Beamo", VT(0,0,0))
2145
	MakeForm(BEAM1, "Ball")
2146
	local BEAM2 = CreatePart(3, Effects, "Neon", 0, 0, BRICKC("Lilac"), "Beame", VT(0,0,0))
2147
	MakeForm(BEAM2, "Ball")
2148
	local BEAM = CreatePart(3, Effects, "Neon", 0, 0, BRICKC("Lilac"), "Beam", VT(0, 0, 0), true)
2149
	MakeForm(BEAM, "Cyl")
2150
	CreateSound("1146690130",BEAM1,4,0.83)
2151
	local beamsound = IT("Sound")
2152
	beamsound.SoundId = "rbxassetid://1447681819"
2153
	beamsound.Looped = true
2154
	beamsound.Volume = 5
2155
	beamsound.Parent = BEAM
2156
	beamsound:Play()
2157
	repeat
2158
		local DISTANCE = (RightArm.Position - Mouse.Hit.p).Magnitude
2159
		if gem_mode == 7 then
2160
			TweenService:Create(BEAM,TweenInfo.new(1),{Color = Colours[Int]}):Play()
2161
			TweenService:Create(BEAM1,TweenInfo.new(1),{Color = Colours[Int]}):Play()
2162
			TweenService:Create(BEAM2,TweenInfo.new(1),{Color = Colours[Int]}):Play()
2163
		end
2164
		if gem_mode == 7 and Mouse.Target.Name ~= "Baseplate" and Mouse.Target.Name ~= "Base" then
2165
			Mouse.Target:Destroy()
2166
		elseif gem_mode ~= 7 and Mouse.Target.Name ~= "Baseplate" and Mouse.Target.Name ~= "Base" then
2167
			Mouse.Target:BreakJoints()
2168
		end
2169
		if DISTANCE < 2000 then
2170
			BEAM1.Size = VT(2.5 + 0.5 * COS(SINE / 8),  2.5 + 0.5 * COS(SINE / 8), 2.5 + 0.5 * COS(SINE / 8))
2171
	        BEAM1.CFrame = CF(LeftArm.Position)
2172
			BEAM2.Size = VT(2.5 + 0.5 * COS(SINE / 8),  2.5 + 0.5 * COS(SINE / 8), 2.5 + 0.5 * COS(SINE / 8))
2173
	        BEAM2.CFrame = CF(Mouse.Hit.p)
2174
			BEAM.Size = VT(2 + 0.25 * COS(SINE / 8), DISTANCE, 2 + 0.25 * COS(SINE / 8))
2175
			BEAM.CFrame = CF(LeftArm.Position, Mouse.Hit.p) * CF(0, 0, -DISTANCE / 2) * ANGLES(RAD(90), RAD(0), RAD(0))
2176
			Swait()
2177
			LOOP = LOOP + 1
2178
		end
2179
	until KEYHOLD == false and LOOP >= 35 or DISTANCE >= 2000
2180
	coroutine.resume(coroutine.create(function()
2181
		for i = 1, 15 do
2182
			Swait()
2183
			BEAM.Size = BEAM.Size - VT(0.1, 0, 0.1)
2184
			BEAM1.Size = BEAM1.Size - VT(0.1, 0.1, 0.1)
2185
			BEAM2.Size = BEAM2.Size - VT(0.1, 0.1, 0.1)
2186
			BEAM.Transparency = BEAM.Transparency + 0.06666666666666667
2187
			BEAM1.Transparency = BEAM1.Transparency + 0.06666666666666667
2188
			BEAM2.Transparency = BEAM2.Transparency + 0.06666666666666667
2189
		end
2190
		BEAM:remove()
2191
		BEAM1:remove()
2192
		BEAM2:remove()
2193
	end))
2194
	ATTACK = false
2195
	Rooted = false
2196
end
2197
2198
function MouseDown(Mouse)
2199
	HOLD = true
2200
	if ATTACK == false then
2201
		Punch()
2202
	end
2203
end
2204
2205
function MouseUp(Mouse)
2206
	HOLD = false
2207
end
2208
2209
function KeyDown(Key)
2210
	KEYHOLD = true
2211
	if(Key == "z" and ATTACK == false)then
2212
		if gem_mode == 1 then
2213
			
2214
		end
2215
		if gem_mode == 2 then
2216
			Laser()
2217
		end
2218
		if gem_mode == 3 then
2219
			
2220
		end
2221
		if gem_mode == 4 then
2222
			FullPowerBlast()
2223
		end
2224
		if gem_mode == 5 then
2225
			Timestopper()
2226
		end
2227
		if gem_mode == 6 then
2228
			
2229
		end
2230
		if gem_mode == 7 then
2231
			SNAP()
2232
		end
2233
	end
2234
2235
	if(Key == "x" and ATTACK == false)then
2236
		if gem_mode == 1 then
2237
			
2238
		end
2239
		if gem_mode == 2 then
2240
			
2241
		end
2242
		if gem_mode == 3 then
2243
			Space_Teleport()
2244
		end
2245
		if gem_mode == 4 then
2246
			AreaPower()
2247
		end
2248
		if gem_mode == 5 then
2249
			
2250
		end
2251
		if gem_mode == 6 then
2252
			
2253
		end
2254
		if gem_mode == 7 then
2255
			FullPowerBlast()
2256
		end
2257
	end
2258
2259
	if(Key == "c" and ATTACK == false)then
2260
		if gem_mode == 1 then
2261
			
2262
		end
2263
		if gem_mode == 2 then
2264
			
2265
		end
2266
		if gem_mode == 3 then
2267
			
2268
		end
2269
		if gem_mode == 4 then
2270
			
2271
		end
2272
		if gem_mode == 5 then
2273
			
2274
		end
2275
		if gem_mode == 6 then
2276
			
2277
		end
2278
		if gem_mode == 7 then
2279
			
2280
		end
2281
	end
2282
2283
	if(Key == "one" and ATTACK == false and gem_mode ~= 1)then
2284
		change_gem()
2285
		gem_mode = 1 --Soul
2286
	end
2287
2288
	if(Key == "two" and ATTACK == false and gem_mode ~= 2)then
2289
		change_gem()
2290
		gem_mode = 2 --Reality
2291
	end
2292
2293
	if(Key == "three" and ATTACK == false and gem_mode ~= 3)then
2294
		change_gem()
2295
		gem_mode = 3 --Space
2296
	end
2297
2298
	if(Key == "four" and ATTACK == false and gem_mode ~= 4)then
2299
		change_gem()
2300
		gem_mode = 4 --Power
2301
	end
2302
2303
	if(Key == "five" and ATTACK == false and gem_mode ~= 5)then
2304
		change_gem()
2305
		gem_mode = 5 --Time
2306
	end
2307
2308
	if(Key == "six" and ATTACK == false and gem_mode ~= 6)then
2309
		change_gem()
2310
		gem_mode = 6 --Mind
2311
	end
2312
2313
	if(Key == "seven" and ATTACK == false and gem_mode ~= 7)then
2314
		change_gem()
2315
		gem_mode = 7 --Every
2316
	end
2317
end
2318
2319
function KeyUp(Key)
2320
	KEYHOLD = false
2321
end
2322
2323
	Mouse.Button1Down:connect(function(NEWKEY)
2324
		MouseDown(NEWKEY)
2325
	end)
2326
	Mouse.Button1Up:connect(function(NEWKEY)
2327
		MouseUp(NEWKEY)
2328
	end)
2329
	Mouse.KeyDown:connect(function(NEWKEY)
2330
		KeyDown(NEWKEY)
2331
	end)
2332
	Mouse.KeyUp:connect(function(NEWKEY)
2333
		KeyUp(NEWKEY)
2334
	end)
2335
2336
2337
function unanchor()
2338
		local g = Character:GetChildren()
2339
		for i = 1, #g do
2340
			if g[i].ClassName == "Part" then
2341
				g[i].Anchored = false
2342
			end
2343
		end
2344
end
2345
2346
Humanoid.Changed:connect(function(Jump)
2347
	if Jump == "Jump" and (Disable_Jump == true) then
2348
		Humanoid.Jump = false
2349
	end
2350
end)
2351
2352
spawn(function()
2353
	while wait(0.64) do
2354
		Swait()
2355
		--[[
2356
		Swait(6)
2357
		ChangeColorNumber = 1
2358
		Swait(6)
2359
		ChangeColorNumber = 2
2360
		Swait(6)
2361
		ChangeColorNumber = 3
2362
		Swait(6)
2363
		ChangeColorNumber = 4
2364
		Swait(6)
2365
		ChangeColorNumber = 5
2366
		Swait(6)
2367
		ChangeColorNumber = 6
2368
		]]
2369
		if gem_mode == 7 then
2370
			if Int == #Colours then Int = 0 end
2371
			Int = Int+1
2372
			TweenService:Create(ned,TweenInfo.new(1),{TextColor3 = Colours[Int]}):Play()
2373
			TweenService:Create(ned,TweenInfo.new(1),{TextStrokeColor3 = Colours2[Int]}):Play()
2374
		end
2375
	end
2376
end)
2377
2378
CreateOutfit()
2379
CreateShield()
2380
2381
while true do
2382
	Swait()
2383
	refit()
2384
	ANIMATE.Parent = nil
2385
	for _,v in next, Humanoid:GetPlayingAnimationTracks() do
2386
	    v:Stop();
2387
	end
2388
	SINE = SINE + CHANGE
2389
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
2390
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
2391
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
2392
	local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
2393
	if ANIM == "Walk" and TORSOVELOCITY > 1 then
2394
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2395
		Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2396
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.3 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2397
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.3 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2398
	elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
2399
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2400
		Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2401
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2402
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2403
	end
2404
	if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
2405
		ANIM = "Jump"
2406
		if ATTACK == false then
2407
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2408
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2409
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
2410
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
2411
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
2412
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
2413
	    end
2414
	elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
2415
		ANIM = "Fall"
2416
		if ATTACK == false then
2417
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2418
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2419
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(100), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
2420
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-100), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
2421
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
2422
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
2423
		end
2424
	elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
2425
		ANIM = "Idle"
2426
		if ATTACK == false then
2427
			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)
2428
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
2429
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(23)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
2430
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) *  ANGLES(RAD(0), RAD(0), RAD(-23)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
2431
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(7), RAD(0)), 0.15 / Animation_Speed)
2432
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(-7), RAD(0)), 0.15 / Animation_Speed)
2433
		end
2434
	elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
2435
		ANIM = "Walk"
2436
		if ATTACK == false then
2437
			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)
2438
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
2439
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-90 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
2440
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
2441
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0.2) * ANGLES(RAD(90 * COS(SINE / WALKSPEEDVALUE)), RAD(90), RAD(0)), 1)
2442
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0.2) * ANGLES(RAD(-90 * COS(SINE / WALKSPEEDVALUE)), RAD(-90), RAD(0)), 1)
2443
		end
2444
	end
2445
	circl.Rotation = circl.Rotation - 0.14 + 1.5
2446
	if gem_mode == 7 then
2447
        	ned.Rotation = 0 -2 * math.cos(SINE / 1) + math.random(-3,3)
2448
        	ned.Position = UDim2.new(0.7,0 + math.random(-3,3),0.8,0 + math.random(-3,3)) 
2449
	else
2450
        	ned.Rotation = 0 - 2 * math.cos(SINE / 24)
2451
        	ned.Position = UDim2.new(0.7,0 - 10 * math.cos(SINE / 32),0.8,0 - 10 * math.cos(SINE / 45))
2452
	end
2453
	if Weld == nil then
2454
		local Weld = CreateWeldOrSnapOrMotor("Weld", Gauntlet, LeftArm, Gauntlet, CF(0.265, -0.54, 0) * ANGLES(RAD(330), RAD(0), RAD(20)), CF(0, 0, 0))
2455
	end
2456
	unanchor()
2457
	if workspace:FindFirstChild("BulletShield") == nil then
2458
		CreateShield()
2459
	end
2460
	if gem_mode == 1 then
2461
		imgl2.Image = "rbxassetid://2480004800"
2462
		ned.Text = "Soul Gem"
2463
		ned.TextStrokeColor3 = BrickColor.new("Gold").Color
2464
		ned.TextColor3 = BrickColor.new("Bright orange").Color
2465
	end
2466
	if gem_mode == 2 then
2467
        	imgl2.Image = "rbxassetid://2480005731"
2468
		ned.Text = "Reality Gem"
2469
		ned.TextStrokeColor3 = BrickColor.new("Really red").Color
2470
		ned.TextColor3 = BrickColor.new("Persimmon").Color
2471
	end
2472
    if gem_mode == 3 then
2473
        	imgl2.Image = "rbxassetid://2480007159"
2474
		ned.Text = "Space Gem"
2475
		ned.TextStrokeColor3 = BrickColor.new("Bright blue").Color
2476
		ned.TextColor3 = BrickColor.new("Teal").Color
2477
    end
2478
    if gem_mode == 4 then
2479
        	imgl2.Image = "rbxassetid://2480007882"
2480
		ned.Text = "Power Gem"
2481
		ned.TextStrokeColor3 = BrickColor.new("Bright reddish lilac").Color
2482
		ned.TextColor3 = BrickColor.new("Eggplant").Color
2483
    end
2484
    if gem_mode == 5 then
2485
        	imgl2.Image = "rbxassetid://2480008988"
2486
		ned.Text = "Time Gem"
2487
		ned.TextStrokeColor3 = BrickColor.new("Olivine").Color
2488
		ned.TextColor3 = BrickColor.new("Mint").Color
2489
    	end
2490
    if gem_mode == 6 then
2491
        	imgl2.Image = "rbxassetid://2480009679"
2492
		ned.Text = "Mind Gem"
2493
		ned.TextStrokeColor3 = BrickColor.new("New Yeller").Color
2494
		ned.TextColor3 = BrickColor.new("Bright yellow").Color
2495
    end
2496
    if gem_mode == 7 then
2497
        	imgl2.Image = "rbxassetid://2481697056"
2498
		ned.Text = "Every Gem"
2499
		--ned.TextStrokeColor3 = BrickColor.new(EveryStroke[ChangeColorNumber]).Color
2500
		--ned.TextColor3 = BrickColor.new(EveryColor[ChangeColorNumber]).Color
2501
    end
2502
    	Humanoid.MaxHealth = 1e99999
2503
    	Humanoid.Health = Humanoid.Health + 1e9999
2504
    if Rooted == false then
2505
       	Disable_Jump = false
2506
       	Humanoid.WalkSpeed = Speed
2507
    elseif Rooted == true then
2508
       	Disable_Jump = true
2509
       	Humanoid.WalkSpeed = 0
2510
    end
2511
end