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