View difference between Paste ID: 0NdhFLE5 and y7htJsS5
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
local Player,game,owner = owner,game
3
local RealPlayer = Player
4
do
5
	print("FE Compatibility code by Mokiros")
6
	local rp = RealPlayer
7
	script.Parent = rp.Character
8
	
9
	--RemoteEvent for communicating
10
	local Event = Instance.new("RemoteEvent")
11
	Event.Name = "UserInput_Event"
12
13
	--Fake event to make stuff like Mouse.KeyDown work
14
	local function fakeEvent()
15
		local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
16
		t.connect = t.Connect
17
		return t
18
	end
19
20
	--Creating fake input objects with fake variables
21
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
22
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
23
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
24
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
25
	end}
26
	--Merged 2 functions into one by checking amount of arguments
27
	CAS.UnbindAction = CAS.BindAction
28
29
	--This function will trigger the events that have been :Connect()'ed
30
	local function te(self,ev,...)
31
		local t = m[ev]
32
		if t and t._fakeEvent then
33
			for _,f in pairs(t.Functions) do
34
				f(...)
35
			end
36
		end
37
	end
38
	m.TrigEvent = te
39
	UIS.TrigEvent = te
40
41
	Event.OnServerEvent:Connect(function(plr,io)
42
	    if plr~=rp then return end
43
		m.Target = io.Target
44
		m.Hit = io.Hit
45
		if not io.isMouse then
46
			local b = io.UserInputState == Enum.UserInputState.Begin
47
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
48
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
49
			end
50
			for _,t in pairs(CAS.Actions) do
51
				for _,k in pairs(t.Keys) do
52
					if k==io.KeyCode then
53
						t.Function(t.Name,io.UserInputState,io)
54
					end
55
				end
56
			end
57
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
58
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
59
	    end
60
	end)
61
	Event.Parent = NLS([==[
62
	local Player = game:GetService("Players").LocalPlayer
63
	local Event = script:WaitForChild("UserInput_Event")
64
65
	local Mouse = Player:GetMouse()
66
	local UIS = game:GetService("UserInputService")
67
	local input = function(io,a)
68
		if a then return end
69
		--Since InputObject is a client-side instance, we create and pass table instead
70
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
71
	end
72
	UIS.InputBegan:Connect(input)
73
	UIS.InputEnded:Connect(input)
74
75
	local h,t
76
	--Give the server mouse data 30 times every second, but only if the values changed
77
	--If player is not moving their mouse, client won't fire events
78
	while wait(1/30) do
79
		if h~=Mouse.Hit or t~=Mouse.Target then
80
			h,t=Mouse.Hit,Mouse.Target
81
			Event:FireServer({isMouse=true,Target=t,Hit=h})
82
		end
83
	end]==],Player.Character)
84
85
	----Sandboxed game object that allows the usage of client-side methods and services
86
	--Real game object
87
	local _rg = game
88
89
	--Metatable for fake service
90
	local fsmt = {
91
		__index = function(self,k)
92
			local s = rawget(self,"_RealService")
93
			if s then return s[k] end
94
		end,
95
		__newindex = function(self,k,v)
96
			local s = rawget(self,"_RealService")
97
			if s then s[k]=v end
98
		end,
99
		__call = function(self,...)
100
			local s = rawget(self,"_RealService")
101
			if s then return s(...) end
102
		end
103
	}
104
	local function FakeService(t,RealService)
105
		t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
106
		return setmetatable(t,fsmt)
107
	end
108
109
	--Fake game object
110
	local g = {
111
		GetService = function(self,s)
112
			return self[s]
113
		end,
114
		Players = FakeService({
115
			LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
116
		},"Players"),
117
		UserInputService = FakeService(UIS,"UserInputService"),
118
		ContextActionService = FakeService(CAS,"ContextActionService"),
119
	}
120
	rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
121
	g.service = g.GetService
122
	
123
	g.RunService = FakeService({
124
		RenderStepped = _rg:GetService("RunService").Heartbeat,
125
		BindToRenderStep = function(self,name,_,fun)
126
127
		end,
128
		UnbindFromRenderStep = function(self,name)
129
			self._btrs[name]:Disconnect()
130
		end,
131
	},"RunService")
132
133
	setmetatable(g,{
134
		__index=function(self,s)
135
			return _rg:GetService(s) or typeof(_rg[s])=="function"
136
			and function(_,...)return _rg[s](_rg,...)end or _rg[s]
137
		end,
138
		__newindex = fsmt.__newindex,
139
		__call = fsmt.__call
140
	})
141
	--Changing owner to fake player object to support owner:GetMouse()
142
	game,owner = g,g.Players.LocalPlayer
143
end
144
----------------------------------------------------------
145
-- Created by Nebula_Zorua --
146
-- Sans Curse (A Curse of Light) --
147
-- Custom Arcane Adventures Magic --
148
-- Wielder: Everybody (Released) --
149
-- Why the fuck did I make this --
150
-- I don't even LIKE undertale --
151
-- what the fuck --
152
153
-- Discord: Nebula the Zorua#6969
154
-- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA
155
156
-- You can change the Magic Circle n stuff down under Customization, at MagicVariant --
157
158
159
--// Shortcut Variables \\--
160
local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
161
local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
162
local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
163
local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
164
local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge,RRNG = function(min,max,div) return math.rad(math.random(min,max)/(div or 1)) end}
165
local R3 = {N=Region3.new}
166
local De = S.Debris
167
local WS = workspace
168
local Lght = S.Lighting
169
local RepS = S.ReplicatedStorage
170
local IN = Instance.new
171
local Plrs = S.Players
172
173
local Emit = IN("ParticleEmitter").Emit;
174
175
--// Initializing \\--
176
local Plr = Plrs.LocalPlayer
177
local Char = Plr.Character
178
local Hum = Char:FindFirstChildOfClass'Humanoid'
179
local RArm = Char["Right Arm"]
180
local LArm = Char["Left Arm"]
181
local RLeg = Char["Right Leg"]
182
local LLeg = Char["Left Leg"]	
183
local Root = Char:FindFirstChild'HumanoidRootPart'
184
local Torso = Char.Torso
185
local Head = Char.Head
186
local NeutralAnims = true
187
local Attack = false
188
local Debounces = {Debounces={}}
189
local Mouse = Plr:GetMouse()
190
local Hit = {}
191
local Sine = 0
192
local Change = 1
193
194
local Effects = IN("Folder",Char)
195
Effects.Name = "Effects"
196
197
198
--// Debounce System \\--
199
200
201
function Debounces:New(name,cooldown)
202
	local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
203
	setmetatable(aaaaa,{__index = Debounces})
204
	Debounces.Debounces[name] = aaaaa
205
	return aaaaa
206
end
207
208
function Debounces:Use(overrideUsable)
209
	assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
210
	if(self.Usable or overrideUsable)then
211
		self.Usable = false
212
		self.CoolingDown = true
213
		local LastUse = time()
214
		self.LastUse = LastUse
215
		delay(self.Cooldown or 2,function()
216
			if(self.LastUse == LastUse)then
217
				self.CoolingDown = false
218
				self.Usable = true
219
			end
220
		end)
221
	end
222
end
223
224
function Debounces:Get(name)
225
	assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
226
	for i,v in next, Debounces.Debounces do
227
		if(i == name)then
228
			return v;
229
		end
230
	end
231
end
232
233
function Debounces:GetProgressPercentage()
234
	assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
235
	if(self.CoolingDown and not self.Usable)then
236
		return math.max(
237
			math.floor(
238
				(
239
					(time()-self.LastUse)/self.Cooldown or 2
240
				)*100
241
			)
242
		)
243
	else
244
		return 100
245
	end
246
end
247
248
--// Instance Creation Functions \\--
249
250
function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
251
	local Sound = IN("Sound")
252
	Sound.SoundId = "rbxassetid://".. tostring(id or 0)
253
	Sound.Pitch = pitch or 1
254
	Sound.Volume = volume or 1
255
	Sound.Looped = looped or false
256
	if(autoPlay)then
257
		coroutine.wrap(function()
258
			repeat wait() until Sound.IsLoaded
259
			Sound.Playing = autoPlay or false
260
		end)()
261
	end
262
	if(not looped and effect)then
263
		Sound.Stopped:connect(function()
264
			Sound.Volume = 0
265
			Sound:destroy()
266
		end)
267
	elseif(effect)then
268
		warn("Sound can't be looped and a sound effect!")
269
	end
270
	Sound.Parent =parent or Torso
271
	return Sound
272
end
273
function Part(parent,color,material,size,cframe,anchored,cancollide)
274
	local part = IN("Part")
275
	part.Parent = parent or Char
276
	part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
277
	part.Material = material or Enum.Material.SmoothPlastic
278
	part.TopSurface,part.BottomSurface=10,10
279
	part.Size = size or V3.N(1,1,1)
280
	part.CFrame = cframe or CF.N(0,0,0)
281
	part.CanCollide = cancollide or false
282
	part.Anchored = anchored or false
283
	return part
284
end
285
286
function Weld(part0,part1,c0,c1)
287
	local weld = IN("Weld")
288
	weld.Parent = part0
289
	weld.Part0 = part0
290
	weld.Part1 = part1
291
	weld.C0 = c0 or CF.N()
292
	weld.C1 = c1 or CF.N()
293
	return weld
294
end
295
296
function Mesh(parent,meshtype,meshid,textid,scale,offset)
297
	local part = IN("SpecialMesh")
298
	part.MeshId = meshid or ""
299
	part.TextureId = textid or ""
300
	part.Scale = scale or V3.N(1,1,1)
301
	part.Offset = offset or V3.N(0,0,0)
302
	part.MeshType = meshtype or Enum.MeshType.Sphere
303
	part.Parent = parent
304
	return part
305
end
306
307
NewInstance = function(instance,parent,properties)
308
	local inst = Instance.new(instance)
309
	inst.Parent = parent
310
	if(properties)then
311
		for i,v in next, properties do
312
			pcall(function() inst[i] = v end)
313
		end	
314
	end
315
	return inst;
316
end
317
318
function Clone(instance,parent,properties)
319
	local inst = instance:Clone()
320
	inst.Parent = parent
321
	if(properties)then
322
		for i,v in next, properties do
323
			pcall(function() inst[i] = v end)
324
		end
325
	end
326
	return inst;
327
end
328
329
function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf)
330
	local soundPart = NewInstance("Part",Effects,{Transparency=1,CFrame=cf or Torso.CFrame,Anchored=true,CanCollide=false,Size=V3.N()})
331
	local Sound = IN("Sound")
332
	Sound.SoundId = "rbxassetid://".. tostring(id or 0)
333
	Sound.Pitch = pitch or 1
334
	Sound.Volume = volume or 1
335
	Sound.Looped = looped or false
336
	if(autoPlay)then
337
		coroutine.wrap(function()
338
			repeat wait() until Sound.IsLoaded
339
			Sound.Playing = autoPlay or false
340
		end)()
341
	end
342
	if(not looped and effect)then
343
		Sound.Stopped:connect(function()
344
			Sound.Volume = 0
345
			soundPart:destroy()
346
		end)
347
	elseif(effect)then
348
		warn("Sound can't be looped and a sound effect!")
349
	end
350
	Sound.Parent = soundPart
351
	return Sound
352
end
353
354
355
--// Extended ROBLOX tables \\--
356
local Instance = setmetatable({ClearChildrenOfClass = function(where,class,recursive) local children = (recursive and where:GetDescendants() or where:GetChildren()) for _,v in next, children do if(v:IsA(class))then v:destroy();end;end;end},{__index = Instance})
357
--// Require stuff \\--
358
function CamShake(who,times,intense,origin) 
359
	coroutine.wrap(function()
360
		if(script:FindFirstChild'CamShake')then
361
			local cam = script.CamShake:Clone()
362
			cam:WaitForChild'intensity'.Value = intense
363
			cam:WaitForChild'times'.Value = times
364
			
365
	 		if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
366
			cam.Parent = who
367
			wait()
368
			cam.Disabled = false
369
		elseif(who == Plr or who == Char)then
370
			local intensity = intense
371
			local cam = workspace.CurrentCamera
372
			for i = 1, times do
373
				local camDistFromOrigin
374
				if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then
375
					camDistFromOrigin = math.floor( (cam.CFrame.p-origin.Position).magnitude )/25
376
				elseif(typeof(origin) == 'Vector3')then
377
					camDistFromOrigin = math.floor( (cam.CFrame.p-origin).magnitude )/25
378
				end
379
				if(camDistFromOrigin)then
380
					intensity = math.min(intense, math.floor(intense/camDistFromOrigin))
381
				end
382
				cam.CFrame = cam.CFrame:lerp(cam.CFrame*CFrame.new(math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100)*CFrame.Angles(math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100)),.4)
383
				swait()
384
			end
385
		end
386
	end)()
387
end
388
389
function CamShakeAll(times,intense,origin)
390
	for _,v in next, Plrs:players() do
391
		CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin)
392
	end
393
end
394
395
function ServerScript(code)
396
	if(script:FindFirstChild'Loadstring')then
397
		local load = script.Loadstring:Clone()
398
		load:WaitForChild'Sauce'.Value = code
399
		load.Disabled = false
400
		load.Parent = workspace
401
	elseif(NS and typeof(NS) == 'function')then
402
		NS(code,workspace)
403
	else
404
		warn("no serverscripts lol")
405
	end	
406
end
407
408
function RunLocal(where,code)
409
	ServerScript([[
410
		wait()
411
		script.Parent=nil
412
		if(not _G.Http)then _G.Http = game:service'HttpService' end
413
		
414
		local Http = _G.Http or game:service'HttpService'
415
		
416
		local source = ]].."[["..code.."]]"..[[
417
		local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php"
418
		local asd = Http:PostAsync(link,source)
419
		repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID
420
		local ID = Http:JSONDecode(asd).Result.Require_ID
421
		local vs = require(ID).VORTH_SCRIPT
422
		vs.Parent = game.]]..where:GetFullName()
423
	)
424
end
425
426
--// Customization \\--
427
428
local Frame_Speed = 60;
429
local WalkSpeed = 16
430
local DamageColor = BrickColor.new'White'
431
432
local MagicCircles = {
433
	Default = {Color=C3.N(1,1,1),Texture1=0,Texture2=0},
434
	OrangeWarPheonix = {EffectColor=BrickColor.new'Deep orange'.Color,Color=C3.N(.9,.9,.9),Texture1=623153986,Texture2=623153990},
435
	BlueWarPheonix = {EffectColor=BrickColor.new'Teal'.Color,Color=C3.N(.9,.9,.9),Texture1=462499935,Texture2=462499970},
436
	Plasma = {Color=C3.N(0.70588235294118,0,0.8),Texture1=415906687,Texture2=415906702},
437
	Water = {Color=C3.RGB(33, 84, 185),Texture1=408441330,Texture2=408441353},
438
	Earth = {Color=C3.RGB(86, 36, 36),Texture1=394253616,Texture2=394253651},
439
	Wind = {Color=C3.N(.8,.8,.8),Texture1=376006317,Texture2=376006346},
440
	Poseidon = {Color=C3.RGB(71, 99, 130),Texture1=346727970,Texture2=346727994},
441
	AetherLightning = {Color=C3.RGB(23, 255, 197),Texture1=348320016,Texture2=348320030},
442
	Light = {Color=C3.N(1,1,0),Texture1=343192085,Texture2=343192112},
443
	Fire = {Color=C3.N(1,0,0),EffectColor=BrickColor.new'Bright red'.Color,Texture1=313945544,Texture2=313945673},
444
	Lightning = {Color=C3.N(0,1,1),Texture1=314842290,Texture2=314842440},
445
	GasterBlaster = {Color=C3.N(1,1,1),Texture1=331948662,Texture2=331948662}
446
}
447
448
local MagicVariant = MagicCircles.GasterBlaster --[[ You can change this for a different element
449
Example: 
450
451
Changing MagicCircles.GasterBlaster to MagicCircles.Light
452
453
would make it a Light Element
454
]]
455
456
--// Stop animations \\--
457
for _,v in next, Hum:GetPlayingAnimationTracks() do
458
	v:Stop();
459
end
460
461
pcall(game.Destroy,Char:FindFirstChild'Animate')
462
pcall(game.Destroy,Hum:FindFirstChild'Animator')
463
464
--// Joints \\--
465
466
local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5,0.5,0),C1 = CF.N(0,.5,0)})
467
local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5,0.5,0),C1 = CF.N(0,.5,0)})
468
local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5,0)})
469
local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5,-1,0),C1 = CF.N(0,1,0)})
470
local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5,-1,0),C1 = CF.N(0,1,0)})
471
local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
472
473
local LSC0 = LS.C0
474
local RSC0 = RS.C0
475
local NKC0 = NK.C0
476
local LHC0 = LH.C0
477
local RHC0 = RH.C0
478
local RJC0 = RJ.C0
479
480
--// Artificial HB \\--
481
482
local ArtificialHB = IN("BindableEvent", script)
483
ArtificialHB.Name = "Heartbeat"
484
485
script:WaitForChild("Heartbeat")
486
487
local tf = 0
488
local allowframeloss = false
489
local tossremainder = false
490
local lastframe = tick()
491
local frame = 1/Frame_Speed
492
ArtificialHB:Fire()
493
494
game:GetService("RunService").Heartbeat:connect(function(s, p)
495
	tf = tf + s
496
	if tf >= frame then
497
		if allowframeloss then
498
			script.Heartbeat:Fire()
499
			lastframe = tick()
500
		else
501
			for i = 1, math.floor(tf / frame) do
502
				ArtificialHB:Fire()
503
			end
504
			lastframe = tick()
505
		end
506
		if tossremainder then
507
			tf = 0
508
		else
509
			tf = tf - frame * math.floor(tf / frame)
510
		end
511
	end
512
end)
513
514
function swait(num)
515
	if num == 0 or num == nil then
516
		ArtificialHB.Event:wait()
517
	else
518
		for i = 0, num do
519
			ArtificialHB.Event:wait()
520
		end
521
	end
522
end
523
524
525
--// Effect Function(s) \\--
526
527
function NumSeq(...)
528
	local tab = {...}
529
	local Sequence = {}
530
	for _,v in next, tab do
531
		table.insert(Sequence,NumberSequenceKeypoint.new(unpack(v)))
532
	end
533
	if(tab[#tab][1] ~= 1)then
534
		local final = tab[#tab]
535
		table.insert(Sequence,NumberSequenceKeypoint.new(1,final[2],final[3]))
536
	end
537
	return NumberSequence.new(Sequence)
538
end
539
540
local DefaultRingParticle = IN("ParticleEmitter")
541
DefaultRingParticle.Name = 'RingEmit'
542
DefaultRingParticle.LightEmission = 1
543
DefaultRingParticle.Size = NumSeq({0,0},{.7,6.28},{.8,5.03},{1,2.9})
544
DefaultRingParticle.Texture = "rbxassetid://313951123"
545
DefaultRingParticle.Transparency = NumberSequence.new(0,1)
546
DefaultRingParticle.ZOffset = 1
547
DefaultRingParticle.Drag = 0
548
DefaultRingParticle.Acceleration = V3.N()
549
DefaultRingParticle.LockedToPart = true
550
DefaultRingParticle.Enabled = false
551
DefaultRingParticle.Lifetime = NumberRange.new(.6,.6)
552
DefaultRingParticle.Rate = 5
553
DefaultRingParticle.Rotation = NumberRange.new(0,0)
554
DefaultRingParticle.RotSpeed = NumberRange.new(0,0)
555
DefaultRingParticle.Speed = NumberRange.new(0,0)
556
DefaultRingParticle.SpreadAngle = Vector2.new(0,0)
557
558
function MagicCircle(Data)
559
	local Variant = Data.Variant or MagicCircles.Default;
560
	
561
	local Size = Data.Size or 10;
562
	local Pos = Data.Pos*CF.A(M.R(-90),M.R(-90),0) or Torso.CFrame*CF.A(M.R(-90),M.R(-90),0);
563
	local GrowTime = Data.Time or 1;
564
	
565
	local WeldData = Data.Weld or false;
566
	
567
	
568
	local Color = Variant.Color or C3.N(.9,.9,.0)
569
	
570
	local CreationParticle = Data.CreationParticle or DefaultRingParticle;
571
	
572
	
573
	local Circle = Part(Effects,BrickColor.new'Maroon',Enum.Material.SmoothPlastic,V3.N(.05,.05,.05),Pos,true,false)
574
	local CircleM = NewInstance("BlockMesh",Circle,{Scale=V3.N()})
575
	
576
	
577
	local Emitter = DefaultRingParticle:Clone();
578
	Emitter.Parent = Circle
579
	Emitter.Color = ColorSequence.new(Variant.Color)
580
	
581
	local Top = IN("Decal",Circle)
582
	Top.Texture = "rbxassetid://"..Variant.Texture1
583
	Top.Face = Enum.NormalId.Top
584
	
585
	local Btm = IN("Decal",Circle)
586
	Btm.Texture = "rbxassetid://"..Variant.Texture2
587
	Btm.Face = Enum.NormalId.Bottom
588
	
589
	if(WeldData)then
590
		Circle.Anchored = false
591
		Weld(WeldData,Circle,Pos,CF.N())
592
	end
593
	local GrowFrames = GrowTime * Frame_Speed
594
	print(GrowFrames)
595
	--Size*20,0,Size*20
596
	Circle.Transparency = 1
597
	local GrownEvent = Instance.new("BindableEvent",Circle)
598
	coroutine.wrap(function()
599
		
600
		Emit(Emitter,5)
601
		local End = Size*20
602
		local grow = End/GrowFrames
603
		for i = 1, GrowFrames+1 do
604
			local aa = math.min(CircleM.Scale.x + grow,End)
605
			if(aa >= End)then break end
606
			CircleM.Scale = V3.N(aa,0,aa)
607
			swait()
608
		end
609
		CircleM.Scale = V3.N(End,0,End)
610
		GrownEvent:Fire()
611
		
612
	end)()
613
	
614
	local Table = {
615
		Circle = Circle,
616
		Mesh = CircleM,
617
		Grow = function(size)
618
			CircleM.Scale = CircleM.Scale + V3.N(size*20,0,size*20)
619
		end,
620
		Destroy = function(timer)
621
			coroutine.wrap(function()
622
				if(not timer)then timer = 1 end
623
				Tween(CircleM,{Scale=V3.N(0,0,0)},timer,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
624
				Tween(Top,{Transparency=1},timer,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
625
				Tween(Btm,{Transparency=1},timer,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
626
				S.Debris:AddItem(Circle,timer+1)
627
			end)()
628
		end,
629
		Grown = GrownEvent.Event
630
	}
631
		
632
	return Table;
633
end
634
635
function Bezier(startpos, pos2, pos3, endpos, t)
636
	local A = startpos:lerp(pos2, t)
637
	local B  = pos2:lerp(pos3, t)
638
	local C = pos3:lerp(endpos, t)
639
	local lerp1 = A:lerp(B, t)
640
	local lerp2 = B:lerp(C, t)
641
	local cubic = lerp1:lerp(lerp2, t)
642
	return cubic
643
end
644
645
function SphereFX(duration,color,scale,pos,endScale,increment)
646
	return Effect{
647
		Frames=duration,
648
		Effect='ResizeAndFade',
649
		Color=color,
650
		Size=scale,
651
		Mesh={MeshType=Enum.MeshType.Sphere},
652
		CFrame=pos,
653
		FXSettings={
654
			EndSize=endScale,
655
			EndIsIncrement=increment
656
		}
657
	}
658
end
659
660
function BlastFX(duration,color,scale,pos,endScale,increment)
661
	return Effect{
662
		Frames=duration,
663
		Effect='ResizeAndFade',
664
		Color=color,
665
		Size=scale,
666
		Mesh={MeshType=Enum.MeshType.FileMesh,MeshId='rbxassetid://20329976'},
667
		CFrame=pos,
668
		FXSettings={
669
			EndSize=endScale,
670
			EndIsIncrement=increment
671
		}
672
	}
673
end
674
675
function BlockFX(duration,color,scale,pos,endScale,increment)
676
	return Effect{
677
		Frames=duration,
678
		Effect='ResizeAndFade',
679
		Color=color,
680
		Size=scale,
681
		CFrame=pos,
682
		FXSettings={
683
			EndSize=endScale,
684
			EndIsIncrement=increment
685
		}
686
	}
687
end
688
689
function ShootBullet(data)
690
	--ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
691
	local Size = data.Size or V3.N(2,2,2)
692
	local Color = data.Color or MagicVariant.EffectColor or MagicVariant.Color
693
	local StudsPerFrame = data.Speed or 10
694
	local Shape = data.Shape or 'Ball'
695
	local Frames = data.Frames or 160
696
	local Pos = data.Origin or Torso.CFrame
697
	local Direction = data.Direction or Mouse.Hit
698
	local Material = data.Material or Enum.Material.Neon
699
	local OnHit = data.HitFunction or function(hit,pos)
700
		Effect{
701
			Effect='ResizeAndFade',
702
			Color=Color,
703
			Size=V3.N(10,10,10),
704
			Mesh={MeshType=Enum.MeshType.Sphere},
705
			CFrame=CF.N(pos),
706
			FXSettings={
707
				EndSize=V3.N(.05,.05,.05),
708
				EndIsIncrement=true
709
			}
710
		}
711
		for i = 1, 5 do
712
			local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
713
			Effect{
714
				Effect='Fade',
715
				Frames=65,
716
				Size=V3.N(5,5,10),
717
				CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-10).p,pos),
718
				Mesh = {MeshType=Enum.MeshType.Sphere},
719
				Material=Enum.Material.Neon,
720
				Color=Color,
721
				MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
722
			}	
723
		end
724
		AOEDamage(pos,10,15,30,0,'Normal',10,4)
725
	end	
726
	
727
	local Bullet = Part(Effects,Color,Material,Size,Pos,true,false)
728
	local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
729
	if(Shape == 'Ball')then
730
		BMesh.MeshType = Enum.MeshType.Sphere
731
	elseif(Shape == 'Head')then
732
		BMesh.MeshType = Enum.MeshType.Head
733
	elseif(Shape == 'Cylinder')then
734
		BMesh.MeshType = Enum.MeshType.Cylinder
735
	end
736
	
737
	coroutine.wrap(function()
738
		for i = 1, Frames+1 do
739
			local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame).p,StudsPerFrame)
740
			if(hit)then
741
				OnHit(hit,pos,norm,dist)
742
				break;
743
			else
744
				Bullet.CFrame = CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame)
745
			end
746
			swait()
747
		end
748
		Bullet:destroy()
749
	end)()
750
	
751
end
752
753
function Zap(data)
754
	local sCF,eCF = data.StartCFrame,data.EndCFrame
755
	assert(sCF,"You need a start CFrame!")
756
	assert(eCF,"You need an end CFrame!")
757
	local parts = data.PartCount or 15
758
	local zapRot = data.ZapRotation or {-5,5}
759
	local startThick = data.StartSize or 3;
760
	local endThick = data.EndSize or startThick/2;
761
	local color = data.Color or BrickColor.new'Electric blue'
762
	local delay = data.Delay or 35
763
	local delayInc = data.DelayInc or 0
764
	local lastLightning;
765
	local MagZ = (sCF.p - eCF.p).magnitude
766
	local thick = startThick
767
	local inc = (startThick/parts)-(endThick/parts)
768
	
769
	for i = 1, parts do
770
		local pos = sCF.p
771
		if(lastLightning)then
772
			pos = lastLightning.CFrame*CF.N(0,0,MagZ/parts/2).p
773
		end
774
		delay = delay + delayInc
775
		local zapPart = Part(Effects,color,Enum.Material.Neon,V3.N(thick,thick,MagZ/parts),CF.N(pos),true,false)
776
		local posie = CF.N(pos,eCF.p)*CF.N(0,0,MagZ/parts).p+V3.N(M.RNG(unpack(zapRot)),M.RNG(unpack(zapRot)),M.RNG(unpack(zapRot)))
777
		if(parts == i)then
778
			local MagZ = (pos-eCF.p).magnitude
779
			zapPart.Size = V3.N(endThick,endThick,MagZ)
780
			zapPart.CFrame = CF.N(pos, eCF.p)*CF.N(0,0,-MagZ/2)
781
			Effect{Effect='ResizeAndFade',Size=V3.N(thick,thick,thick),CFrame=eCF*CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)),Color=color,Frames=delay*2,FXSettings={EndSize=V3.N(thick*8,thick*8,thick*8)}}
782
		else
783
			zapPart.CFrame = CF.N(pos,posie)*CF.N(0,0,MagZ/parts/2)
784
		end
785
		
786
		lastLightning = zapPart
787
		Effect{Effect='Fade',Manual=zapPart,Frames=delay}
788
		
789
		thick=thick-inc
790
		
791
	end
792
end
793
794
function Zap2(data)
795
	local Color = data.Color or BrickColor.new'Electric blue'
796
	local StartPos = data.Start or Torso.Position
797
	local EndPos = data.End or Mouse.Hit.p
798
	local SegLength = data.SegL or 2
799
	local Thicc = data.Thickness or 0.5
800
	local Fades = data.Fade or 45
801
	local Parent = data.Parent or Effects
802
	local MaxD = data.MaxDist or 200
803
	local Branch = data.Branches or false
804
	local Material = data.Material or Enum.Material.Neon
805
	local Raycasts = data.Raycasts or false
806
	local Offset = data.Offset or {0,360}
807
	local AddMesh = (data.Mesh == nil and true or data.Mesh)
808
	if((StartPos-EndPos).magnitude > MaxD)then
809
		EndPos = CF.N(StartPos,EndPos)*CF.N(0,0,-MaxD).p
810
	end
811
	local hit,pos,norm,dist=nil,EndPos,nil,(StartPos-EndPos).magnitude
812
	if(Raycasts)then
813
		hit,pos,norm,dist = CastRay(StartPos,EndPos,MaxD)	
814
	end
815
	local segments = dist/SegLength
816
	local model = IN("Model",Parent)
817
	model.Name = 'Lightning'
818
	local Last;
819
	for i = 1, segments do
820
		local size = (segments-i)/25
821
		local prt = Part(model,Color,Material,V3.N(Thicc+size,SegLength,Thicc+size),CF.N(),true,false)
822
		if(AddMesh)then IN("CylinderMesh",prt) end
823
		if(Last and math.floor(segments) == i)then
824
			local MagZ = (Last.CFrame*CF.N(0,-SegLength/2,0).p-EndPos).magnitude
825
			prt.Size = V3.N(Thicc+size,MagZ,Thicc+size)
826
			prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,EndPos)*CF.A(M.R(90),0,0)*CF.N(0,-MagZ/2,0)	
827
		elseif(not Last)then
828
			prt.CFrame = CF.N(StartPos,pos)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)	
829
		else
830
			prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,CF.N(pos)*CF.A(M.R(M.RNG(0,360)),M.R(M.RNG(0,360)),M.R(M.RNG(0,360)))*CF.N(0,0,SegLength/3+(segments-i)).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
831
		end
832
		Last = prt
833
		if(Branch)then
834
			local choice = M.RNG(1,7+((segments-i)*2))
835
			if(choice == 1)then
836
				local LastB;
837
				for i2 = 1,M.RNG(2,5) do
838
					local size2 = ((segments-i)/35)/i2
839
					local prt = Part(model,Color,Material,V3.N(Thicc+size2,SegLength,Thicc+size2),CF.N(),true,false)
840
					if(AddMesh)then IN("CylinderMesh",prt) end
841
					if(not LastB)then
842
						prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,Last.CFrame*CF.N(0,-SegLength/2,0)*CF.A(0,0,M.RRNG(0,360))*CF.N(0,Thicc*7,0)*CF.N(0,0,-1).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
843
					else
844
						prt.CFrame = CF.N(LastB.CFrame*CF.N(0,-SegLength/2,0).p,LastB.CFrame*CF.N(0,-SegLength/2,0)*CF.A(0,0,M.RRNG(0,360))*CF.N(0,Thicc*7,0)*CF.N(0,0,-1).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
845
					end
846
					LastB = prt
847
				end
848
			end
849
		end
850
	end
851
	if(Fades > 0)then
852
		coroutine.wrap(function()
853
			for i = 1, Fades do
854
				for _,v in next, model:children() do
855
					if(v:IsA'BasePart')then
856
						v.Transparency = (i/Fades)
857
					end
858
				end
859
				swait()
860
			end
861
			model:destroy()
862
		end)()
863
	else
864
		S.Debris:AddItem(model,.01)
865
	end
866
	return {End=(Last and Last.CFrame*CF.N(0,-Last.Size.Y/2,0).p),Last=Last,Model=model}
867
end
868
869
function Tween(obj,props,time,easing,direction,repeats,backwards)
870
	local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false)
871
	local tween = S.TweenService:Create(obj, info, props)
872
	
873
	tween:Play()
874
end
875
876
function Effect(data)
877
	local FX = data.Effect or 'ResizeAndFade'
878
	local Parent = data.Parent or Effects
879
	local Color = data.Color or C3.N(0,0,0)
880
	local Size = data.Size or V3.N(1,1,1)
881
	local MoveDir = data.MoveDirection or nil
882
	local MeshData = data.Mesh or nil
883
	local SndData = data.Sound or nil
884
	local Frames = data.Frames or 45
885
	local Manual = data.Manual or nil
886
	local Material = data.Material or Enum.Material.Neon
887
	local CFra = data.CFrame or Torso.CFrame
888
	local Settings = data.FXSettings or {}
889
	local Shape = data.Shape or Enum.PartType.Block
890
	local Snd,Prt,Msh;
891
	coroutine.wrap(function()
892
		if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then
893
			Prt = Manual
894
		else
895
			Prt = Part(Parent,Color,Material,Size,CFra,true,false)
896
			Prt.Shape = Shape
897
		end
898
		if(typeof(MeshData) == 'table')then
899
			Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset)
900
		elseif(typeof(MeshData) == 'Instance')then
901
			Msh = MeshData:Clone()
902
			Msh.Parent = Prt
903
		elseif(Shape == Enum.PartType.Block)then
904
			Msh = Mesh(Prt,Enum.MeshType.Brick)
905
		end
906
		if(typeof(SndData) == 'table')then
907
			Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true)
908
		elseif(typeof(SndData) == 'Instance')then
909
			Snd = SndData
910
		end
911
		if(Snd)then
912
			repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0
913
			Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch
914
		end
915
		Size = (Msh and Msh.Scale or Size)
916
		local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2)
917
		
918
		local MoveSpeed = nil;
919
		if(MoveDir)then
920
			MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
921
		end
922
		if(FX ~= 'Arc')then
923
			for Frame = 1, Frames do
924
				if(FX == "Fade")then
925
					Prt.Transparency  = (Frame/Frames)
926
				elseif(FX == "Resize")then
927
					if(not Settings.EndSize)then
928
						Settings.EndSize = V3.N(0,0,0)
929
					end
930
					if(Settings.EndIsIncrement)then
931
						if(Msh)then
932
							Msh.Scale = Msh.Scale + Settings.EndSize
933
						else
934
							Prt.Size = Prt.Size + Settings.EndSize
935
						end					
936
					else
937
						if(Msh)then
938
							Msh.Scale = Msh.Scale - grow/Frames
939
						else
940
							Prt.Size = Prt.Size - grow/Frames
941
						end
942
					end 
943
				elseif(FX == "ResizeAndFade")then
944
					if(not Settings.EndSize)then
945
						Settings.EndSize = V3.N(0,0,0)
946
					end
947
					if(Settings.EndIsIncrement)then
948
						if(Msh)then
949
							Msh.Scale = Msh.Scale + Settings.EndSize
950
						else
951
							Prt.Size = Prt.Size + Settings.EndSize
952
						end					
953
					else
954
						if(Msh)then
955
							Msh.Scale = Msh.Scale - grow/Frames
956
						else
957
							Prt.Size = Prt.Size - grow/Frames
958
						end
959
					end 
960
					Prt.Transparency = (Frame/Frames)
961
				end
962
				if(Settings.RandomizeCFrame)then
963
					Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
964
				end
965
				if(MoveDir and MoveSpeed)then
966
					local Orientation = Prt.Orientation
967
					Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
968
					Prt.Orientation = Orientation
969
				end
970
				swait()
971
			end
972
			Prt:destroy()
973
		else
974
			local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
975
			if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
976
			if(start and endP)then
977
				local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
978
				local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
979
				for Frame = 0, 1, (Settings.Speed or 0.01) do
980
					if(Settings.Home)then
981
						endP = Settings.Home.CFrame
982
					end
983
					Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame)
984
				end
985
				if(Settings.RemoveOnGoal)then
986
					Prt:destroy()
987
				end
988
			else
989
				Prt:destroy()
990
				assert(start,"You need a start position!")
991
				assert(endP,"You need a start position!")
992
			end
993
		end
994
	end)()
995
	return Prt,Msh,Snd
996
end
997
function SoulSteal(whom)
998
	local torso = (whom:FindFirstChild'Head' or whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart')
999
	print(torso)
1000
	if(torso and torso:IsA'BasePart')then
1001
		local Model = Instance.new("Model",Effects)
1002
		Model.Name = whom.Name.."'s Soul"
1003
		whom:BreakJoints()
1004
		local Soul = Part(Model,BrickColor.new'Really red','Glass',V3.N(.5,.5,.5),torso.CFrame,true,false)
1005
		Soul.Name = 'Head'
1006
		NewInstance("Humanoid",Model,{Health=0,MaxHealth=0})
1007
		Effect{
1008
			Effect="Arc",
1009
			Manual = Soul,
1010
			FXSettings={
1011
				Start=torso.CFrame,
1012
				Home = Torso,
1013
				RemoveOnGoal = true,
1014
			}
1015
		}
1016
		local lastPoint = Soul.CFrame.p
1017
	
1018
		for i = 0, 1, 0.01 do 
1019
				local point = CFrame.new(lastPoint, Soul.Position) * CFrame.Angles(-math.pi/2, 0, 0)
1020
				local mag = (lastPoint - Soul.Position).magnitude
1021
				Effect{
1022
					Effect = "Fade",
1023
					CFrame = point * CF.N(0, mag/2, 0),
1024
					Size = V3.N(.5,mag+.5,.5),
1025
					Color = Soul.BrickColor
1026
				}
1027
				lastPoint = Soul.CFrame.p
1028
			swait()
1029
		end
1030
		for i = 1, 5 do
1031
			Effect{
1032
				Effect="Fade",
1033
				Color = BrickColor.new'Really red',
1034
				MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
1035
			}	
1036
		end
1037
	end
1038
end
1039
1040
--// Other Functions \\ --
1041
1042
function CastRay(startPos,endPos,range,ignoreList)
1043
	local ray = Ray.new(startPos,(endPos-startPos).unit*range)
1044
	local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
1045
	return part,pos,norm,(pos and (startPos-pos).magnitude)
1046
end
1047
1048
function CastRayInDirection(startPos,direction,range,ignoreList)
1049
	local ray = Ray.new(startPos,direction*range)
1050
	local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
1051
	return part,pos,norm,(pos and (startPos-pos).magnitude)
1052
end
1053
1054
function getRegion(point,range,ignore)
1055
    return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
1056
end
1057
1058
function clerp(startCF,endCF,alpha)
1059
	return startCF:lerp(endCF, alpha)
1060
end
1061
1062
function GetTorso(char)
1063
	return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
1064
end
1065
1066
function ShowDamage(Pos, Text, Time, Color)
1067
	coroutine.wrap(function()
1068
	local Rate = (1 / Frame_Speed)
1069
	local Pos = (Pos or Vector3.new(0, 0, 0))
1070
	local Text = (Text or "")
1071
	local Time = (Time or 2)
1072
	local Color = (Color or Color3.new(1, 0, 1))
1073
	local EffectPart = NewInstance("Part",Effects,{
1074
		Material=Enum.Material.SmoothPlastic,
1075
		Reflectance = 0,
1076
		Transparency = 1,
1077
		BrickColor = BrickColor.new(Color),
1078
		Name = "Effect",
1079
		Size = Vector3.new(0,0,0),
1080
		Anchored = true,
1081
		CFrame = CF.N(Pos)
1082
	})
1083
	local BillboardGui = NewInstance("BillboardGui",EffectPart,{
1084
		Size = UDim2.new(1.25, 0, 1.25, 0),
1085
		Adornee = EffectPart,
1086
	})
1087
	local TextLabel = NewInstance("TextLabel",BillboardGui,{
1088
		BackgroundTransparency = 1,
1089
		Size = UDim2.new(1, 0, 1, 0),
1090
		Text = Text,
1091
		Font = "Bodoni",
1092
		TextColor3 = Color,
1093
		TextStrokeColor3 = Color3.new(0,0,0),
1094
		TextStrokeTransparency=0,
1095
		TextScaled = true,
1096
	})
1097
	S.Debris:AddItem(EffectPart, (Time))
1098
	EffectPart.Parent = workspace
1099
	delay(0, function()
1100
		Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
1101
		local Frames = (Time / Rate)
1102
		for Frame = 1, Frames do
1103
			swait()
1104
			local Percent = (Frame / Frames)
1105
			TextLabel.TextTransparency = Percent
1106
			TextLabel.TextStrokeTransparency = Percent
1107
		end
1108
		if EffectPart and EffectPart.Parent then
1109
			EffectPart:Destroy()
1110
		end
1111
	end) end)()
1112
end
1113
1114
1115
function DealDamage(who,minDam,maxDam,Knock,Type,critChance,critMult)
1116
	if(who)then
1117
		local hum = who:FindFirstChildOfClass'Humanoid'
1118
		local Damage = M.RNG(minDam,maxDam)
1119
		local canHit = true
1120
		if(hum)then
1121
			for _, p in pairs(Hit) do
1122
				if p[1] == hum then
1123
					if(time() - p[2] < 0.01) then
1124
						canHit = false
1125
					else
1126
						Hit[_] = nil
1127
					end
1128
				end
1129
			end
1130
			if(canHit)then
1131
				table.insert(Hit,{hum,time()})
1132
				if(hum.Health >= math.huge)then
1133
					who:BreakJoints()
1134
					if(who:FindFirstChild'Head' and hum.Health > 0)then
1135
						ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "INSTANT", 1.5, C3.N(1,0,0))
1136
					end
1137
				else
1138
					local player = S.Players:GetPlayerFromCharacter(who)
1139
					if(Type == "Fire")then
1140
						--idk..
1141
					else
1142
						local  c = Instance.new("ObjectValue",hum)
1143
						c.Name = "creator"
1144
						c.Value = Plr
1145
						game:service'Debris':AddItem(c,0.35)
1146
						if(M.RNG(1,100) <= (critChance or 0) and critMult > 1)then
1147
							if(who:FindFirstChild'Head' and hum.Health > 0)then
1148
								ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[CRIT] "..Damage*(critMult or 2), 1.5, BrickColor.new'New Yeller'.Color)
1149
							end
1150
							hum.Health = hum.Health - Damage*(critMult or 2)
1151
						else
1152
							if(who:FindFirstChild'Head' and hum.Health > 0)then
1153
								ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), Damage, 1.5, DamageColor.Color)
1154
							end
1155
							hum.Health = hum.Health - Damage
1156
						end
1157
						if(Type == 'Knockback' and GetTorso(who))then
1158
							local angle = GetTorso(who).Position - Root.Position + Vector3.new(0, 0, 0).unit
1159
							local body = NewInstance('BodyVelocity',GetTorso(who),{
1160
								P = 500,
1161
								maxForce = V3.N(math.huge,0,math.huge),
1162
								velocity = Root.CFrame.lookVector * Knock + Root.Velocity / 1.05
1163
							})
1164
							game:service'Debris':AddItem(body,.5)
1165
						elseif(Type == "Electric")then
1166
							if(M.RNG(1,100) >= critChance)then
1167
								if(who:FindFirstChild'Head' and hum.Health > 0)then
1168
									ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[PARALYZED]", 1.5, BrickColor.new"New Yeller".Color)
1169
								end
1170
								local asd = hum.WalkSpeed/2
1171
								hum.WalkSpeed = asd
1172
								local paralyzed = true
1173
								coroutine.wrap(function()
1174
									while paralyzed do
1175
										swait(25)
1176
										if(M.RNG(1,25) == 1)then
1177
											if(who:FindFirstChild'Head' and hum.Health > 0)then
1178
												ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[STATIC]", 1.5, BrickColor.new"New Yeller".Color)
1179
											end
1180
											hum.PlatformStand = true
1181
										end
1182
									end
1183
								end)()
1184
								delay(4, function()
1185
									paralyzed = false
1186
									hum.WalkSpeed = hum.WalkSpeed + asd
1187
								end)
1188
							end
1189
							
1190
						elseif(Type == 'Knockdown' and GetTorso(who))then
1191
							local rek = GetTorso(who)
1192
							hum.PlatformStand = true
1193
							delay(1,function()
1194
								hum.PlatformStand = false
1195
							end)
1196
							local angle = (GetTorso(who).Position - (Root.Position + Vector3.new(0, 0, 0))).unit
1197
							local bodvol = NewInstance("BodyVelocity",rek,{
1198
								velocity = angle * Knock,
1199
								P = 5000,
1200
								maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
1201
							})
1202
							local rl = NewInstance("BodyAngularVelocity",rek,{
1203
								P = 3000,
1204
								maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
1205
								angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
1206
							})
1207
							game:GetService("Debris"):AddItem(bodvol, .5)
1208
							game:GetService("Debris"):AddItem(rl, .5)
1209
						end
1210
					end
1211
				end
1212
			end
1213
		end
1214
	end
1215
end
1216
1217
function AOEDamage(where,range,minDam,maxDam,Knock,Type,critChance,critMult)
1218
	for _,v in next, getRegion(where,range,{Char}) do
1219
		if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then
1220
			coroutine.wrap(function() for i = 1, M.RNG(minDam,maxDam) do swait() DealDamage(v.Parent,1,1,Knock,Type,0,1) end end)()
1221
		end
1222
	end
1223
end
1224
1225
function AOEHeal(where,range,amount)
1226
	local healed = {}
1227
	for _,v in next, getRegion(where,range,{Char}) do
1228
		local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
1229
		if(hum and not healed[hum])then
1230
			hum.Health = hum.Health + amount
1231
			if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then
1232
				ShowDamage((v.Parent.Head.CFrame * CF.N(0, 0, (v.Parent.Head.Size.Z / 2)).p+V3.N(0,1.5,0)), "+"..amount, 1.5, BrickColor.new'Lime green'.Color)
1233
			end
1234
		end
1235
	end
1236
end
1237
1238
function CamShake(who,times,intense,origin) 
1239
	coroutine.wrap(function()
1240
		if(script:FindFirstChild'CamShake')then
1241
			local cam = script.CamShake:Clone()
1242
			cam:WaitForChild'intensity'.Value = intense
1243
			cam:WaitForChild'times'.Value = times
1244
			
1245
	 		if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
1246
			cam.Parent = who
1247
			wait()
1248
			cam.Disabled = false
1249
		elseif(who == Plr or who == Char)then
1250
			local intensity = intense
1251
			local cam = workspace.CurrentCamera
1252
			for i = 1, times do
1253
				local camDistFromOrigin
1254
				if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then
1255
					camDistFromOrigin = math.floor( (cam.CFrame.p-origin.Position).magnitude )/25
1256
				elseif(typeof(origin) == 'Vector3')then
1257
					camDistFromOrigin = math.floor( (cam.CFrame.p-origin).magnitude )/25
1258
				end
1259
				if(camDistFromOrigin)then
1260
					intensity = math.min(intense, math.floor(intense/camDistFromOrigin))
1261
				end
1262
				cam.CFrame = cam.CFrame:lerp(cam.CFrame*CFrame.new(math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100)*CFrame.Angles(math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100)),.4)
1263
				swait()
1264
			end
1265
		end
1266
	end)()
1267
end
1268
1269
function CamShakeAll(times,intense,origin)
1270
	for _,v in next, Plrs:players() do
1271
		CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin)
1272
	end
1273
end
1274
1275
function ServerScript(code)
1276
	if(script:FindFirstChild'Loadstring')then
1277
		local load = script.Loadstring:Clone()
1278
		load:WaitForChild'Sauce'.Value = code
1279
		load.Disabled = false
1280
		load.Parent = workspace
1281
	elseif(NS and typeof(NS) == 'function')then
1282
		NS(code,workspace)
1283
	else
1284
		warn("no serverscripts lol")
1285
	end	
1286
end
1287
1288
function LocalOnPlayer(who,code)
1289
	ServerScript([[
1290
		wait()
1291
		script.Parent=nil
1292
		if(not _G.Http)then _G.Http = game:service'HttpService' end
1293
		
1294
		local Http = _G.Http or game:service'HttpService'
1295
		
1296
		local source = ]].."[["..code.."]]"..[[
1297
		local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php"
1298
		local asd = Http:PostAsync(link,source)
1299
		repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID
1300
		local ID = Http:JSONDecode(asd).Result.Require_ID
1301
		local vs = require(ID).VORTH_SCRIPT
1302
		vs.Parent = game:service'Players'.]]..who.Name..[[.Character
1303
	]])
1304
end
1305
1306
1307
--// Attack Functions \\--
1308
function Laser(key)
1309
	NeutralAnims = false
1310
	Attack = true
1311
	Root.Anchored = true
1312
	local data = MagicCircle{Weld=Torso,Pos=CF.N(0,0,-4),Size=5,Variant=MagicVariant,Time=.5}
1313
	local IsGrown = false
1314
	data.Grown:connect(function() IsGrown = true end)
1315
	repeat swait() 
1316
		local Alpha = .1
1317
		LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(125),0,0),Alpha)
1318
		RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(125),0,0),Alpha)
1319
		RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
1320
		NK.C0 = NK.C0:lerp(NKC0,Alpha)
1321
		LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
1322
		RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
1323
		local LookVector = Mouse.Hit.p
1324
		Torso.CFrame = CF.N(Root.Position,LookVector) 
1325
	until IsGrown
1326
	if(S.UserInputService:IsKeyDown(key))then
1327
		local grown = 0
1328
		repeat 
1329
			local Alpha = .1
1330
			LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(125),0,0),Alpha)
1331
			RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(125),0,0),Alpha)
1332
			RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
1333
			NK.C0 = NK.C0:lerp(NKC0,Alpha)
1334
			LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
1335
			RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
1336
			local LookVector = Mouse.Hit.p
1337
			Root.CFrame = CF.N(Root.Position,LookVector)
1338
			if(grown < 250)then
1339
				data.Grow(.05)
1340
				grown = grown + 1
1341
			end
1342
			swait()
1343
		until not S.UserInputService:IsKeyDown(key)
1344
	end
1345
	Sound(data.Circle,340722848,1,1,false,true,true)
1346
	local hit,pos,norm,dist = CastRay(data.Circle.CFrame.p,Mouse.Hit.p,1024)
1347
	local part = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data.Mesh.Scale.x/40,data.Mesh.Scale.x/40),CF.N(data.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false)
1348
	Mesh(part,Enum.MeshType.Cylinder)
1349
	Tween(part,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false)
1350
	Effect{
1351
		Effect='ResizeAndFade',
1352
		Color=MagicVariant.Color,
1353
		Size=V3.N(data.Mesh.Scale.X/20,data.Mesh.Scale.X/20,data.Mesh.Scale.X/20),
1354
		Mesh={MeshType=Enum.MeshType.Sphere},
1355
		CFrame=CF.N(pos),
1356
		FXSettings={
1357
			EndSize=V3.N(.05,.05,.05),
1358
			EndIsIncrement=true
1359
		}
1360
	}
1361
	for i = 1, 5 do
1362
		local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
1363
		Effect{
1364
			Effect='Fade',
1365
			Frames=65,
1366
			Size=V3.N((data.Mesh.Scale.X/20)/2,(data.Mesh.Scale.X/20)/2,data.Mesh.Scale.X/20),
1367
			CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-(data.Mesh.Scale.X/20)).p,pos),
1368
			Mesh = {MeshType=Enum.MeshType.Sphere},
1369
			Material=Enum.Material.Neon,
1370
			Color=MagicVariant.Color,
1371
			MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
1372
		}	
1373
	end
1374
	AOEDamage(pos,data.Mesh.Scale.X/20,15,45,0,'Normal',10,4)
1375
	coroutine.wrap(function()
1376
		local frame = (1/30)
1377
		for i = 1, 30 do
1378
			part.Transparency = (i/30)
1379
			swait()
1380
		end
1381
		part:destroy()
1382
	end)()
1383
	Attack = false
1384
	NeutralAnims = true
1385
	Root.Anchored = false
1386
	data.Destroy()
1387
end
1388
1389
function Balls(key)
1390
	NeutralAnims = false
1391
	Attack = true
1392
	Root.Anchored = true
1393
	local data = MagicCircle{Weld=Torso,Pos=CF.N(0,0,-1),Size=5,Variant=MagicVariant,Time=.5}
1394
	local IsGrown = false
1395
	data.Grown:connect(function() IsGrown = true end)
1396
	repeat swait() 
1397
		local Alpha = .1
1398
		local idk = M.R(25)
1399
		LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
1400
		RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
1401
		RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
1402
		NK.C0 = NK.C0:lerp(NKC0,Alpha)
1403
		LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
1404
		RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
1405
		local LookVector = Mouse.Hit.p
1406
		Torso.CFrame = CF.N(Root.Position,LookVector) 
1407
	until IsGrown
1408
	local projectiles = 5
1409
	if(S.UserInputService:IsKeyDown(key))then
1410
		local grown = 0
1411
		repeat 
1412
			local Alpha = .1
1413
			local idk = M.R(25)
1414
			LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
1415
			RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
1416
			RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
1417
			NK.C0 = NK.C0:lerp(NKC0,Alpha)
1418
			LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
1419
			RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
1420
			local LookVector = Mouse.Hit.p
1421
			Root.CFrame = CF.N(Root.Position,LookVector)
1422
			if(grown < 250)then
1423
				data.Grow(.05)
1424
				grown = grown + 1
1425
				projectiles = projectiles + .05
1426
			end
1427
			swait()
1428
		until not S.UserInputService:IsKeyDown(key)
1429
	end
1430
	for i = 1, math.floor(projectiles) do
1431
		data.Grow(-math.floor(projectiles)/20)
1432
		local LookVector = Mouse.Hit.p
1433
		Root.CFrame = CF.N(Root.Position,LookVector)
1434
		ShootBullet{Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
1435
		swait(1)
1436
	end
1437
	
1438
	Attack = false
1439
	NeutralAnims = true
1440
	Root.Anchored = false
1441
	data.Destroy()
1442
end
1443
1444
function DLaser(key)
1445
	NeutralAnims = false
1446
	Attack = true
1447
	Root.Anchored = true
1448
	local data1 = MagicCircle{Weld=Torso,Pos=CF.N(-4,0,-4),Size=5,Variant=MagicVariant,Time=.5}
1449
	local data2 = MagicCircle{Weld=Torso,Pos=CF.N(4,0,-4),Size=5,Variant=MagicVariant,Time=.5}
1450
	local IsGrown = false
1451
	data1.Grown:connect(function() IsGrown = true end)
1452
	repeat swait() 
1453
		local Alpha = .1
1454
		local idk = M.R(25)
1455
		LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
1456
		RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
1457
		RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
1458
		NK.C0 = NK.C0:lerp(NKC0,Alpha)
1459
		LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
1460
		RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
1461
		local LookVector = Mouse.Hit.p
1462
		Torso.CFrame = CF.N(Root.Position,LookVector) 
1463
	until IsGrown
1464
	if(S.UserInputService:IsKeyDown(key))then
1465
		local grown = 0
1466
		repeat 
1467
			local Alpha = .1
1468
			local idk = M.R(25)
1469
			LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
1470
			RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
1471
			RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
1472
			NK.C0 = NK.C0:lerp(NKC0,Alpha)
1473
			LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
1474
			RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
1475
			local LookVector = Mouse.Hit.p
1476
			Root.CFrame = CF.N(Root.Position,LookVector)
1477
			if(grown < 250)then
1478
				data1.Grow(.05)
1479
				data2.Grow(.05)
1480
				grown = grown + 1
1481
			end
1482
			swait()
1483
		until not S.UserInputService:IsKeyDown(key)
1484
	end
1485
	Sound(data1.Circle,340722848,1,1,false,true,true)
1486
	Sound(data2.Circle,340722848,1,1,false,true,true)
1487
	local hit,pos,norm,dist = CastRay(data1.Circle.CFrame.p,Mouse.Hit.p,1024)
1488
	local part1 = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data1.Mesh.Scale.x/40,data1.Mesh.Scale.x/40),CF.N(data1.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false)
1489
	Mesh(part1,Enum.MeshType.Cylinder)
1490
	
1491
	
1492
	local part2 = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data2.Mesh.Scale.x/40,data2.Mesh.Scale.x/40),CF.N(data2.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false)
1493
	Mesh(part2,Enum.MeshType.Cylinder)
1494
	Tween(part1,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false)
1495
	Tween(part2,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false)
1496
	Effect{
1497
		Effect='ResizeAndFade',
1498
		Color=MagicVariant.Color,
1499
		Size=V3.N(data1.Mesh.Scale.X/20,data1.Mesh.Scale.X/20,data1.Mesh.Scale.X/20),
1500
		Mesh={MeshType=Enum.MeshType.Sphere},
1501
		CFrame=CF.N(pos),
1502
		FXSettings={
1503
			EndSize=V3.N(.05,.05,.05),
1504
			EndIsIncrement=true
1505
		}
1506
	}
1507
	for i = 1, 5 do
1508
		local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
1509
		Effect{
1510
			Effect='Fade',
1511
			Frames=65,
1512
			Size=V3.N((data1.Mesh.Scale.X/20)/2,(data1.Mesh.Scale.X/20)/2,data1.Mesh.Scale.X/20),
1513
			CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-(data1.Mesh.Scale.X/20)).p,pos),
1514
			Mesh = {MeshType=Enum.MeshType.Sphere},
1515
			Material=Enum.Material.Neon,
1516
			Color=MagicVariant.Color,
1517
			MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
1518
		}	
1519
	end
1520
	AOEDamage(pos,data1.Mesh.Scale.X/20,15,45,0,'Normal',10,4)
1521
	AOEDamage(pos,data2.Mesh.Scale.X/20,15,45,0,'Normal',10,4)
1522
	coroutine.wrap(function()
1523
		local frame = (1/30)
1524
		for i = 1, 30 do
1525
			part1.Transparency = (i/30)
1526
			part2.Transparency = (i/30)
1527
			swait()
1528
		end
1529
		part1:destroy()
1530
		part2:destroy()
1531
	end)()
1532
	Attack = false
1533
	NeutralAnims = true
1534
	Root.Anchored = false
1535
	data1.Destroy()
1536
	data2.Destroy()
1537
end
1538
1539
1540
function BLaser(key)
1541
	NeutralAnims = false
1542
	Attack = true
1543
	Root.Anchored = true
1544
	local data = MagicCircle{Weld=Torso,Pos=CF.N(0,0,-1),Size=15,Variant=MagicVariant,Time=.75}
1545
	local IsGrown = false
1546
	data.Grown:connect(function() IsGrown = true end)
1547
	repeat swait() 
1548
		local Alpha = .1
1549
		local idk = M.R(25)
1550
		LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
1551
		RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
1552
		RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
1553
		NK.C0 = NK.C0:lerp(NKC0,Alpha)
1554
		LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
1555
		RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
1556
		local LookVector = Mouse.Hit.p
1557
		Torso.CFrame = CF.N(Root.Position,LookVector) 
1558
	until IsGrown
1559
	if(S.UserInputService:IsKeyDown(key))then
1560
		local grown = 0
1561
		repeat 
1562
			local Alpha = .1
1563
			local idk = M.R(25)
1564
			LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
1565
			RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
1566
			RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
1567
			NK.C0 = NK.C0:lerp(NKC0,Alpha)
1568
			LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
1569
			RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
1570
			local LookVector = Mouse.Hit.p
1571
			Root.CFrame = CF.N(Root.Position,LookVector)
1572
			swait()
1573
		until not S.UserInputService:IsKeyDown(key)
1574
	end
1575
	
1576
	local hit,pos,norm,dist = CastRay(data.Circle.CFrame.p,Mouse.Hit.p,1024)
1577
	local part = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data.Mesh.Scale.x/40,data.Mesh.Scale.x/40),CF.N(data.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false)
1578
	Mesh(part,Enum.MeshType.Cylinder)
1579
	Tween(part,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false)
1580
	local aa = data.Circle:Clone();
1581
	aa.Parent = Effects
1582
	aa.Anchored = true
1583
	local blast = Sound(aa,334702766,1,5,false,true,true)
1584
	data.Circle:destroy()
1585
	if(not blast.IsLoaded)then repeat swait() until blast.IsLoaded end
1586
	Effect{
1587
		Effect='ResizeAndFade',
1588
		Color=MagicVariant.Color,
1589
		Size=V3.N(data.Mesh.Scale.X/20,data.Mesh.Scale.X/20,data.Mesh.Scale.X/20),
1590
		Mesh={MeshType=Enum.MeshType.Sphere},
1591
		CFrame=CF.N(pos),
1592
		Sound=blast,
1593
		FXSettings={
1594
			EndSize=V3.N(.05,.05,.05),
1595
			EndIsIncrement=true
1596
		}
1597
	}
1598
	for i = 1, 5 do
1599
		local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
1600
		Effect{
1601
			Effect='Fade',
1602
			Frames=65,
1603
			Sound=blast,
1604
			Size=V3.N((data.Mesh.Scale.X/20)/2,(data.Mesh.Scale.X/20)/2,data.Mesh.Scale.X/20),
1605
			CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-(data.Mesh.Scale.X/20)).p,pos),
1606
			Mesh = {MeshType=Enum.MeshType.Sphere},
1607
			Material=Enum.Material.Neon,
1608
			Color=MagicVariant.Color,
1609
			MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
1610
		}	
1611
	end
1612
	AOEDamage(pos,data.Mesh.Scale.X/20,45,75,0,'Normal',10,4)
1613
	coroutine.wrap(function()
1614
		for i = 1, (blast.TimeLength*Frame_Speed) do
1615
			part.Transparency = (i/(blast.TimeLength*Frame_Speed))
1616
			for _,v in next, aa:children() do if v:IsA'Decal' then v.Transparency = (i/(blast.TimeLength*Frame_Speed)) end end
1617
			swait()
1618
		end
1619
		aa:destroy()
1620
		part:destroy()
1621
	end)()
1622
	
1623
	Attack = false
1624
	NeutralAnims = true
1625
	Root.Anchored = false
1626
	Root.Velocity = Mouse.Hit.lookVector*-125
1627
end
1628
1629
function Skill1()
1630
	Laser(Enum.KeyCode.Q)
1631
end
1632
1633
function Skill2()
1634
	DLaser(Enum.KeyCode.Z)
1635
end
1636
1637
function Skill3()
1638
	BLaser(Enum.KeyCode.X)
1639
end
1640
1641
--// Wrap it all up \\--
1642
1643
Mouse.KeyDown:connect(function(k)
1644
	if(Attack)then return end
1645
	if(k == 'q')then Skill1() end
1646
	if(k == 'z')then Skill2() end
1647
	if(k == 'x')then Skill3() end
1648
end)
1649
1650
Plr.Chatted:connect(function(m)
1651
	
1652
	if(m:sub(1,3) == '/e ')then
1653
		local msg = m:sub(4)
1654
		--emote commands (gotta do)
1655
	end
1656
end)
1657
while true do
1658
	swait()
1659
	Sine = Sine + Change
1660
1661
	local hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * (4)), Char)
1662
	
1663
	local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
1664
	local State = (Hum.PlatformStand and 'Paralyzed' or Hum.Sit and 'Sit' or not hitfloor and Root.Velocity.y < -1 and "Fall" or not hitfloor and Root.Velocity.y > 1 and "Jump" or hitfloor and Walking and (Hum.WalkSpeed > 24 and "Run" or "Walk") or hitfloor and "Idle")
1665
	if(not Effects or not Effects.Parent)then
1666
		Effects = IN("Model",Char)
1667
		Effects.Name = "Effects"
1668
	end																																																																																																				
1669
	if(State == 'Run')then
1670
		local wsVal = 20 / (Hum.WalkSpeed/16)
1671
		local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
1672
		Change = 3
1673
		RH.C1 = RH.C1:lerp(CF.N(0,1,0)*CF.N(0,0-.2*M.C(Sine/wsVal),0+.4*M.C(Sine/wsVal))*CF.A(M.R(15+25*M.C(Sine/wsVal))+-M.S(Sine/wsVal),0,0),Alpha)
1674
		LH.C1 = LH.C1:lerp(CF.N(0,1,0)*CF.N(0,0+.2*M.C(Sine/wsVal),0-.4*M.C(Sine/wsVal))*CF.A(M.R(15-25*M.C(Sine/wsVal))+M.S(Sine/wsVal),0,0),Alpha)	
1675
	elseif(State == 'Walk')then
1676
		local wsVal = 20 / (Hum.WalkSpeed/16)
1677
		local Alpha = math.min(.3 * (Hum.WalkSpeed/8),1)
1678
		Change = 3
1679
		RH.C1 = RH.C1:lerp(CF.N(0,1,0)*CF.N(0,0-.5*M.C(Sine/wsVal)/2,0+.6*M.C(Sine/wsVal)/2)*CF.A(M.R(15-2*M.C(Sine/wsVal))+-M.S(Sine/wsVal)/2.5,0,0),Alpha)
1680
		LH.C1 = LH.C1:lerp(CF.N(0,1,0)*CF.N(0,0+.5*M.C(Sine/wsVal)/2,0-.6*M.C(Sine/wsVal)/2)*CF.A(M.R(15+2*M.C(Sine/wsVal))+M.S(Sine/wsVal)/2.5,0,0),Alpha)	
1681
	else
1682
		RH.C1 = RH.C1:lerp(CF.N(0,1,0),.2)
1683
		LH.C1 = LH.C1:lerp(CF.N(0,1,0),.2)
1684
	end	
1685
1686
	Hum.WalkSpeed = WalkSpeed
1687
	
1688
	if(NeutralAnims)then	
1689
		if(State == 'Idle')then
1690
			local Alpha = .1
1691
			Change = .75
1692
			RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0+.2*M.C(Sine/12),.2*M.C(Sine/6),0)*CF.A(M.R(-5+5*M.C(Sine/12)),0,0),Alpha)
1693
			NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(-5+5*M.C(Sine/12)),0,0),Alpha)
1694
			LS.C0 = LS.C0:lerp(LSC0*CF.N(.25,0,0)*CF.A(M.R(-45),0,M.R(45+5*M.C(Sine/12))),Alpha)
1695
			RS.C0 = RS.C0:lerp(RSC0*CF.N(-.25,0,0)*CF.A(M.R(-45),0,M.R(-45-5*M.C(Sine/12))),Alpha)
1696
			LH.C0 = LH.C0:lerp(LHC0*CF.N(0-.2*M.C(Sine/12),-.2*M.C(Sine/6),0)*CF.A(M.R(5-5*M.C(Sine/12)),M.R(10),0),Alpha)
1697
			RH.C0 = RH.C0:lerp(RHC0*CF.N(0-.2*M.C(Sine/12),-.2*M.C(Sine/6),0)*CF.A(M.R(5-5*M.C(Sine/12)),M.R(-10),0),Alpha)
1698
			-- idle
1699
		elseif(State == 'Run')then
1700
			local wsVal = 20 / (Hum.WalkSpeed/16)
1701
			local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
1702
			RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-15+2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha)
1703
			NK.C0 = NK.C0:lerp(NKC0,Alpha)
1704
			LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,0-.3*M.S(Sine/wsVal))*CF.A(M.R(0+45*M.S(Sine/wsVal)),0,M.R(-5)),Alpha)
1705
			RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,0+.3*M.S(Sine/wsVal))*CF.A(M.R(0-45*M.S(Sine/wsVal)),0,M.R(5)),Alpha)
1706
			LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
1707
			RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
1708
		elseif(State == 'Walk')then
1709
			local wsVal = 20 / (Hum.WalkSpeed/16)
1710
			local Alpha = math.min(.3 * (Hum.WalkSpeed/16),1)
1711
			RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-5-2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha)
1712
			NK.C0 = NK.C0:lerp(NKC0,Alpha)
1713
			LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,-.22*M.C(Sine/wsVal))*CF.A(M.R(37*M.C(Sine/wsVal)),0,M.R(-5)),Alpha)
1714
			RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,.22*M.C(Sine/wsVal))*CF.A(M.R(-37*M.C(Sine/wsVal)),0,M.R(5)),Alpha)
1715
			LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
1716
			RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
1717
		elseif(State == 'Jump')then
1718
			local Alpha = .1
1719
			local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
1720
			LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)),Alpha)
1721
			RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)),Alpha)
1722
			RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
1723
			NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
1724
			LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
1725
			RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
1726
		elseif(State == 'Fall')then
1727
			local Alpha = .1
1728
			local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
1729
			LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
1730
			RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
1731
			RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
1732
			NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
1733
			LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
1734
			RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
1735
		elseif(State == 'Paralyzed')then
1736
			-- paralyzed
1737
		elseif(State == 'Sit')then
1738
			-- sit
1739
		end
1740
	end
1741
	
1742
end