View difference between Paste ID: iM55sA0d and 0zFd0Qv6
SHOW: | | - or go back to the newest paste.
1
--https://github.com/Mokiros/roblox-FE-compatibility
2
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
3
local Player,game,owner = owner,game
4
local RealPlayer = Player
5
do
6
	print("FE Compatibility code V2 by Mokiros")
7
	local RealPlayer = RealPlayer
8
	script.Parent = RealPlayer.Character
9
10
	--Fake event to make stuff like Mouse.KeyDown work
11
	local Disconnect_Function = function(this)
12
		this[1].Functions[this[2]] = nil
13
	end
14
	local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
15
	local FakeEvent_Metatable = {__index={
16
		Connect = function(this,f)
17
			local i = tostring(math.random(0,10000))
18
			while this.Functions[i] do
19
				i = tostring(math.random(0,10000))
20
			end
21
			this.Functions[i] = f
22
			return setmetatable({this,i},Disconnect_Metatable)
23
		end
24
	}}
25
	FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
26
	local function fakeEvent()
27
		return setmetatable({Functions={}},FakeEvent_Metatable)
28
	end
29
30
	--Creating fake input objects with fake variables
31
    local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
32
    FakeMouse.keyUp = FakeMouse.KeyUp
33
    FakeMouse.keyDown = FakeMouse.KeyDown
34
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
35
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
36
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
37
	end}
38
	--Merged 2 functions into one by checking amount of arguments
39
	CAS.UnbindAction = CAS.BindAction
40
41
	--This function will trigger the events that have been :Connect()'ed
42
	local function TriggerEvent(self,ev,...)
43
		for _,f in pairs(self[ev].Functions) do
44
			f(...)
45
		end
46
	end
47
	FakeMouse.TriggerEvent = TriggerEvent
48
	UIS.TriggerEvent = TriggerEvent
49
50
	--Client communication
51
	local Event = Instance.new("RemoteEvent")
52
	Event.Name = "UserInput_Event"
53
	Event.OnServerEvent:Connect(function(plr,io)
54
	    if plr~=RealPlayer then return end
55
		FakeMouse.Target = io.Target
56
		FakeMouse.Hit = io.Hit
57
		if not io.isMouse then
58
			local b = io.UserInputState == Enum.UserInputState.Begin
59
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
60
				return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
61
			end
62
			if io.UserInputType == Enum.UserInputType.MouseButton2 then
63
				return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
64
			end
65
			for _,t in pairs(CAS.Actions) do
66
				for _,k in pairs(t.Keys) do
67
					if k==io.KeyCode then
68
						t.Function(t.Name,io.UserInputState,io)
69
					end
70
				end
71
			end
72
			FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
73
			UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
74
	    end
75
	end)
76
	Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
77
	local Mouse = owner:GetMouse()
78
	local UIS = game:GetService("UserInputService")
79
	local input = function(io,RobloxHandled)
80
		if RobloxHandled then return end
81
		--Since InputObject is a client-side instance, we create and pass table instead
82
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
83
	end
84
	UIS.InputBegan:Connect(input)
85
	UIS.InputEnded:Connect(input)
86
	local h,t
87
	--Give the server mouse data every second frame, but only if the values changed
88
	--If player is not moving their mouse, client won't fire events
89
	local HB = game:GetService("RunService").Heartbeat
90
	while true do
91
		if h~=Mouse.Hit or t~=Mouse.Target then
92
			h,t=Mouse.Hit,Mouse.Target
93
			Event:FireServer({isMouse=true,Target=t,Hit=h})
94
		end
95
		--Wait 2 frames
96
		for i=1,2 do
97
			HB:Wait()
98
		end
99
	end]==],script)
100
101
	----Sandboxed game object that allows the usage of client-side methods and services
102
	--Real game object
103
	local RealGame = game
104
105
	--Metatable for fake service
106
	local FakeService_Metatable = {
107
		__index = function(self,k)
108
			local s = rawget(self,"_RealService")
109
			if s then
110
				return typeof(s[k])=="function"
111
				and function(_,...)return s[k](s,...)end or s[k]
112
			end
113
		end,
114
		__newindex = function(self,k,v)
115
			local s = rawget(self,"_RealService")
116
			if s then s[k]=v end
117
		end
118
	}
119
	local function FakeService(t,RealService)
120
		t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
121
		return setmetatable(t,FakeService_Metatable)
122
	end
123
124
	--Fake game object
125
	local FakeGame = {
126
		GetService = function(self,s)
127
			return rawget(self,s) or RealGame:GetService(s)
128
		end,
129
		Players = FakeService({
130
			LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
131
		},"Players"),
132
		UserInputService = FakeService(UIS,"UserInputService"),
133
		ContextActionService = FakeService(CAS,"ContextActionService"),
134
		RunService = FakeService({
135
			_btrs = {},
136
			RenderStepped = RealGame:GetService("RunService").Heartbeat,
137
			BindToRenderStep = function(self,name,_,fun)
138
				self._btrs[name] = self.Heartbeat:Connect(fun)
139
			end,
140
			UnbindFromRenderStep = function(self,name)
141
				self._btrs[name]:Disconnect()
142
			end,
143
		},"RunService")
144
	}
145
	rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
146
	FakeGame.service = FakeGame.GetService
147
	FakeService(FakeGame,game)
148
	--Changing owner to fake player object to support owner:GetMouse()
149
	game,owner = FakeGame,FakeGame.Players.LocalPlayer
150
end
151
-- Created by Nebula_Zorua --
152
-- Your DeTERMINATION --
153
-- Y o u  a c t  l i k e  y o u  h a v e  a  c h o i c e. =) --
154
-- Discord: Nebula the Zorua#6969
155
-- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA
156
157
158
--// Initializing \\--
159
local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
160
local Plrs = S.Players
161
local Plr = Plrs.LocalPlayer
162
local Char = Plr.Character
163
local Hum = Char:FindFirstChildOfClass'Humanoid'
164
local RArm = Char["Right Arm"]
165
local LArm = Char["Left Arm"]
166
local RLeg = Char["Right Leg"]
167
local LLeg = Char["Left Leg"]	
168
local Root = Char:FindFirstChild'HumanoidRootPart'
169
local Torso = Char.Torso
170
local Head = Char.Head
171
local NeutralAnims = true
172
local Attack = false
173
local BloodPuddles = {}
174
local Effects = {}
175
local Debounces = {Debounces={}}
176
local Mouse = Plr:GetMouse()
177
local Hit = {}
178
local Sine = 0
179
local Change = 1
180
local Souls = 0
181
--// Debounce System \\--
182
183
184
function Debounces:New(name,cooldown)
185
	local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
186
	setmetatable(aaaaa,{__index = Debounces})
187
	Debounces.Debounces[name] = aaaaa
188
	return aaaaa
189
end
190
191
function Debounces:Use(overrideUsable)
192
	assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
193
	if(self.Usable or overrideUsable)then
194
		self.Usable = false
195
		self.CoolingDown = true
196
		local LastUse = time()
197
		self.LastUse = LastUse
198
		delay(self.Cooldown or 2,function()
199
			if(self.LastUse == LastUse)then
200
				self.CoolingDown = false
201
				self.Usable = true
202
			end
203
		end)
204
	end
205
end
206
207
function Debounces:Get(name)
208
	assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
209
	for i,v in next, Debounces.Debounces do
210
		if(i == name)then
211
			return v;
212
		end
213
	end
214
end
215
216
function Debounces:GetProgressPercentage()
217
	assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
218
	if(self.CoolingDown and not self.Usable)then
219
		return math.max(
220
			math.floor(
221
				(
222
					(time()-self.LastUse)/self.Cooldown or 2
223
				)*100
224
			)
225
		)
226
	else
227
		return 100
228
	end
229
end
230
231
--// Shortcut Variables \\--
232
local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
233
local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
234
local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
235
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}
236
local R3 = {N=Region3.new}
237
local De = S.Debris
238
local WS = workspace
239
local Lght = S.Lighting
240
local RepS = S.ReplicatedStorage
241
local IN = Instance.new
242
local CSK = ColorSequenceKeypoint.new
243
local CS = ColorSequence.new
244
--// Instance Creation Functions \\--
245
246
function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
247
	local Sound = IN("Sound")
248
	Sound.SoundId = "rbxassetid://".. tostring(id or 0)
249
	Sound.Pitch = pitch or 1
250
	Sound.Volume = volume or 1
251
	Sound.Looped = looped or false
252
	if(autoPlay)then
253
		coroutine.wrap(function()
254
			repeat wait() until Sound.IsLoaded
255
			Sound.Playing = autoPlay or false
256
		end)()
257
	end
258
	if(not looped and effect)then
259
		Sound.Stopped:connect(function()
260
			Sound.Volume = 0
261
			Sound:destroy()
262
		end)
263
	elseif(effect)then
264
		warn("Sound can't be looped and a sound effect!")
265
	end
266
	Sound.Parent =parent or Torso
267
	return Sound
268
end
269
function Part(parent,color,material,size,cframe,anchored,cancollide)
270
	local part = IN("Part")
271
	part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
272
	part.Material = (material or Enum.Material.SmoothPlastic)
273
	part.TopSurface,part.BottomSurface=10,10
274
	part.Size = (size or V3.N(1,1,1))
275
	part.CFrame = (cframe or CF.N(0,0,0))
276
	part.Anchored = (anchored or false)
277
	part.CanCollide = (cancollide or false)
278
	part.Parent = (parent or Char)
279
	return part
280
end
281
function Mesh(parent,meshtype,meshid,textid,scale,offset)
282
	local part = IN("SpecialMesh")
283
	part.MeshId = meshid or ""
284
	part.TextureId = textid or ""
285
	part.Scale = scale or V3.N(1,1,1)
286
	part.Offset = offset or V3.N(0,0,0)
287
	part.MeshType = meshtype or Enum.MeshType.Sphere
288
	part.Parent = parent
289
	return part
290
end
291
292
NewInstance = function(instance,parent,properties)
293
	local inst = Instance.new(instance,parent)
294
	if(properties)then
295
		for i,v in next, properties do
296
			pcall(function() inst[i] = v end)
297
		end
298
	end
299
	return inst;
300
end
301
302
303
304
--// Extended ROBLOX tables \\--
305
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})
306
--// Customization \\--
307
308
local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this
309
local Remove_Hats = false
310
local Remove_Clothing = true
311
local PlayerSize = 1
312
local DamageColor = BrickColor.new'Really red'
313
local MusicID = 669399163
314
local WalkSpeed = 8
315
local MaxSouls = 100
316
local MaxHealth = 500 
317
318
319
if(_G.RefusedAnimation == nil) then _G.RefusedAnimation = false end
320
321
--// Weapon and GUI creation, and Character Customization \\--
322
323
if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
324
if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
325
local Effects = IN("Folder",Char)
326
Effects.Name = "Effects"
327
328
Hum.MaxHealth = MaxHealth
329
Hum.Health = MaxHealth
330
331
local Knife = NewInstance("Part",Char,{Name='Knife',Size=V3.N(.4,3,.7),Anchored=false,CanCollide=false,Locked=true,Archivable=false,Reflectance=.01,Color=C3.N(0,0,0)})
332
local KnifeMesh = Mesh(Knife,Enum.MeshType.FileMesh,"rbxassetid://121944778","rbxassetid://362719969",V3.N(1,1,1),V3.N())
333
local AuraEmitter = NewInstance("ParticleEmitter",Knife,{EmissionDirection='Back',Color=CS{CSK(0,C3.N(1,0,0)),CSK(0.5,C3.N(1,1,0)),CSK(1,C3.RGB(255,191,0))},LightEmission=.5,LightInfluence=0,Size=NumberSequence.new(0.3),Texture="rbxassetid://141116476",Transparency=NumberSequence.new(0,1),LockedToPart=true,Lifetime=NumberRange.new(1),Rate=150,Speed=NumberRange.new(0)})
334
local FireEmitter = NewInstance("ParticleEmitter",Knife,{EmissionDirection='Back',Color=CS(C3.N(1,0,0),C3.N(1,0,0)),LightEmission=.5,LightInfluence=0,Size=NumberSequence.new{NumberSequenceKeypoint.new(0,.5,0),NumberSequenceKeypoint.new(0.755,0,0),NumberSequenceKeypoint.new(1,0,0)},Texture="rbxassetid://141116476",Transparency=NumberSequence.new(0.35,1),Lifetime=NumberRange.new(1,2),Rate=150,Speed=NumberRange.new(3)})
335
336
local KTrail = NewInstance("Trail",Knife,{
337
	Attachment0=NewInstance("Attachment",Knife,{Position=V3.N(0,-.4,0)}),
338
	Attachment1=NewInstance("Attachment",Knife,{Position=V3.N(0,1.2,0)}),
339
	Color=CS(C3.N(1,0,0)),
340
	Enabled=false,
341
	Transparency=NumberSequence.new(0,1),
342
	Lifetime=1.25,
343
})
344
local Hair = Part(Char,C3.N(0,0,0),Enum.Material.SmoothPlastic,V3.N(1,1,1),CF.N(),false,false)
345
local HairMesh = Mesh(Hair,Enum.MeshType.FileMesh,"rbxassetid://250264520","rbxassetid://75975464",V3.N(1.05,1.05,1.05),V3.N())
346
347
NewInstance("PointLight",Knife,{Color=C3.N(1,0,0),Range=10,Brightness=3})
348
349
350
Hum.DisplayDistanceType = 'None'
351
352
local naeeym2 = IN("BillboardGui",Char)
353
naeeym2.AlwaysOnTop = true
354
naeeym2.Size = UDim2.new(5,35,2,15)
355
naeeym2.StudsOffset = V3.N(0,2.5,0)
356
naeeym2.Adornee = Char.Head
357
naeeym2.Name = "Name"
358
naeeym2.PlayerToHideFrom = Plr
359
local tecks2 = IN("TextLabel",naeeym2)
360
tecks2.BackgroundTransparency = 1
361
tecks2.TextScaled = true
362
tecks2.BorderSizePixel = 0
363
tecks2.Text = "Chara"
364
tecks2.Font = Enum.Font.Bodoni
365
tecks2.TextSize = 30
366
tecks2.TextStrokeTransparency = 0
367
tecks2.TextColor3 = C3.N(0,0,0)
368
tecks2.TextStrokeColor3 = C3.N(.7,0,0)
369
tecks2.Size = UDim2.new(1,0,0.5,0)
370
tecks2.Parent = naeeym2
371
372
373
IN("Shirt",Char)
374
IN("Pants",Char)
375
376
Hum.WalkSpeed = WalkSpeed
377
if(PlayerSize ~= 1)then
378
	for _,v in next, Char:GetDescendats() do
379
		if(v:IsA'BasePart')then
380
			v.Size = v.Size * PlayerSize
381
		end
382
	end
383
end
384
385
386
for i = 1, 35 do
387
	local FACE = Part(Char,C3.N(0,0,0),Enum.Material.Neon,V3.N(1.01,.5,1.01),CF.N(),false,false)
388
	FACE.Transparency = 0+(i-1)/35.2
389
	FACE.Name = 'ShadowFace'
390
	Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
391
	NewInstance("Weld",Head,{Part0=Head,Part1=FACE,C0=CF.N(0,.35-(i-1)/75,0)})
392
	--CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0))
393
end
394
395
local LEye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false)
396
local LEyeM = Mesh(LEye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N())
397
local LEyeW = NewInstance("Weld",LEye,{Part0=Head,Part1=LEye,C0=CF.N(-.2,.2,-.49)})
398
399
local REye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false)
400
local REyeM = Mesh(REye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N())
401
local REyeW = NewInstance("Weld",REye,{Part0=Head,Part1=REye,C0=CF.N(.2,.2,-.49)})
402
403
404
pcall(function()
405
	Char.LeftWing:destroy()
406
	Char.ReaperShadowHead:destroy()
407
end)
408
409
410
local Music = Sound(Torso,MusicID,1,3,true,false,true)
411
Music.Name = 'Music'
412
413
--// Stop animations \\--
414
for _,v in next, Hum:GetPlayingAnimationTracks() do
415
	v:Stop();
416
end
417
418
pcall(game.Destroy,Char:FindFirstChild'Animate')
419
pcall(game.Destroy,Hum:FindFirstChild'Animator')
420
421
--// Joints \\--
422
423
local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
424
local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
425
local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)})
426
local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
427
local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
428
local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
429
local HW = NewInstance('Motor',Char,{Part0=RArm,Part1=Knife,C0=CF.N(0,-1,-1)*CF.A(M.R(-90),0,0)})
430
local HW2 = NewInstance('Motor',Char,{Part0=Head,Part1=Hair,C0=CF.N(0,.25,0)})
431
432
local LSC0 = LS.C0
433
local RSC0 = RS.C0
434
local NKC0 = NK.C0
435
local LHC0 = LH.C0
436
local RHC0 = RH.C0
437
local RJC0 = RJ.C0
438
439
--// Artificial HB \\--
440
441
local ArtificialHB = IN("BindableEvent", script)
442
ArtificialHB.Name = "Heartbeat"
443
444
script:WaitForChild("Heartbeat")
445
446
local tf = 0
447
local allowframeloss = false
448
local tossremainder = false
449
local lastframe = tick()
450
local frame = 1/Frame_Speed
451
ArtificialHB:Fire()
452
453
game:GetService("RunService").Heartbeat:connect(function(s, p)
454
	tf = tf + s
455
	if tf >= frame then
456
		if allowframeloss then
457
			script.Heartbeat:Fire()
458
			lastframe = tick()
459
		else
460
			for i = 1, math.floor(tf / frame) do
461
				ArtificialHB:Fire()
462
			end
463
			lastframe = tick()
464
		end
465
		if tossremainder then
466
			tf = 0
467
		else
468
			tf = tf - frame * math.floor(tf / frame)
469
		end
470
	end
471
end)
472
473
function swait(num)
474
	if num == 0 or num == nil then
475
		ArtificialHB.Event:wait()
476
	else
477
		for i = 0, num do
478
			ArtificialHB.Event:wait()
479
		end
480
	end
481
end
482
483
484
--// Effect Function(s) \\--
485
486
function Bezier(startpos, pos2, pos3, endpos, t)
487
	local A = startpos:lerp(pos2, t)
488
	local B  = pos2:lerp(pos3, t)
489
	local C = pos3:lerp(endpos, t)
490
	local lerp1 = A:lerp(B, t)
491
	local lerp2 = B:lerp(C, t)
492
	local cubic = lerp1:lerp(lerp2, t)
493
	return cubic
494
end
495
496
function Tween(obj,props,time,easing,direction,repeats,backwards)
497
	local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false)
498
	local tween = S.TweenService:Create(obj, info, props)
499
	
500
	tween:Play()
501
end
502
503
local FXTable = {}
504
505
coroutine.resume(coroutine.create(function()
506
	while true do
507
		for i = 1, #FXTable do
508
			local data = FXTable[i]
509
			if(data)then
510
				local Frame = data.Frame
511
				local FX = data.Effect or 'ResizeAndFade'
512
				local Parent = data.Parent or Effects
513
				local Color = data.Color or C3.N(0,0,0)
514
				local Size = data.Size or V3.N(1,1,1)
515
				local MoveDir = data.MoveDirection or nil
516
				local MeshData = data.Mesh or nil
517
				local SndData = data.Sound or nil
518
				local Frames = data.Frames or 45
519
				local CFra = data.CFrame or Torso.CFrame
520
				local Settings = data.FXSettings or {}
521
				local Prt,Msh,Snd = data.Part,data.Mesh,data.Sound
522
				local grow = data.Grow
523
				
524
				local MoveSpeed = nil;
525
				if(MoveDir)then
526
					MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
527
				end
528
				if(FX ~= 'Arc')then
529
					Frame = Frame + 1
530
					if(FX == "Fade")then
531
						Prt.Transparency  = (Frame/Frames)
532
					elseif(FX == "Resize")then
533
						if(not Settings.EndSize)then
534
							Settings.EndSize = V3.N(0,0,0)
535
						end
536
						if(Settings.EndIsIncrement)then
537
							if(Msh)then
538
								Msh.Scale = Msh.Scale + Settings.EndSize
539
							else
540
								Prt.Size = Prt.Size + Settings.EndSize
541
							end					
542
						else
543
							if(Msh)then
544
								Msh.Scale = Msh.Scale - grow/Frames
545
							else
546
								Prt.Size = Prt.Size - grow/Frames
547
							end
548
						end 
549
					elseif(FX == "ResizeAndFade")then
550
						if(not Settings.EndSize)then
551
							Settings.EndSize = V3.N(0,0,0)
552
						end
553
						if(Settings.EndIsIncrement)then
554
							if(Msh)then
555
								Msh.Scale = Msh.Scale + Settings.EndSize
556
							else
557
								Prt.Size = Prt.Size + Settings.EndSize
558
							end					
559
						else
560
							if(Msh)then
561
								Msh.Scale = Msh.Scale - grow/Frames
562
							else
563
								Prt.Size = Prt.Size - grow/Frames
564
							end
565
						end 
566
						Prt.Transparency = (Frame/Frames)
567
					end
568
					if(Settings.RandomizeCFrame)then
569
						Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
570
					end
571
					if(MoveDir and MoveSpeed)then
572
						local Orientation = Prt.Orientation
573
						Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
574
						Prt.Orientation = Orientation
575
					end
576
					if(Prt.Transparency >= 1 or Frame >= Frames)then
577
						Prt:destroy()
578
						table.remove(FXTable,i)
579
					else
580
						data.Frame = Frame
581
					end
582
				else
583
					local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
584
					if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
585
					if(start and endP)then
586
						local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
587
						local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
588
						Frame = Frame + (Settings.Speed or 0.01)
589
						if(Settings.Home)then
590
							endP = Settings.Home.CFrame
591
						end
592
						Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame)
593
						if(Prt.Transparency >= 1 or Frame >= Frames)then
594
							if(Settings.RemoveOnGoal)then
595
								Prt:destroy()
596
							end
597
						end
598
					else
599
						Prt:destroy()
600
					end
601
				end
602
			end
603
		end
604
		swait()
605
	end
606
end))
607
608
function Effect(data)
609
	local FX = data.Effect or 'ResizeAndFade'
610
	local Parent = data.Parent or Effects
611
	local Color = data.Color or C3.N(0,0,0)
612
	local Size = data.Size or V3.N(1,1,1)
613
	local MoveDir = data.MoveDirection or nil
614
	local MeshData = data.Mesh or nil
615
	local SndData = data.Sound or nil
616
	local Frames = data.Frames or 45
617
	local Manual = data.Manual or nil
618
	local Material = data.Material or nil
619
	local CFra = data.CFrame or Torso.CFrame
620
	local Settings = data.FXSettings or {}
621
	local Shape = data.Shape or Enum.PartType.Block
622
	local Snd,Prt,Msh;
623
	coroutine.wrap(function()
624
		if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then
625
			Prt = Manual
626
		else
627
			Prt = Part(Parent,Color,Material,Size,CFra,true,false)
628
			Prt.Shape = Shape
629
		end
630
		if(typeof(MeshData) == 'table')then
631
			Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset)
632
		elseif(typeof(MeshData) == 'Instance')then
633
			Msh = MeshData:Clone()
634
			Msh.Parent = Prt
635
		elseif(Shape == Enum.PartType.Block)then
636
			Msh = Mesh(Prt,Enum.MeshType.Brick)
637
		end
638
		if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then
639
			Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true)
640
		end
641
		if(Snd)then
642
			repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0
643
			Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch
644
		end
645
		Size = (Msh and Msh.Scale or Size)
646
		local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2)
647
		
648
		local MoveSpeed = nil;
649
		if(MoveDir)then
650
			MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
651
		end
652
		if(FX ~= 'Arc')then
653
			for Frame = 1, Frames do
654
				if(FX == "Fade")then
655
					Prt.Transparency  = (Frame/Frames)
656
				elseif(FX == "Resize")then
657
					if(not Settings.EndSize)then
658
						Settings.EndSize = V3.N(0,0,0)
659
					end
660
					if(Settings.EndIsIncrement)then
661
						if(Msh)then
662
							Msh.Scale = Msh.Scale + Settings.EndSize
663
						else
664
							Prt.Size = Prt.Size + Settings.EndSize
665
						end					
666
					else
667
						if(Msh)then
668
							Msh.Scale = Msh.Scale - grow/Frames
669
						else
670
							Prt.Size = Prt.Size - grow/Frames
671
						end
672
					end 
673
				elseif(FX == "ResizeAndFade")then
674
					if(not Settings.EndSize)then
675
						Settings.EndSize = V3.N(0,0,0)
676
					end
677
					if(Settings.EndIsIncrement)then
678
						if(Msh)then
679
							Msh.Scale = Msh.Scale + Settings.EndSize
680
						else
681
							Prt.Size = Prt.Size + Settings.EndSize
682
						end					
683
					else
684
						if(Msh)then
685
							Msh.Scale = Msh.Scale - grow/Frames
686
						else
687
							Prt.Size = Prt.Size - grow/Frames
688
						end
689
					end 
690
					Prt.Transparency = (Frame/Frames)
691
				end
692
				if(Settings.RandomizeCFrame)then
693
					Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
694
				end
695
				if(MoveDir and MoveSpeed)then
696
					local Orientation = Prt.Orientation
697
					Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
698
					Prt.Orientation = Orientation
699
				end
700
				swait()
701
			end
702
			Prt:destroy()
703
		else
704
			local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
705
			if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
706
			if(start and endP)then
707
				local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
708
				local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
709
				for Frame = 0, 1, (Settings.Speed or 0.01) do
710
					if(Settings.Home)then
711
						endP = Settings.Home.CFrame
712
					end
713
					Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame)
714
				end
715
				if(Settings.RemoveOnGoal)then
716
					Prt:destroy()
717
				end
718
			else
719
				Prt:destroy()
720
				assert(start,"You need a start position!")
721
				assert(endP,"You need a start position!")
722
			end
723
		end
724
	end)()
725
	return Prt,Msh,Snd
726
end
727
728
729
730
function SoulSteal(whom,human)
731
	local torso = (whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart' or whom:FindFirstChild'Torso')
732
	local succ, health, alive = pcall(function() return whom:FindFirstChildOfClass'Humanoid'.Health, whom:FindFirstChildOfClass'Humanoid'.Health > 0 end)
733
	if(torso and torso:IsA'BasePart' and alive == true)then
734
		whom:FindFirstChildOfClass'Humanoid'.Health = 0
735
		whom:BreakJoints()
736
		local Model = IN("Model",Effects)
737
		warn('Soul stolen from '..whom.Name)
738
		Model.Name = whom.Name.."'s Soul"
739
		local Soul = Part(Model,(human and BrickColor.new'Really red' or BrickColor.new(C3.N(1,1,1))),'Glass',V3.N(1,1,1),torso.CFrame,true,false)
740
		Soul.CanCollide=false
741
		Mesh(Soul,Enum.MeshType.Sphere)
742
		Soul.Name = 'Head'
743
		if(whom.Name == 'CKbackup')then
744
			Soul.Color = C3.N(1,1,1)
745
			local DripEmitter = NewInstance("ParticleEmitter",Soul,{EmissionDirection='Bottom',Color=CS(Soul.Color),LightEmission=.5,LightInfluence=0,Size=NumberSequence.new(0.3),Texture="rbxassetid://243132757",Transparency=NumberSequence.new(0,1),LockedToPart=false,Lifetime=NumberRange.new(1),Rate=150,Speed=NumberRange.new(5)})
746
		end
747
		local Hoom = NewInstance("Humanoid",Model,{MaxHealth=(health <= 10000 and health/2 or 10000),Health=(health <= 10000 and health/2 or 10000)})
748
		local AT0 = NewInstance("Attachment",Soul,{Position=V3.N(0,.5,0)})
749
		local AT1 = NewInstance("Attachment",Soul,{Position=V3.N(0,-.5,0)})
750
		local Trail = NewInstance("Trail",Soul,{Attachment0=AT0,Attachment1=AT1,Transparency=NumberSequence.new(0),FaceCamera = true,Texture="rbxassetid://945758042",LightEmission=.3,Color=CS(Soul.Color),Lifetime=.5,MinLength=0})
751
		NewInstance("PointLight",Soul,{Color=Soul.Color,Range=10,Brightness=(human and 3 or .5)})
752
		
753
		local turdso = Soul:Clone()
754
		turdso.Name = "Torso"
755
		turdso.CanCollide = false
756
		turdso.Anchored = true
757
		turdso.CFrame = Soul.CFrame
758
		turdso.Parent = Model
759
		turdso.Size = V3.N()
760
		turdso.Transparency=1
761
		local Distance = math.huge
762
		repeat
763
			Soul.CFrame = CF.N(Soul.Position,Torso.Position)*CF.N(0,0,-1)
764
			turdso.CFrame = Soul.CFrame
765
			Distance = (Soul.CFrame.p-Torso.CFrame.p).magnitude
766
			swait()
767
		until Hoom.Health <= 0 or not Soul.Parent or Distance <= 1.2
768
		if(Soul.Parent and Hoom.Health > 0)then
769
			Model:destroy()
770
			Effect{
771
				Effect="ResizeAndFade",
772
				Mesh={Enum.MeshType.Sphere},
773
				Color = Soul.Color,
774
				CFrame=Torso.CFrame,
775
				Size=V3.N(3,3,3),
776
				Material=Enum.Material.Neon,
777
				Sound={SoundId=444667859,Pitch=1,Volume=2.5},
778
				FXSettings={
779
					EndSize=V3.N(6,6,6),
780
				}
781
			}
782
			Souls = Souls + (human and 1 or .1)
783
			warn("Souls: "..Souls)
784
			MaxHealth = MaxHealth + Hoom.Health
785
			Hum.Health = Hum.Health + Hoom.Health
786
			for i = 1, 5 do
787
				Effect{
788
					Effect="Fade",
789
					Color = Soul.Color,
790
					MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
791
				}	
792
			end
793
		else
794
			
795
			warn("Soul destroyed!")
796
			for i = 1, 5 do
797
				Effect{
798
					Effect="Fade",
799
					Color = Soul.Color,
800
					CFrame=Soul.CFrame,
801
					MoveDirection = (Soul.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
802
				}	
803
			end
804
			Effect{
805
				Effect="ResizeAndFade",
806
				Mesh={Enum.MeshType.Sphere},
807
				Sound={SoundId=444667859,Pitch=1,Volume=5},
808
				Color = Soul.Color,
809
				CFrame=Soul.CFrame,
810
				Size=V3.N(3,3,3),
811
				Material=Enum.Material.Neon,
812
				FXSettings={
813
					EndSize=V3.N(6,6,6),
814
				}
815
			}
816
			Model:destroy()
817
		end
818
	end
819
end
820
821
--// Other Functions \\ --
822
823
function getRegion(point,range,ignore)
824
    return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
825
end
826
827
function clerp(startCF,endCF,alpha)
828
	return startCF:lerp(endCF, alpha)
829
end
830
831
function GetTorso(char)
832
	return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
833
end
834
835
function ShowDamage(Pos, Text, Time, Color)
836
	coroutine.wrap(function()
837
	local Rate = (1 / Frame_Speed)
838
	local Pos = (Pos or Vector3.new(0, 0, 0))
839
	local Text = (Text or "")
840
	local Time = (Time or 2)
841
	local Color = (Color or Color3.new(1, 0, 1))
842
	local EffectPart = NewInstance("Part",Effects,{
843
		Material=Enum.Material.SmoothPlastic,
844
		Reflectance = 0,
845
		Transparency = 1,
846
		BrickColor = BrickColor.new(Color),
847
		Name = "Effect",
848
		Size = Vector3.new(0,0,0),
849
		Anchored = true,
850
		CFrame = CF.N(Pos)
851
	})
852
	local BillboardGui = NewInstance("BillboardGui",EffectPart,{
853
		Size = UDim2.new(1.25, 0, 1.25, 0),
854
		Adornee = EffectPart,
855
	})
856
	local TextLabel = NewInstance("TextLabel",BillboardGui,{
857
		BackgroundTransparency = 1,
858
		Size = UDim2.new(1, 0, 1, 0),
859
		Text = Text,
860
		Font = "Arcade",
861
		TextColor3 = Color,
862
		TextStrokeColor3 = Color3.new(0,0,0),
863
		TextStrokeTransparency=0,
864
		TextScaled = true,
865
	})
866
	S.Debris:AddItem(EffectPart, (Time))
867
	EffectPart.Parent = workspace
868
	delay(0, function()
869
		Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
870
		local Frames = (Time / Rate)
871
		for Frame = 1, Frames do
872
			swait()
873
			local Percent = (Frame / Frames)
874
			TextLabel.TextTransparency = Percent
875
			TextLabel.TextStrokeTransparency = Percent
876
		end
877
		if EffectPart and EffectPart.Parent then
878
			EffectPart:Destroy()
879
		end
880
	end) end)()
881
end
882
883
function Kill(whom)
884
	if(whom.Name ~= 'Nebula_Zorua')then
885
		local isPlr = Plrs:GetPlayerFromCharacter(whom) ~= nil
886
		coroutine.wrap(SoulSteal)(whom,isPlr)
887
		for _,v in next, whom:children() do
888
			if(v:IsA'BasePart')then
889
				v.Parent = Effects
890
				v:ClearAllChildren()
891
				v.Anchored = true
892
				v.CanCollide = false
893
				v.Transparency = 1
894
				local dust = NewInstance("ParticleEmitter",v,{
895
					Color = ColorSequence.new(C3.N(1,1,1)),
896
					LightEmission=0,
897
					LightInfluence=1,
898
					Size=NumberSequence.new{NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(1,0,0)},
899
					Texture="rbxassetid://284205403",
900
					Transparency=NumberSequence.new{NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,0)},
901
					Lifetime = NumberRange.new(1),
902
					Rate=150,
903
					Acceleration = V3.N(0,10,0),
904
					Speed = NumberRange.new(5),
905
					Enabled = true
906
				})
907
				delay(1, function()
908
					dust.Enabled = false
909
					S.Debris:AddItem(v,2)
910
				end)
911
			end
912
		end
913
	else
914
		warn"nope. nawt happenin'"
915
	end
916
end
917
918
function DealDamage(who,minDam,maxDam,Knock,Type,critChance,critMult)
919
	if(who)then
920
		local hum = who:FindFirstChildOfClass'Humanoid'
921
		local Damage = M.RNG(minDam,maxDam)
922
		local canHit = true
923
		if(hum)then
924
			for _, p in pairs(Hit) do
925
				if p[1] == hum then
926
					if(time() - p[2] < 0.4) then
927
						canHit = false
928
					else
929
						Hit[_] = nil
930
					end
931
				end
932
			end
933
			if(canHit)then
934
				table.insert(Hit,{hum,time()})
935
				if(GetTorso(who))then
936
					Sound(GetTorso(who),406913243,1,10,false,true,true)
937
				end
938
				if(hum.Health >= math.huge)then
939
					Kill(who)
940
					if(who:FindFirstChild'Head' and hum.Health > 0)then
941
						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", 3, DamageColor.Color)
942
					end
943
				else
944
					local player = S.Players:GetPlayerFromCharacter(who)
945
					if(Type == "Fire")then
946
						--idk..
947
					else
948
						local  c = Instance.new("ObjectValue",hum)
949
						c.Name = "creator"
950
						c.Value = Plr
951
						game:service'Debris':AddItem(c,0.35)
952
						local Crit = false
953
						if(M.RNG(1,100) <= (critChance or 0) and critMult > 1)then
954
							Crit = true
955
							Damage = Damage*(critMult or 2)
956
						end
957
						Damage = Damage*((Souls/5)+1)
958
						if(who:FindFirstChild'Head' and hum.Health > 0)then
959
							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 and "[CRIT] " or "").. math.floor(Damage), 3, (Crit and BrickColor.new'New Yeller'.Color or DamageColor.Color))
960
						end
961
						
962
						if(hum.Health - Damage <= 0)then
963
							Kill(who)
964
						else
965
							hum.Health = hum.Health - Damage
966
							if(Type == 'Knockback' and GetTorso(who))then
967
								local angle = GetTorso(who).Position - Root.Position + Vector3.new(0, 0, 0).unit
968
								local body = NewInstance('BodyVelocity',GetTorso(who),{
969
									P = 500,
970
									maxForce = V3.N(math.huge,0,math.huge),
971
									velocity = Root.CFrame.lookVector * Knock + Root.Velocity / 1.05
972
								})
973
								game:service'Debris':AddItem(body,.5)
974
							elseif(Type == "Electric")then
975
								if(M.RNG(1,100) >= critChance)then
976
									if(who:FindFirstChild'Head' and hum.Health > 0)then
977
										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]", 3, BrickColor.new"New Yeller".Color)
978
									end
979
									local asd = hum.WalkSpeed/2
980
									hum.WalkSpeed = asd
981
									local paralyzed = true
982
									coroutine.wrap(function()
983
										while paralyzed do
984
											swait(25)
985
											if(M.RNG(1,25) == 1)then
986
												if(who:FindFirstChild'Head' and hum.Health > 0)then
987
													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]", 3, BrickColor.new"New Yeller".Color)
988
												end
989
												hum.PlatformStand = true
990
											end
991
										end
992
									end)()
993
									delay(4, function()
994
										paralyzed = false
995
										hum.WalkSpeed = hum.WalkSpeed + asd
996
									end)
997
								end
998
								
999
							elseif(Type == 'Knockdown' and GetTorso(who))then
1000
								local rek = GetTorso(who)
1001
								hum.PlatformStand = true
1002
								delay(1,function()
1003
									hum.PlatformStand = false
1004
								end)
1005
								local angle = (GetTorso(who).Position - (Root.Position + Vector3.new(0, 0, 0))).unit
1006
								local bodvol = NewInstance("BodyVelocity",rek,{
1007
									velocity = angle * Knock,
1008
									P = 5000,
1009
									maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
1010
								})
1011
								local rl = NewInstance("BodyAngularVelocity",rek,{
1012
									P = 3000,
1013
									maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
1014
									angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
1015
								})
1016
								game:GetService("Debris"):AddItem(bodvol, .5)
1017
								game:GetService("Debris"):AddItem(rl, .5)
1018
							end
1019
						end
1020
					end
1021
				end
1022
			end
1023
		end
1024
	end
1025
end
1026
1027
1028
function AOEDamage(where,range,minDam,maxDam,Knock,Type,critChance,critMult)
1029
	for _,v in next, getRegion(where,range,{Char}) do
1030
		if(v.Name ~= 'Nebula_Zorua')then
1031
			if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then
1032
				DealDamage(v.Parent,minDam,maxDam,Knock,Type,critChance,critMult)
1033
			end
1034
		end
1035
	end
1036
end
1037
1038
function AOEKill(where,range)
1039
	for _,v in next, getRegion(where,range,{Char,Effects}) do
1040
		local succ,alive = pcall(function() return v.Parent:FindFirstChildOfClass'Humanoid'.Health > 0 end)
1041
		if(v.Name ~= 'Nebula_Zorua')then
1042
			if(v.Parent and alive == true)then
1043
				coroutine.wrap(Kill)(v.Parent)
1044
			end
1045
		end
1046
	end
1047
end
1048
1049
function AOEHeal(where,range,amount)
1050
	local healed = {}
1051
	for _,v in next, getRegion(where,range,{Char}) do
1052
		local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
1053
		if(hum and not healed[hum])then
1054
			hum.Health = hum.Health + amount
1055
			if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then
1056
				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)
1057
			end
1058
		end
1059
	end
1060
end
1061
1062
1063
--// Attack Functions \\--
1064
1065
1066
function Slash()
1067
	Attack = true
1068
	NeutralAnims = false
1069
	local sound = Sound(Knife,437475935,1,5,false,true,false)
1070
	for i = 0, 2, 0.1 do
1071
		swait()
1072
		local Alpha = .2
1073
		RJ.C0 = clerp(RJ.C0,CFrame.new(0.0343287587, 0.00629056804, 0.0572580174, 0.943793893, 0.00207689893, 0.330528289, 1.0000764e-06, 0.99998033, -0.00628630351, -0.330534875, 0.00593330665, 0.943775296),Alpha)
1074
		LH.C0 = clerp(LH.C0,CFrame.new(-0.496478021, -0.990818381, 0.021652732, 0.999878168, 0, 0.0156089365, -9.80779296e-05, 0.99998033, 0.00628268253, -0.0156086385, -0.00628344761, 0.999858379),Alpha)
1075
		RH.C0 = clerp(RH.C0,CFrame.new(0.498511612, -0.990985274, 0.0154910646, 0.999878168, 0, 0.0156089365, -9.80779296e-05, 0.99998033, 0.00628268253, -0.0156086385, -0.00628344761, 0.999858379),Alpha)
1076
		LS.C0 = clerp(LS.C0,CFrame.new(-1.32692134, 0.474511296, -0.0055731535, 0.934981823, 0.354351997, 0.0156129003, -0.354479939, 0.93504262, 0.00628374517, -0.0123721063, -0.0114096552, 0.999858379),Alpha)
1077
		RS.C0 = clerp(RS.C0,CFrame.new(1.12629449, 0.369358033, -0.486052871, 0.490151912, 0.65154773, 0.57899636, 0.721657813, 0.0691910982, -0.688783586, -0.488836735, 0.755445719, -0.436280251),Alpha)
1078
		NK.C0 = clerp(NK.C0,CFrame.new(-0.0118216109, 1.49854016, -0.0795068145, 0.943793833, 0.0190048125, -0.329988182, 0.00207654224, 0.997985244, 0.0634154305, 0.330528468, -0.0605363287, 0.94185257),Alpha)
1079
		HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
1080
	end
1081
	KTrail.Enabled = true
1082
	sound:Play()
1083
	for i = 0, 2.5, 0.1 do
1084
		swait()
1085
		AOEDamage(Knife.CFrame.p,1,15,30,0,"Normal",0,1)
1086
		local Alpha = .25
1087
		RJ.C0 = clerp(RJ.C0,CFrame.new(-0.0352100767, 0.00629066909, -0.0097481478, 0.817972422, -0.00361463916, -0.575246274, -1.74103582e-06, 0.99998033, -0.00628598873, 0.575257719, 0.00514276745, 0.817956269),Alpha)
1088
		LH.C0 = clerp(LH.C0,CFrame.new(-0.496478021, -0.990818381, 0.0216572341, 0.999878287, 0, 0.015610218, -9.80866607e-05, 0.99998033, 0.00628274865, -0.0156098902, -0.00628351374, 0.999858499),Alpha)
1089
		RH.C0 = clerp(RH.C0,CFrame.new(0.498511702, -0.990985274, 0.0154905058, 0.999878287, 0, 0.015610218, -9.80866607e-05, 0.99998033, 0.00628274865, -0.0156098902, -0.00628351374, 0.999858499),Alpha)
1090
		LS.C0 = clerp(LS.C0,CFrame.new(-1.32694602, 0.474510223, -0.00555660389, 0.934981823, 0.354351729, 0.0156157613, -0.354479671, 0.935042739, 0.00628153514, -0.012375474, -0.0114085823, 0.999858379),Alpha)
1091
		RS.C0 = clerp(RS.C0,CFrame.new(1.23906493, 0.406229913, 0.00231830776, 0.49015066, -0.849889755, 0.193494052, 0.721655607, 0.520183682, 0.456752002, -0.488841236, -0.0842411816, 0.868295968),Alpha)
1092
		NK.C0 = clerp(NK.C0,CFrame.new(0.0315471888, 1.49887729, -0.0257819965, 0.817972481, -0.0330747738, 0.574305832, -0.00361499586, 0.998030663, 0.0626262054, -0.575246155, -0.0533026271, 0.81624186),Alpha)
1093
		HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
1094
	end
1095
	KTrail.Enabled = false
1096
	Attack = false
1097
	NeutralAnims = true
1098
end
1099
1100
Mouse.Button1Down:connect(function()
1101
	if(Attack)then return end
1102
	Slash()	
1103
end)
1104
1105
Mouse.KeyDown:connect(function(k)
1106
	if(Attack)then return end
1107
	if(k == 'z')then AOEKill(Root.CFrame.p,25) end -- TODO: Animation and effects
1108
	if(k == 'q')then WalkSpeed = (WalkSpeed == 8 and 32 or 8) end	
1109
end)
1110
1111
1112
function Refuse()
1113
	Attack = true
1114
	warn("B u t  i t  r e f u s e d.")
1115
	local oMH = MaxHealth
1116
	MaxHealth = "inf"
1117
	Hum.MaxHealth = "inf"
1118
	Hum.Health = "inf"
1119
	Char.Parent = nil
1120
	Hum:destroy()
1121
	if(not _G.RefusedAnimation)then
1122
		_G.RefusedAnimation = true
1123
		
1124
	
1125
		local Soul;
1126
		function Soul(where,decalId)
1127
			local destroy = false	
1128
			local soul = NewInstance("Part",workspace)
1129
			soul.Name = "Soul"
1130
			soul.Transparency=1
1131
			soul.Size = V3.N(2,2,.05)
1132
			soul.Anchored=true
1133
			soul.CanCollide=false
1134
			soul.CFrame = where
1135
			local heartF = NewInstance("Decal",soul,{Face=Enum.NormalId.Front,Texture="rbxassetid://"..decalId})
1136
			local heartB = NewInstance("Decal",soul,{Face=Enum.NormalId.Back,Texture="rbxassetid://"..decalId})
1137
			return soul,heartF,heartB
1138
		end
1139
		local owo = Root.CFrame
1140
		local s,f,b = Soul(owo,1569347904)
1141
		swait(60)
1142
		local snd = Sound(s,862552636,1,5,false,false,false)
1143
		snd:Play()
1144
		f.Texture = "rbxassetid://1569348344"
1145
		b.Texture = "rbxassetid://1569348344"
1146
		swait(15)
1147
		snd:Stop()
1148
		swait(60)
1149
		print'lol'
1150
		for i = 0, 6, .1 do
1151
			swait()
1152
			s.CFrame = owo * CF.N(M.RNG(-50,50)/100,M.RNG(-50,50)/100,M.RNG(-50,50)/100)
1153
		end
1154
		local snd = Sound(s,862552636,1,5,false,false,false)
1155
		snd:Play()
1156
		s.CFrame = owo
1157
		f.Texture = "rbxassetid://1569347904"
1158
		b.Texture = "rbxassetid://1569347904"
1159
		swait(15)
1160
		snd:Stop()
1161
		swait(60)
1162
	
1163
		s:destroy()
1164
	end
1165
	
1166
	RJ.Parent = Char
1167
	LS.Parent = Char
1168
	RS.Parent = Char
1169
	LH.Parent = Char
1170
	RH.Parent = Char
1171
	NK.Parent = Char
1172
	
1173
	LArm.Parent = Char
1174
	RArm.Parent = Char
1175
	LLeg.Parent = Char
1176
	LArm.Parent = Char
1177
	Root.Parent = Char
1178
	Torso.Parent = Char
1179
	Head.Parent = Char
1180
	
1181
	Knife.Parent = Char
1182
	Hair.Parent = Char
1183
	
1184
	HW.Parent = Char
1185
	HW2.Parent = Char
1186
	
1187
1188
	REye:destroy()
1189
	LEye:destroy()
1190
	
1191
	for _,v in next, Char:children() do
1192
		if(v.Name == 'ShadowFace')then v:destroy() end
1193
	end
1194
	LEye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false)
1195
	LEyeM = Mesh(LEye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N())
1196
	LEyeW = NewInstance("Weld",LEye,{Part0=Head,Part1=LEye,C0=CF.N(-.2,.2,-.49)})
1197
	
1198
	REye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false)
1199
	REyeM = Mesh(REye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N())
1200
	REyeW = NewInstance("Weld",REye,{Part0=Head,Part1=REye,C0=CF.N(.2,.2,-.49)})
1201
	for i = 1, 35 do
1202
		local FACE = Part(Char,C3.N(0,0,0),Enum.Material.Neon,V3.N(1.01,.5,1.01),CF.N(),false,false)
1203
		FACE.Transparency = 0+(i-1)/35.2
1204
		FACE.Name = 'ShadowFace'
1205
		Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
1206
		NewInstance("Weld",Head,{Part0=Head,Part1=FACE,C0=CF.N(0,.35-(i-1)/75,0)})
1207
		--CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0))
1208
	end
1209
	Hum = NewInstance("Humanoid",Char,{DisplayDistanceType='None'})
1210
	ConnectHum()
1211
	MaxHealth = oMH
1212
	Hum.MaxHealth = MaxHealth
1213
	Hum.Health = MaxHealth
1214
	swait(5)
1215
	Char.Parent = workspace
1216
	
1217
	Attack = false
1218
end
1219
1220
function ConnectHum()
1221
	Hum.Died:connect(Refuse)
1222
end
1223
ConnectHum()
1224
1225
1226
--// Wrap it all up \\--
1227
while true do
1228
	swait()
1229
	Sine = Sine + Change
1230
	if(not Music)then
1231
		Music = Sound(Torso,MusicID,1,3,true,false,true)
1232
		Music.Name = 'Music'
1233
	end
1234
	Music.Pitch = 1
1235
	Music.Volume = 5
1236
	Music.SoundId = "rbxassetid://"..MusicID
1237
	Music.Parent = Torso
1238
	Music:Resume()
1239
	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)
1240
	local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
1241
	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 "Walk" or hitfloor and "Idle")
1242
	if(not Effects or not Effects.Parent)then
1243
		Effects = IN("Model",Char)
1244
		Effects.Name = "Effects"
1245
	end
1246
	Hum.WalkSpeed = WalkSpeed
1247
	if(State == 'Walk')then
1248
		if(Hum.WalkSpeed >= 24)then
1249
			local wsVal = 22 / (Hum.WalkSpeed/16)
1250
			local Alpha = math.min(.1 * (Hum.WalkSpeed/16),1)
1251
			Change = 2
1252
			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(25+45*M.C(Sine/wsVal))+-M.S(Sine/wsVal),0,0),Alpha)
1253
			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(25-45*M.C(Sine/wsVal))+M.S(Sine/wsVal),0,0),Alpha)
1254
		else
1255
			Change = .9
1256
			local wsVal = 8 / (Hum.WalkSpeed/8)
1257
			local Alpha = math.min(.2 * (Hum.WalkSpeed/8),1)
1258
			LH.C1 = LH.C1:lerp(CF.N(0,1-.2*M.C(Sine/wsVal)/2,.4*M.C(Sine/wsVal)/2)*CF.A(M.R(15-2*M.C(Sine/wsVal))-M.S(Sine/wsVal)/2.5,0,0)*CF.A(M.R(0-3*M.C(Sine/wsVal)),0,0),Alpha)
1259
			RH.C1 = RH.C1:lerp(CF.N(0,1+.2*M.C(Sine/wsVal)/2,-.4*M.C(Sine/wsVal)/2)*CF.A(M.R(15+2*M.C(Sine/wsVal))+M.S(Sine/wsVal)/2.5,0,0)*CF.A(M.R(0+3*M.C(Sine/wsVal)),0,0),Alpha)
1260
		end
1261
	else
1262
		RH.C1 = RH.C1:lerp(CF.N(0,1,0),.1)
1263
		LH.C1 = LH.C1:lerp(CF.N(0,1,0),.1)
1264
	end	
1265
	for _,v in next, Char:children() do
1266
		if(v:IsA'Accessory')then
1267
			v:destroy()
1268
		elseif(v:IsA'Shirt')then
1269
			v.ShirtTemplate = "rbxassetid://1593515960"
1270
		elseif(v:IsA'Pants')then
1271
			v.PantsTemplate = "rbxassetid://1389080081"
1272
		elseif(v:IsA'CharacterMesh')then
1273
			v:destroy()
1274
		elseif(v:FindFirstChildOfClass'ShirtGraphic')then
1275
			v:FindFirstChildOfClass'ShirtGraphic':destroy()
1276
		end
1277
	end
1278
	local face = Head:FindFirstChild'face'
1279
	if(not face)then
1280
		NewInstance("Decal",Head,{Name='face',Face=Enum.NormalId.Front,Texture="rbxassetid://176217464"})
1281
	else
1282
		face.Texture = "rbxassetid://176217464"
1283
	end
1284
	RArm.BrickColor = BrickColor.new'Pastel brown'
1285
	LArm.BrickColor = BrickColor.new'Pastel brown'
1286
	RLeg.BrickColor = BrickColor.new'Pastel brown'
1287
	LLeg.BrickColor = BrickColor.new'Pastel brown'
1288
	Torso.BrickColor = BrickColor.new'Pastel brown'
1289
	Head.BrickColor = BrickColor.new'Pastel brown'
1290
	Hum.Name = 'Chara'
1291
	if(Hum.MaxHealth ~= MaxHealth)then
1292
		Hum.MaxHealth = MaxHealth
1293
	end
1294
	Hum.DisplayDistanceType='None'
1295
	if(NeutralAnims)then	
1296
		if(State == 'Idle')then
1297
			Change = 1
1298
			local Alpha = .1
1299
			RJ.C0 = clerp(RJ.C0,CFrame.new(-0.0999571308, 0+.05*M.C(Sine/16), -0.237876296, 0.857335567, -0.00323621999, -0.514731407, 0, 0.99998033, -0.00628707698, 0.51474154, 0.00539013464, 0.85731858),Alpha)
1300
			LH.C0 = clerp(LH.C0,CFrame.new(-0.536091685, -0.991042495-.05*M.C(Sine/16), -0.0134909991, 0.849195242, 0, 0.528063774, -0.00331997755, 0.99998033, 0.00533895614, -0.528053343, -0.00628707698, 0.849178433),Alpha)
1301
			RH.C0 = clerp(RH.C0,CFrame.new(0.529067397, -0.991597891-.05*M.C(Sine/16), -0.0818087086, 0.849195242, 0, 0.528063774, -0.00331997755, 0.99998033, 0.00533895614, -0.528053343, -0.00628707698, 0.849178433),Alpha)
1302
			LS.C0 = clerp(LS.C0,CFrame.new(-1.32175505, 0.156236127+.15*M.C(Sine/16), 0.233877867, 0.877554953, -0.456876248, 0.145469457, 0.259513229, 0.707695842, 0.657129884, -0.403175086, -0.538916171, 0.739607573),Alpha)
1303
			RS.C0 = clerp(RS.C0,CFrame.new(1.2516855, 0.604915917+.15*M.C(Sine/16), -0.0189059302, 0.915104508, -0.287113011, -0.283108115, 0.301054537, 0.953587949, 0.00603589695, 0.268235415, -0.0907544345, 0.959069014),Alpha)
1304
			NK.C0 = clerp(NK.C0,CFrame.new(1.79447234e-05, 1.49895597, -0.0143749639, 0.769539058, -0.360377938, 0.527197778, 0.387706369, 0.919646919, 0.0627188534, -0.507438183, 0.156133309, 0.847424924),Alpha)
1305
			HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
1306
			-- idle
1307
		elseif(State == 'Walk')then
1308
			if(Hum.WalkSpeed >= 24)then
1309
				local wsVal = 22 / (Hum.WalkSpeed/16)
1310
				local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
1311
				RJ.C0 = RJ.C0:lerp(CF.N(0,0-.15*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-15),M.R(0-15*M.S(Sine/wsVal)/2),0),Alpha)
1312
				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+15*M.S(Sine/wsVal))),Alpha)
1313
				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+15*M.S(Sine/wsVal))),Alpha)
1314
				NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(15),0,0),Alpha)
1315
				LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.15*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(15),0,0),Alpha)
1316
				RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.15*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(15),0,0),Alpha)
1317
				HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
1318
			else
1319
				local wsVal = 8 / (Hum.WalkSpeed/8)
1320
				local Alpha = math.min(.2 * (Hum.WalkSpeed/8),1)
1321
				RJ.C0 = RJ.C0:lerp(CF.N(0,0-.05*M.C(Sine/(wsVal/2)),0)*CF.A(0,M.R(0-5*M.S(Sine/wsVal)/2),0),Alpha)
1322
				LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,0+.3*M.S(Sine/wsVal))*CF.A(M.R(0-25*M.S(Sine/wsVal)),0,M.R(5-5*M.S(Sine/wsVal))),Alpha)
1323
				RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,0-.3*M.S(Sine/wsVal))*CF.A(M.R(0+25*M.S(Sine/wsVal)),0,M.R(-5-5*M.S(Sine/wsVal))),Alpha)
1324
				NK.C0 = NK.C0:lerp(NKC0,Alpha)
1325
				LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.05*M.C(Sine/(wsVal/2)),0),Alpha)
1326
				RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.05*M.C(Sine/(wsVal/2)),0),Alpha)
1327
				HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
1328
			end
1329
		elseif(State == 'Jump' or State == 'Fall')then
1330
			if(Walking)then
1331
				local Alpha = .2
1332
				RJ.C0 = clerp(RJ.C0,RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(65)),M.R(65)),0,0),Alpha)
1333
				LH.C0 = clerp(LH.C0,CFrame.new(-0.497912645, -1.0987643, -0.0683324337, 0.999878228, 0.00860835519, 0.0130246133, -0.00010142161, 0.837816596, -0.545952022, -0.015611981, 0.545884132, 0.837715328),Alpha)
1334
				RH.C0 = clerp(RH.C0,CFrame.new(0.499978393, -1.16382337, 0.109293163, 0.999878228, -0.0120433727, 0.00993486121, -0.00010142161, 0.631323814, 0.775519371, -0.015611981, -0.775425911, 0.631245613),Alpha)
1335
				LS.C0 = clerp(LS.C0,CFrame.new(-1.55211556, 0.576563478, -0.00269976072, 0.976067662, 0.216906726, 0.0156116467, -0.217024669, 0.976145923, 0.00628317893, -0.0138763804, -0.00952091813, 0.999858499),Alpha)
1336
				RS.C0 = clerp(RS.C0,CFrame.new(1.50182188, 0.636661649, 0.00632623257, 0.977592707, -0.209926367, 0.0156121543, 0.209851891, 0.977713108, 0.00628198683, -0.016582964, -0.00286500831, 0.999858439),Alpha)
1337
				NK.C0 = clerp(NK.C0,CFrame.new(1.14440072e-05, 1.49924362, -0.0143961608, 1.00000024, -5.82076609e-11, 0, 1.23691279e-10, 0.997964919, 0.0637660474, 0, -0.0637660623, 0.997965038),Alpha)
1338
				HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
1339
			else
1340
				local Alpha = .2
1341
				RJ.C0 = clerp(RJ.C0,RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(65)),M.R(65)),0,0),Alpha)
1342
				LH.C0 = clerp(LH.C0,CFrame.new(-0.504374504, -0.291219354, -0.487436086, 0.999878228, -0.00438931212, 0.0149825988, -0.00010142161, 0.957819223, 0.287371844, -0.015611981, -0.287338346, 0.957701981),Alpha)
1343
				RH.C0 = clerp(RH.C0,CFrame.new(0.453094482, -0.871358454, 0.0898642987, 0.985589385, -0.168456957, 0.0153662469, 0.162863791, 0.969548643, 0.182895929, -0.0457084104, -0.177757636, 0.983012319),Alpha)
1344
				LS.C0 = clerp(LS.C0,CFrame.new(-1.55211556, 0.576563478, -0.00269976072, 0.976067662, 0.216906726, 0.0156116467, -0.217024669, 0.976145923, 0.00628317893, -0.0138763804, -0.00952091813, 0.999858499),Alpha)
1345
				RS.C0 = clerp(RS.C0,CFrame.new(1.50182188, 0.636661649, 0.00632623257, 0.977592707, -0.209926367, 0.0156121543, 0.209851891, 0.977713108, 0.00628198683, -0.016582964, -0.00286500831, 0.999858439),Alpha)
1346
				NK.C0 = clerp(NK.C0,CFrame.new(1.14440072e-05, 1.49924362, -0.0143961608, 1.00000024, -5.82076609e-11, 0, 1.23691279e-10, 0.997964919, 0.0637660474, 0, -0.0637660623, 0.997965038),Alpha)
1347
				HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
1348
			end
1349
		elseif(State == 'Paralyzed')then
1350
			-- paralyzed
1351
		elseif(State == 'Sit')then
1352
			-- sit
1353
		end
1354
	end
1355
end