View difference between Paste ID: 0UiCwXAu and Ly3qg1P2
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 print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
6
7
-- Created by Nebula_Zorua --
8
-- Boreldi --
9
-- I was bored --
10
-- Discord: Nebula the Zorua#6969
11
-- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA
12
13
wait(1/60)
14
15
--// Shortcut Variables \\--
16
local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
17
local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
18
local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
19
local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
20
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}
21
local R3 = {N=Region3.new}
22
local De = S.Debris
23
local WS = workspace
24
local Lght = S.Lighting
25
local RepS = S.ReplicatedStorage
26
local IN = Instance.new
27
local Plrs = S.Players
28
29
--// Initializing \\--
30
local Plr = Plrs.LocalPlayer
31
local Char = Plr.Character
32
local Hum = Char:FindFirstChildOfClass'Humanoid'
33
local RArm = Char["Right Arm"]
34
local LArm = Char["Left Arm"]
35
local RLeg = Char["Right Leg"]
36
local LLeg = Char["Left Leg"]	
37
local Root = Char:FindFirstChild'HumanoidRootPart'
38
local Torso = Char.Torso
39
local Head = Char.Head
40
local NeutralAnims = true
41
local Attack = false
42
local Debounces = {Debounces={}}
43
local Mouse = Plr:GetMouse()
44
local Hit = {}
45
local Sine = 0
46
local Change = 1
47
local BloodPuddles = {}
48
49
local Effects = IN("Folder",Char)
50
Effects.Name = "Effects"
51
52
53
--// Debounce System \\--
54
55
56
function Debounces:New(name,cooldown)
57
	local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
58
	setmetatable(aaaaa,{__index = Debounces})
59
	Debounces.Debounces[name] = aaaaa
60
	return aaaaa
61
end
62
63
function Debounces:Use(overrideUsable)
64
	assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
65
	if(self.Usable or overrideUsable)then
66
		self.Usable = false
67
		self.CoolingDown = true
68
		local LastUse = time()
69
		self.LastUse = LastUse
70
		delay(self.Cooldown or 2,function()
71
			if(self.LastUse == LastUse)then
72
				self.CoolingDown = false
73
				self.Usable = true
74
			end
75
		end)
76
	end
77
end
78
79
function Debounces:Get(name)
80
	assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
81
	for i,v in next, Debounces.Debounces do
82
		if(i == name)then
83
			return v;
84
		end
85
	end
86
end
87
88
function Debounces:GetProgressPercentage()
89
	assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
90
	if(self.CoolingDown and not self.Usable)then
91
		return math.max(
92
			math.floor(
93
				(
94
					(time()-self.LastUse)/self.Cooldown or 2
95
				)*100
96
			)
97
		)
98
	else
99
		return 100
100
	end
101
end
102
103
--// Instance Creation Functions \\--
104
local baseSound = IN("Sound")
105
function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
106
	local Sound = baseSound:Clone()
107
	Sound.SoundId = "rbxassetid://".. tostring(id or 0)
108
	Sound.Pitch = pitch or 1
109
	Sound.Volume = volume or 1
110
	Sound.Looped = looped or false
111
	if(autoPlay)then
112
		coroutine.wrap(function()
113
			repeat wait() until Sound.IsLoaded
114
			Sound.Playing = autoPlay or false
115
		end)()
116
	end
117
	if(not looped and effect)then
118
		Sound.Stopped:connect(function()
119
			Sound.Volume = 0
120
			Sound:destroy()
121
		end)
122
	elseif(effect)then
123
		warn("Sound can't be looped and a sound effect!")
124
	end
125
	Sound.Parent =parent or Torso
126
	return Sound
127
end
128
function Part(parent,color,material,size,cframe,anchored,cancollide)
129
	local part = IN("Part")
130
	part.Parent = parent or Char
131
	part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
132
	part.Material = material or Enum.Material.SmoothPlastic
133
	part.TopSurface,part.BottomSurface=10,10
134
	part.Size = size or V3.N(1,1,1)
135
	part.CFrame = cframe or CF.N(0,0,0)
136
	part.CanCollide = cancollide or false
137
	part.Anchored = anchored or false
138
	return part
139
end
140
141
function Weld(part0,part1,c0,c1)
142
	local weld = IN("Weld")
143
	weld.Parent = part0
144
	weld.Part0 = part0
145
	weld.Part1 = part1
146
	weld.C0 = c0 or CF.N()
147
	weld.C1 = c1 or CF.N()
148
	return weld
149
end
150
151
function Mesh(parent,meshtype,meshid,textid,scale,offset)
152
	local part = IN("SpecialMesh")
153
	part.MeshId = meshid or ""
154
	part.TextureId = textid or ""
155
	part.Scale = scale or V3.N(1,1,1)
156
	part.Offset = offset or V3.N(0,0,0)
157
	part.MeshType = meshtype or Enum.MeshType.Sphere
158
	part.Parent = parent
159
	return part
160
end
161
162
NewInstance = function(instance,parent,properties)
163
	local inst = Instance.new(instance)
164
	inst.Parent = parent
165
	if(properties)then
166
		for i,v in next, properties do
167
			pcall(function() inst[i] = v end)
168
		end
169
	end
170
	return inst;
171
end
172
173
function Clone(instance,parent,properties)
174
	local inst = instance:Clone()
175
	inst.Parent = parent
176
	if(properties)then
177
		for i,v in next, properties do
178
			pcall(function() inst[i] = v end)
179
		end
180
	end
181
	return inst;
182
end
183
184
function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf)
185
	local soundPart = NewInstance("Part",Effects,{Transparency=1,CFrame=cf or Torso.CFrame,Anchored=true,CanCollide=false,Size=V3.N()})
186
	local Sound = IN("Sound")
187
	Sound.SoundId = "rbxassetid://".. tostring(id or 0)
188
	Sound.Pitch = pitch or 1
189
	Sound.Volume = volume or 1
190
	Sound.Looped = looped or false
191
	if(autoPlay)then
192
		coroutine.wrap(function()
193
			repeat wait() until Sound.IsLoaded
194
			Sound.Playing = autoPlay or false
195
		end)()
196
	end
197
	if(not looped and effect)then
198
		Sound.Stopped:connect(function()
199
			Sound.Volume = 0
200
			soundPart:destroy()
201
		end)
202
	elseif(effect)then
203
		warn("Sound can't be looped and a sound effect!")
204
	end
205
	Sound.Parent = soundPart
206
	return Sound
207
end
208
209
210
--// Extended ROBLOX tables \\--
211
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})
212
--// Require stuff \\--
213
function CamShake(who,times,intense,origin) 
214
	coroutine.wrap(function()
215
		if(script:FindFirstChild'CamShake')then
216
			local cam = script.CamShake:Clone()
217
			cam:WaitForChild'intensity'.Value = intense
218
			cam:WaitForChild'times'.Value = times
219
			
220
	 		if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
221
			cam.Parent = who
222
			wait()
223
			cam.Disabled = false
224
		elseif(who == Plr or who == Char or who:IsDescendantOf(Plr))then
225
			local intensity = intense
226
			if(Hum and not Hum:FindFirstChild'CamShaking')then
227
				local cam = workspace.CurrentCamera
228
				local oCO = Hum.CameraOffset
229
				local cs = Instance.new("BoolValue",Hum)
230
				cs.Name = "CamShaking"
231
				for i = 1, times do
232
					local camDistFromOrigin
233
					if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then
234
						camDistFromOrigin = math.floor( (cam.CoordinateFrame.p-origin.Position).magnitude )/25
235
					elseif(typeof(origin) == 'Vector3')then
236
						camDistFromOrigin = math.floor( (cam.CoordinateFrame.p-origin).magnitude )/25
237
					end
238
					if(camDistFromOrigin)then
239
						intensity = math.min(intense, math.floor(intense/camDistFromOrigin))
240
					end
241
					--cam.CoordinateFrame = cam.CoordinateFrame*CFrame.fromEulerAnglesXYZ(math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200)
242
					if(Hum)then
243
						Hum.CameraOffset = Vector3.new(math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200)
244
					end
245
					swait()
246
				end
247
				if(Hum)then
248
					Hum.CameraOffset = oCO
249
				end
250
				cs:destroy()
251
			end
252
		end
253
	end)()
254
end
255
256
257
function CamShakeAll(times,intense,origin)
258
	for _,v in next, Plrs:players() do
259
		CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin)
260
	end
261
end
262
263
function ServerScript(code)
264
	if(script:FindFirstChild'Loadstring')then
265
		local load = script.Loadstring:Clone()
266
		load:WaitForChild'Sauce'.Value = code
267
		load.Disabled = false
268
		load.Parent = workspace
269
	elseif(NS and typeof(NS) == 'function')then
270
		NS(code,workspace)
271
	else
272
		warn("no serverscripts lol")
273
	end	
274
end
275
276
function LocalOnPlayer(who,code)
277
	ServerScript([[
278
		wait()
279
		script.Parent=nil
280
		if(not _G.Http)then _G.Http = game:service'HttpService' end
281
		
282
		local Http = _G.Http or game:service'HttpService'
283
		
284
		local source = ]].."[["..code.."]]"..[[
285
		local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php"
286
		local asd = Http:PostAsync(link,source)
287
		repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID
288
		local ID = Http:JSONDecode(asd).Result.Require_ID
289
		local vs = require(ID).VORTH_SCRIPT
290
		vs.Parent = game:service'Players'.]]..who.Name..[[.Character
291
	]])
292
end
293
294
295
--// Customization \\--
296
297
local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this
298
local Remove_Hats = true
299
local Remove_Clothing = true
300
local PlayerSize = 1
301
local DamageColor = BrickColor.new'Really red'
302
local MusicID = 1718183351
303
local God = false
304
local Muted = false
305
local angerCounter = 1; -- lower = faster
306
local angry = false
307
308
local WalkSpeed = 16
309
310
--// Weapon and GUI creation, and Character Customization \\--
311
312
if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
313
if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
314
315
local rule = Part(Char,BrickColor.new'Linen',Enum.Material.Wood,V3.N(.2,.5,4),CF.N(),false,false)
316
local rd = NewInstance("Decal",rule,{Texture='rbxassetid://109519158',Face='Right'})
317
local ld = NewInstance("Decal",rule,{Texture='rbxassetid://109519158',Face='Left'})
318
319
if(PlayerSize ~= 1)then
320
	for _,v in next, Char:GetDescendants() do
321
		if(v:IsA'BasePart')then
322
			v.Size = v.Size * PlayerSize
323
		end
324
	end
325
end
326
327
328
local Music = Sound(Char,MusicID,1,3,true,false,true)
329
Music.Name = 'Music'
330
331
--// Stop animations \\--
332
for _,v in next, Hum:GetPlayingAnimationTracks() do
333
	v:Stop();
334
end
335
336
pcall(game.Destroy,Char:FindFirstChild'Animate')
337
pcall(game.Destroy,Hum:FindFirstChild'Animator')
338
339
--// Joints \\--
340
341
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)})
342
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)})
343
local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)})
344
local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
345
local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
346
local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
347
local HW = NewInstance('Motor',Char,{Part0=RArm,Part1=rule,C0=CF.N(0,-1,-1)})
348
349
local LSC0 = LS.C0
350
local RSC0 = RS.C0
351
local NKC0 = NK.C0
352
local LHC0 = LH.C0
353
local RHC0 = RH.C0
354
local RJC0 = RJ.C0
355
356
--// Artificial HB \\--
357
358
local ArtificialHB = IN("BindableEvent", script)
359
ArtificialHB.Name = "Heartbeat"
360
361
script:WaitForChild("Heartbeat")
362
363
local tf = 0
364
local allowframeloss = false
365
local tossremainder = false
366
local lastframe = tick()
367
local frame = 1/Frame_Speed
368
ArtificialHB:Fire()
369
370
game:GetService("RunService").Heartbeat:connect(function(s, p)
371
	tf = tf + s
372
	if tf >= frame then
373
		if allowframeloss then
374
			script.Heartbeat:Fire()
375
			lastframe = tick()
376
		else
377
			for i = 1, math.floor(tf / frame) do
378
				ArtificialHB:Fire()
379
			end
380
			lastframe = tick()
381
		end
382
		if tossremainder then
383
			tf = 0
384
		else
385
			tf = tf - frame * math.floor(tf / frame)
386
		end
387
	end
388
end)
389
390
function swait(num)
391
	if num == 0 or num == nil then
392
		ArtificialHB.Event:wait()
393
	else
394
		for i = 0, num do
395
			ArtificialHB.Event:wait()
396
		end
397
	end
398
end
399
400
401
--// Effect Function(s) \\--
402
403
function NoobySphere(Lifetime,Speed,Type,Pos,StartSize,Inc,Color,Range,MeshId,Axis)
404
	local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos+Pos.lookVector*Range,true,false)
405
	local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Sphere),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
406
	local Scale = 1
407
	local speeder = Speed
408
	if(Type == "Multiply")then
409
		Scale = 1*Inc
410
	elseif(Type == "Divide")then
411
		Scale = 1/Inc
412
	end
413
	coroutine.wrap(function()
414
		for i = 0,10/Lifetime,.1 do
415
			
416
			if(Type == "Multiply")then
417
				Scale = Scale - 0.01*Inc/Lifetime
418
			elseif(Type == "Divide")then
419
				Scale = Scale - 0.01/Inc*Lifetime
420
			end
421
			speeder = speeder - 0.01*Speed*Lifetime
422
			fxP.CFrame = fxP.CFrame + fxP.CFrame.lookVector*speeder*Lifetime
423
			fxP.Transparency = fxP.Transparency + 0.01*Lifetime
424
			if(Axis == 'x')then
425
				fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, 0, 0)
426
			elseif(Axis == 'y')then
427
				fxM.Scale = fxM.Scale + Vector3.new(0, Scale*Lifetime, 0)
428
			elseif(Axis == 'z')then
429
				fxM.Scale = fxM.Scale + Vector3.new(0, 0, Scale*Lifetime)
430
			elseif(Axis == 'xyz')then
431
				fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime,Scale*Lifetime,Scale*Lifetime)
432
			elseif(Axis == 'yz')then
433
				fxM.Scale = fxM.Scale + Vector3.new(0,Scale*Lifetime,Scale*Lifetime)
434
			elseif(Axis == 'xz')then
435
				fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime,0,Scale*Lifetime)
436
			else
437
				fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, Scale*Lifetime, 0)
438
			end
439
			if(fxP.Transparency >= 1)then break end
440
			swait()
441
		end
442
		fxP:destroy()
443
	end)()
444
	return fxP
445
end
446
447
function NoobySphere2(Lifetime,Type,Pos,StartSize,Inc,Color,MeshId)
448
	local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos,true,false)
449
	local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Sphere),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
450
451
	local Scale = 1
452
	if(Type == "Multiply")then
453
		Scale = 1*Inc
454
	elseif(Type == "Divide")then
455
		Scale = 1/Inc
456
	end
457
	coroutine.wrap(function()
458
		for i = 0,10/Lifetime,.1 do
459
460
			if(Type == "Multiply")then
461
				Scale = Scale - 0.01*Inc/Lifetime
462
			elseif(Type == "Divide")then
463
				Scale = Scale - 0.01/Inc*Lifetime
464
			end
465
			fxP.Transparency = fxP.Transparency + 0.01*Lifetime
466
			fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, Scale*Lifetime, Scale*Lifetime)
467
			swait()
468
		end
469
		fxP:destroy()
470
	end)()
471
end
472
473
function NoobyBlock(Lifetime,Speed,Type,Pos,StartSize,Inc,Color,Range,Fade,MeshId)
474
	local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos+Pos.lookVector*Range,true,false)
475
	local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Brick),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
476
	local Scale = 1
477
	local speeder = Speed
478
	if(Type == "Multiply")then
479
		Scale = 1*Inc
480
	elseif(Type == "Divide")then
481
		Scale = 1/Inc
482
	end
483
	coroutine.wrap(function()
484
		for i = 0,10/Lifetime,.1 do
485
			if(Type == "Multiply")then
486
				Scale = Scale - 0.01*Inc/Lifetime
487
			elseif(Type == "Divide")then
488
				Scale = Scale - 0.01/Inc*Lifetime
489
			end
490
			if(Fade)then
491
				fxP.Transparency = i/(10/Lifetime)
492
			end
493
			speeder = speeder - 0.01*Speed*Lifetime/10
494
			fxP.CFrame = fxP.CFrame + fxP.CFrame.lookVector*speeder*Lifetime
495
			fxM.Scale = fxM.Scale - Vector3.new(Scale*Lifetime, Scale*Lifetime, Scale*Lifetime)
496
			swait()
497
		end
498
		fxP:destroy()
499
	end)()
500
end
501
502
function Bezier(startpos, pos2, pos3, endpos, t)
503
	local A = startpos:lerp(pos2, t)
504
	local B  = pos2:lerp(pos3, t)
505
	local C = pos3:lerp(endpos, t)
506
	local lerp1 = A:lerp(B, t)
507
	local lerp2 = B:lerp(C, t)
508
	local cubic = lerp1:lerp(lerp2, t)
509
	return cubic
510
end
511
function Puddle(hit,pos,norm,data)
512
	local material = data.Material or Enum.Material.SmoothPlastic
513
	local color = data.Color or BrickColor.new'Crimson'
514
	local size = data.Size or 1
515
		
516
	if(hit.Name ~= 'BloodPuddle')then
517
		local Puddle = NewInstance('Part',workspace,{Material=material,BrickColor=color,Size=V3.N(size,.1,size),CFrame=CF.N(pos,pos+norm)*CF.A(90*M.P/180,0,0),Anchored=true,CanCollide=false,Archivable=false,Locked=true,Name='BloodPuddle'})
518
		local Cyl = NewInstance('CylinderMesh',Puddle,{Name='CylinderMesh'})
519
		BloodPuddles[Puddle] = 0
520
	else
521
		local cyl = hit:FindFirstChild'CylinderMesh'
522
		if(cyl)then
523
			BloodPuddles[hit] = 0
524
			cyl.Scale = cyl.Scale + V3.N(size,0,size)
525
			hit.Transparency = 0
526
		end
527
	end
528
end
529
530
function Droplet(data)
531
	--ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
532
	local Size = data.Size or 1
533
	local Color = data.Color or BrickColor.new'Crimson'
534
	local StudsPerFrame = data.Speed or 1
535
	local Shape = data.Shape or 'Ball'
536
	local Frames = (data.Frames or 160)+1
537
	local Pos = data.Origin or Root.CFrame
538
	local Direction = data.Direction or Root.CFrame.lookVector*100000
539
	local Material = data.Material or Enum.Material.SmoothPlastic
540
	local Drop = data.Drop or .05
541
	local Ignorelist = data.Ignorelist or nil
542
	
543
	local Bullet = Part(Effects,Color,Material,V3.N(Size,Size,Size),Pos,true,false)
544
	local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
545
	if(Shape == 'Ball')then
546
		BMesh.MeshType = Enum.MeshType.Sphere
547
	elseif(Shape == 'Head')then
548
		BMesh.MeshType = Enum.MeshType.Head
549
	elseif(Shape == 'Cylinder')then
550
		BMesh.MeshType = Enum.MeshType.Cylinder
551
	end
552
	
553
	coroutine.wrap(function()
554
		for i = 1, Frames do
555
			Pos = Pos * CF.N(0,-(Drop*i),0)
556
			local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Pos.p,Direction)*CF.N(0,0,-(StudsPerFrame*i)).p,StudsPerFrame)
557
			if(hit and (not hit.Parent or not hit.Parent:FindFirstChildOfClass'Humanoid' and not hit.Parent:IsA'Accessory'))then
558
				Puddle(hit,pos,norm,data)
559
				break;
560
			else
561
				Bullet.CFrame = CF.N(Pos.p,Direction)*CF.N(0,0,-(StudsPerFrame*i))
562
			end
563
			swait()
564
		end
565
		Bullet:destroy()
566
	end)()
567
end
568
569
function SphereFX(duration,color,scale,pos,endScale,increment)
570
	return Effect{
571
		Effect='ResizeAndFade',
572
		Color=color,
573
		Size=scale,
574
		Mesh={MeshType=Enum.MeshType.Sphere},
575
		CFrame=pos,
576
		FXSettings={
577
			EndSize=endScale,
578
			EndIsIncrement=increment
579
		}
580
	}
581
end
582
583
function BlastFX(duration,color,scale,pos,endScale,increment)
584
	return Effect{
585
		Effect='ResizeAndFade',
586
		Color=color,
587
		Size=scale,
588
		Mesh={MeshType=Enum.MeshType.FileMesh,MeshId='rbxassetid://20329976'},
589
		CFrame=pos,
590
		FXSettings={
591
			EndSize=endScale,
592
			EndIsIncrement=increment
593
		}
594
	}
595
end
596
597
function BlockFX(duration,color,scale,pos,endScale,increment)
598
	return Effect{
599
		Effect='ResizeAndFade',
600
		Color=color,
601
		Size=scale,
602
		CFrame=pos,
603
		FXSettings={
604
			EndSize=endScale,
605
			EndIsIncrement=increment
606
		}
607
	}
608
end
609
610
function ShootBullet(data)
611
	--ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
612
	local Size = data.Size or V3.N(2,2,2)
613
	local Color = data.Color or BrickColor.new'Crimson'
614
	local StudsPerFrame = data.Speed or 10
615
	local Shape = data.Shape or 'Ball'
616
	local Frames = data.Frames or 160
617
	local Pos = data.Origin or Torso.CFrame
618
	local Direction = data.Direction or Mouse.Hit
619
	local Material = data.Material or Enum.Material.Neon
620
	local OnHit = data.HitFunction or function(hit,pos)
621
		Effect{
622
			Effect='ResizeAndFade',
623
			Color=Color,
624
			Size=V3.N(10,10,10),
625
			Mesh={MeshType=Enum.MeshType.Sphere},
626
			CFrame=CF.N(pos),
627
			FXSettings={
628
				EndSize=V3.N(.05,.05,.05),
629
				EndIsIncrement=true
630
			}
631
		}
632
		for i = 1, 5 do
633
			local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
634
			Effect{
635
				Effect='Fade',
636
				Frames=65,
637
				Size=V3.N(5,5,10),
638
				CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-10).p,pos),
639
				Mesh = {MeshType=Enum.MeshType.Sphere},
640
				Material=Enum.Material.Neon,
641
				Color=Color,
642
				MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
643
			}	
644
		end
645
	end	
646
	
647
	local Bullet = Part(Effects,Color,Material,Size,Pos,true,false)
648
	local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
649
	if(Shape == 'Ball')then
650
		BMesh.MeshType = Enum.MeshType.Sphere
651
	elseif(Shape == 'Head')then
652
		BMesh.MeshType = Enum.MeshType.Head
653
	elseif(Shape == 'Cylinder')then
654
		BMesh.MeshType = Enum.MeshType.Cylinder
655
	end
656
	
657
	coroutine.wrap(function()
658
		for i = 1, Frames+1 do
659
			local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame).p,StudsPerFrame)
660
			if(hit)then
661
				OnHit(hit,pos,norm,dist)
662
				break;
663
			else
664
				Bullet.CFrame = CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame)
665
			end
666
			swait()
667
		end
668
		Bullet:destroy()
669
	end)()
670
	
671
end
672
673
674
function Zap(data)
675
	local sCF,eCF = data.StartCFrame,data.EndCFrame
676
	assert(sCF,"You need a start CFrame!")
677
	assert(eCF,"You need an end CFrame!")
678
	local parts = data.PartCount or 15
679
	local zapRot = data.ZapRotation or {-5,5}
680
	local startThick = data.StartSize or 3;
681
	local endThick = data.EndSize or startThick/2;
682
	local color = data.Color or BrickColor.new'Electric blue'
683
	local delay = data.Delay or 35
684
	local delayInc = data.DelayInc or 0
685
	local lastLightning;
686
	local MagZ = (sCF.p - eCF.p).magnitude
687
	local thick = startThick
688
	local inc = (startThick/parts)-(endThick/parts)
689
	
690
	for i = 1, parts do
691
		local pos = sCF.p
692
		if(lastLightning)then
693
			pos = lastLightning.CFrame*CF.N(0,0,MagZ/parts/2).p
694
		end
695
		delay = delay + delayInc
696
		local zapPart = Part(Effects,color,Enum.Material.Neon,V3.N(thick,thick,MagZ/parts),CF.N(pos),true,false)
697
		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)))
698
		if(parts == i)then
699
			local MagZ = (pos-eCF.p).magnitude
700
			zapPart.Size = V3.N(endThick,endThick,MagZ)
701
			zapPart.CFrame = CF.N(pos, eCF.p)*CF.N(0,0,-MagZ/2)
702
			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)}}
703
		else
704
			zapPart.CFrame = CF.N(pos,posie)*CF.N(0,0,MagZ/parts/2)
705
		end
706
		
707
		lastLightning = zapPart
708
		Effect{Effect='Fade',Manual=zapPart,Frames=delay}
709
		
710
		thick=thick-inc
711
		
712
	end
713
end
714
715
function Zap2(data)
716
	local Color = data.Color or BrickColor.new'Electric blue'
717
	local StartPos = data.Start or Torso.Position
718
	local EndPos = data.End or Mouse.Hit.p
719
	local SegLength = data.SegL or 2
720
	local Thicc = data.Thickness or 0.5
721
	local Fades = data.Fade or 45
722
	local Parent = data.Parent or Effects
723
	local MaxD = data.MaxDist or 200
724
	local Branch = data.Branches or false
725
	local Material = data.Material or Enum.Material.Neon
726
	local Raycasts = data.Raycasts or false
727
	local Offset = data.Offset or {0,360}
728
	local AddMesh = (data.Mesh == nil and true or data.Mesh)
729
	if((StartPos-EndPos).magnitude > MaxD)then
730
		EndPos = CF.N(StartPos,EndPos)*CF.N(0,0,-MaxD).p
731
	end
732
	local hit,pos,norm,dist=nil,EndPos,nil,(StartPos-EndPos).magnitude
733
	if(Raycasts)then
734
		hit,pos,norm,dist = CastRay(StartPos,EndPos,MaxD)	
735
	end
736
	local segments = dist/SegLength
737
	local model = IN("Model",Parent)
738
	model.Name = 'Lightning'
739
	local Last;
740
	for i = 1, segments do
741
		local size = (segments-i)/25
742
		local prt = Part(model,Color,Material,V3.N(Thicc+size,SegLength,Thicc+size),CF.N(),true,false)
743
		if(AddMesh)then IN("CylinderMesh",prt) end
744
		if(Last and math.floor(segments) == i)then
745
			local MagZ = (Last.CFrame*CF.N(0,-SegLength/2,0).p-EndPos).magnitude
746
			prt.Size = V3.N(Thicc+size,MagZ,Thicc+size)
747
			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)	
748
		elseif(not Last)then
749
			prt.CFrame = CF.N(StartPos,pos)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)	
750
		else
751
			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)
752
		end
753
		Last = prt
754
		if(Branch)then
755
			local choice = M.RNG(1,7+((segments-i)*2))
756
			if(choice == 1)then
757
				local LastB;
758
				for i2 = 1,M.RNG(2,5) do
759
					local size2 = ((segments-i)/35)/i2
760
					local prt = Part(model,Color,Material,V3.N(Thicc+size2,SegLength,Thicc+size2),CF.N(),true,false)
761
					if(AddMesh)then IN("CylinderMesh",prt) end
762
					if(not LastB)then
763
						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)
764
					else
765
						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)
766
					end
767
					LastB = prt
768
				end
769
			end
770
		end
771
	end
772
	if(Fades > 0)then
773
		coroutine.wrap(function()
774
			for i = 1, Fades do
775
				for _,v in next, model:children() do
776
					if(v:IsA'BasePart')then
777
						v.Transparency = (i/Fades)
778
					end
779
				end
780
				swait()
781
			end
782
			model:destroy()
783
		end)()
784
	else
785
		S.Debris:AddItem(model,.01)
786
	end
787
	return {End=(Last and Last.CFrame*CF.N(0,-Last.Size.Y/2,0).p),Last=Last,Model=model}
788
end
789
790
function Tween(obj,props,time,easing,direction,repeats,backwards)
791
	local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false)
792
	local tween = S.TweenService:Create(obj, info, props)
793
	
794
	tween:Play()
795
end
796
797
function Effect(data)
798
	local FX = data.Effect or 'ResizeAndFade'
799
	local Parent = data.Parent or Effects
800
	local Color = data.Color or C3.N(0,0,0)
801
	local Size = data.Size or V3.N(1,1,1)
802
	local MoveDir = data.MoveDirection or nil
803
	local MeshData = data.Mesh or nil
804
	local SndData = data.Sound or nil
805
	local Frames = data.Frames or 45
806
	local Manual = data.Manual or nil
807
	local Material = data.Material or nil
808
	local CFra = data.CFrame or Torso.CFrame
809
	local Settings = data.FXSettings or {}
810
	local Shape = data.Shape or Enum.PartType.Block
811
	local Snd,Prt,Msh;
812
	local RotInc = data.RotInc or {0,0,0}
813
	if(typeof(RotInc) == 'number')then
814
		RotInc = {RotInc,RotInc,RotInc}
815
	end
816
	coroutine.wrap(function()
817
		if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then
818
			Prt = Manual
819
		else
820
			Prt = Part(Parent,Color,Material,Size,CFra,true,false)
821
			Prt.Shape = Shape
822
		end
823
		if(typeof(MeshData) == 'table')then
824
			Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset)
825
		elseif(typeof(MeshData) == 'Instance')then
826
			Msh = MeshData:Clone()
827
			Msh.Parent = Prt
828
		elseif(Shape == Enum.PartType.Block)then
829
			Msh = Mesh(Prt,Enum.MeshType.Brick)
830
		end
831
		if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then
832
			Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true)
833
		end
834
		if(Snd)then
835
			repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0
836
			Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch
837
		end
838
		Size = (Msh and Msh.Scale or Size)
839
		local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2)
840
		
841
		local MoveSpeed = nil;
842
		if(MoveDir)then
843
			MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
844
		end
845
		if(FX ~= 'Arc')then
846
			for Frame = 1, Frames do
847
				if(FX == "Fade")then
848
					Prt.Transparency  = (Frame/Frames)
849
				elseif(FX == "Resize")then
850
					if(not Settings.EndSize)then
851
						Settings.EndSize = V3.N(0,0,0)
852
					end
853
					if(Settings.EndIsIncrement)then
854
						if(Msh)then
855
							Msh.Scale = Msh.Scale + Settings.EndSize
856
						else
857
							Prt.Size = Prt.Size + Settings.EndSize
858
						end					
859
					else
860
						if(Msh)then
861
							Msh.Scale = Msh.Scale - grow/Frames
862
						else
863
							Prt.Size = Prt.Size - grow/Frames
864
						end
865
					end 
866
				elseif(FX == "ResizeAndFade")then
867
					if(not Settings.EndSize)then
868
						Settings.EndSize = V3.N(0,0,0)
869
					end
870
					if(Settings.EndIsIncrement)then
871
						if(Msh)then
872
							Msh.Scale = Msh.Scale + Settings.EndSize
873
						else
874
							Prt.Size = Prt.Size + Settings.EndSize
875
						end					
876
					else
877
						if(Msh)then
878
							Msh.Scale = Msh.Scale - grow/Frames
879
						else
880
							Prt.Size = Prt.Size - grow/Frames
881
						end
882
					end 
883
					Prt.Transparency = (Frame/Frames)
884
				end
885
				if(Settings.RandomizeCFrame)then
886
					Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
887
				else
888
					Prt.CFrame = Prt.CFrame * CF.A(unpack(RotInc))
889
				end
890
				if(MoveDir and MoveSpeed)then
891
					local Orientation = Prt.Orientation
892
					Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
893
					Prt.Orientation = Orientation
894
				end
895
				swait()
896
			end
897
			Prt:destroy()
898
		else
899
			local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
900
			if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
901
			if(start and endP)then
902
				local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
903
				local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
904
				for Frame = 0, 1, (Settings.Speed or 0.01) do
905
					if(Settings.Home)then
906
						endP = Settings.Home.CFrame
907
					end
908
					Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame)
909
				end
910
				if(Settings.RemoveOnGoal)then
911
					Prt:destroy()
912
				end
913
			else
914
				Prt:destroy()
915
				assert(start,"You need a start position!")
916
				assert(endP,"You need a start position!")
917
			end
918
		end
919
	end)()
920
	return Prt,Msh,Snd
921
end
922
function SoulSteal(whom)
923
	local torso = (whom:FindFirstChild'Head' or whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart')
924
	print(torso)
925
	if(torso and torso:IsA'BasePart')then
926
		local Model = Instance.new("Model",Effects)
927
		Model.Name = whom.Name.."'s Soul"
928
		whom:BreakJoints()
929
		local Soul = Part(Model,BrickColor.new'Really red','Glass',V3.N(.5,.5,.5),torso.CFrame,true,false)
930
		Soul.Name = 'Head'
931
		NewInstance("Humanoid",Model,{Health=0,MaxHealth=0})
932
		Effect{
933
			Effect="Arc",
934
			Manual = Soul,
935
			FXSettings={
936
				Start=torso.CFrame,
937
				Home = Torso,
938
				RemoveOnGoal = true,
939
			}
940
		}
941
		local lastPoint = Soul.CFrame.p
942
	
943
		for i = 0, 1, 0.01 do 
944
				local point = CFrame.new(lastPoint, Soul.Position) * CFrame.Angles(-math.pi/2, 0, 0)
945
				local mag = (lastPoint - Soul.Position).magnitude
946
				Effect{
947
					Effect = "Fade",
948
					CFrame = point * CF.N(0, mag/2, 0),
949
					Size = V3.N(.5,mag+.5,.5),
950
					Color = Soul.BrickColor
951
				}
952
				lastPoint = Soul.CFrame.p
953
			swait()
954
		end
955
		for i = 1, 5 do
956
			Effect{
957
				Effect="Fade",
958
				Color = BrickColor.new'Really red',
959
				MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
960
			}	
961
		end
962
	end
963
end
964
965
--// Other Functions \\ --
966
967
function CastRay(startPos,endPos,range,ignoreList)
968
	local ray = Ray.new(startPos,(endPos-startPos).unit*range)
969
	local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
970
	return part,pos,norm,(pos and (startPos-pos).magnitude)
971
end
972
973
function getRegion(point,range,ignore)
974
    return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
975
end
976
977
function clerp(startCF,endCF,alpha)
978
	return startCF:lerp(endCF, alpha)
979
end
980
981
function GetTorso(char)
982
	return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
983
end
984
985
986
function ShowDamage(Pos, Text, Time, Color)
987
	coroutine.wrap(function()
988
	local Rate = (1 / Frame_Speed)
989
	local Pos = (Pos or Vector3.new(0, 0, 0))
990
	local Text = (Text or "")
991
	local Time = (Time or 2)
992
	local Color = (Color or Color3.new(1, 0, 1))
993
	local EffectPart = NewInstance("Part",Effects,{
994
		Material=Enum.Material.SmoothPlastic,
995
		Reflectance = 0,
996
		Transparency = 1,
997
		BrickColor = BrickColor.new(Color),
998
		Name = "Effect",
999
		Size = Vector3.new(0,0,0),
1000
		Anchored = true,
1001
		CFrame = CF.N(Pos)
1002
	})
1003
	local BillboardGui = NewInstance("BillboardGui",EffectPart,{
1004
		Size = UDim2.new(1.25, 0, 1.25, 0),
1005
		Adornee = EffectPart,
1006
	})
1007
	local TextLabel = NewInstance("TextLabel",BillboardGui,{
1008
		BackgroundTransparency = 1,
1009
		Size = UDim2.new(1, 0, 1, 0),
1010
		Text = Text,
1011
		Font = "Bodoni",
1012
		TextColor3 = Color,
1013
		TextStrokeColor3 = Color3.new(0,0,0),
1014
		TextStrokeTransparency=0,
1015
		TextScaled = true,
1016
	})
1017
	S.Debris:AddItem(EffectPart, (Time))
1018
	EffectPart.Parent = workspace
1019
	delay(0, function()
1020
		Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
1021
		local Frames = (Time / Rate)
1022
		for Frame = 1, Frames do
1023
			swait()
1024
			local Percent = (Frame / Frames)
1025
			TextLabel.TextTransparency = Percent
1026
			TextLabel.TextStrokeTransparency = Percent
1027
		end
1028
		if EffectPart and EffectPart.Parent then
1029
			EffectPart:Destroy()
1030
		end
1031
	end) end)()
1032
end
1033
1034
function DealDamage(data)
1035
	local Who = data.Who;
1036
	local MinDam = data.MinimumDamage or 15;
1037
	local MaxDam = data.MaximumDamage or 30;
1038
	local MaxHP = data.MaxHP or 1e5; 
1039
	
1040
	local DB = data.Debounce or .2;
1041
	
1042
	local CritData = data.Crit or {}
1043
	local CritChance = CritData.Chance or 0;
1044
	local CritMultiplier = CritData.Multiplier or 1;
1045
	
1046
	local DamageEffects = data.DamageFX or {}
1047
	local DamageType = DamageEffects.Type or "Normal"
1048
	local DeathFunction = DamageEffects.DeathFunction
1049
	
1050
	assert(Who,"Specify someone to damage!")	
1051
	
1052
	local Humanoid = Who:FindFirstChildOfClass'Humanoid'
1053
	local DoneDamage = M.RNG(MinDam,MaxDam) * (M.RNG(1,100) <= CritChance and CritMultiplier or 1)
1054
	
1055
	local canHit = true
1056
	if(Humanoid)then
1057
		for _, p in pairs(Hit) do
1058
			if p[1] == Humanoid then
1059
				if(time() - p[2] <= DB) then
1060
					canHit = false
1061
				else
1062
					Hit[_] = nil
1063
				end
1064
			end
1065
		end
1066
		if(canHit)then
1067
			table.insert(Hit,{Humanoid,time()})
1068
			local HitTorso = GetTorso(Who)
1069
			local player = S.Players:GetPlayerFromCharacter(Who)
1070
			if(not player or player.UserId ~= 5719877 and player.UserId ~= 61573184 and player.UserId ~= 19081129)then
1071
				if(Humanoid.MaxHealth >= MaxHP and Humanoid.Health > 0)then
1072
					print'Got kill'
1073
					Humanoid.Health = 0;
1074
					Who:BreakJoints();
1075
					if(DeathFunction)then DeathFunction(Who,Humanoid) end
1076
				else
1077
					local  c = Instance.new("ObjectValue",Hum)
1078
					c.Name = "creator"
1079
					c.Value = Plr
1080
					S.Debris:AddItem(c,0.35)	
1081
					if(Who:FindFirstChild'Head' and Humanoid.Health > 0)then
1082
						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))), DoneDamage, 1.5, DamageColor.Color)
1083
					end
1084
					if(Humanoid.Health > 0 and Humanoid.Health-DoneDamage <= 0)then print'Got kill' if(DeathFunction)then DeathFunction(Who,Humanoid) end end
1085
					Humanoid.Health = Humanoid.Health - DoneDamage
1086
					
1087
					if(DamageType == 'Knockback' and HitTorso)then
1088
						local up = DamageEffects.KnockUp or 25
1089
						local back = DamageEffects.KnockBack or 25
1090
						local origin = DamageEffects.Origin or Root
1091
						local decay = DamageEffects.Decay or .5;
1092
						
1093
						local bfos = Instance.new("BodyVelocity",HitTorso)
1094
						bfos.P = 20000	
1095
						bfos.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
1096
						bfos.Velocity = Vector3.new(0,up,0) + (origin.CFrame.lookVector * back)
1097
						S.Debris:AddItem(bfos,decay)
1098
					end
1099
				end
1100
			end
1101
		end
1102
	end		
1103
end
1104
1105
function Kill(whom,hum)
1106
	whom:breakJoints()
1107
	swait()
1108
	angerCounter = 1
1109
	local t = GetTorso(whom)
1110
	if(t)then
1111
		SoundPart(1846449729,1,1,false,true,true,t.CFrame)
1112
	end
1113
	whom:destroy()
1114
end
1115
1116
function AOEDamage(where,range,options)
1117
	local hit = {}
1118
	for _,v in next, getRegion(where,range,{Char}) do
1119
		if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent])then
1120
			local callTable = {Who=v.Parent}
1121
			hit[v.Parent] = true
1122
			for _,v in next, options do callTable[_] = v end
1123
			DealDamage(callTable)
1124
		end
1125
	end
1126
	return hit
1127
end
1128
1129
function AOEKill(where,range)
1130
	local hit = {}
1131
	local closest,closestHum,closestDist=nil,nil,0;
1132
	for _,v in next, getRegion(where,range,{Char}) do
1133
		if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent] and GetTorso(v.Parent))then
1134
			local dist = (closest == nil and math.huge) or (closest.CFrame.p-Root.CFrame.p).magnitude
1135
			if(dist > closestDist)then
1136
				closest = GetTorso(v.Parent)
1137
				closestHum = v.Parent:FindFirstChildOfClass'Humanoid'
1138
				closestDist = dist
1139
			end
1140
		end
1141
	end
1142
	if(closest)then
1143
		Kill(closest.Parent,closestHum)
1144
	end
1145
	return closest
1146
end
1147
1148
function CheckAOE(where,range)
1149
	local hit = {}
1150
	for _,v in next, getRegion(where,range,{Char}) do
1151
		if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent] and GetTorso(v.Parent))then
1152
			return true
1153
		end
1154
	end
1155
	return false
1156
end
1157
1158
function AOEHeal(where,range,amount)
1159
	local healed = {}
1160
	for _,v in next, getRegion(where,range,{Char}) do
1161
		local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
1162
		if(hum and not healed[hum])then
1163
			hum.Health = hum.Health + amount
1164
			if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then
1165
				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)
1166
			end
1167
		end
1168
	end
1169
end
1170
1171
1172
--// Wrap it all up \\--
1173
1174
Mouse.KeyDown:connect(function(k)
1175
	if(k == 'f')then
1176
		angry = not angry
1177
	end	
1178
end)
1179
1180
local idle = 0;
1181
local gat = 0;
1182
local smacked = false;
1183
while true do
1184
	swait()
1185
	Sine = Sine + Change
1186
	if(not Music or not Music.Parent)then
1187
		local tp = (Music and Music.TimePosition)
1188
		Music = Sound(Char,MusicID,1,10,true,false,true)
1189
		Music.Name = 'Music'
1190
		Music.TimePosition = tp
1191
	end
1192
	Music.SoundId = "rbxassetid://"..MusicID
1193
	Music.Parent = Torso
1194
	Music.Pitch = 1
1195
	Music.Volume = 3
1196
	if(not angry)then
1197
		Music:Resume()
1198
	else
1199
		Music:Pause()
1200
	end
1201
	
1202
	Torso.BrickColor = BrickColor.new'Bright green'
1203
	Head.BrickColor = BrickColor.new'Pastel brown'
1204
	RArm.BrickColor = BrickColor.new'Bright green'
1205
	LArm.BrickColor = BrickColor.new'Bright green'
1206
	RLeg.BrickColor = BrickColor.new'Deep blue'
1207
	LLeg.BrickColor = BrickColor.new'Deep blue'
1208
	if(God)then
1209
		Hum.MaxHealth = 1e100
1210
		Hum.Health = 1e100
1211
		if(not Char:FindFirstChildOfClass'ForceField')then IN("ForceField",Char).Visible = false end
1212
		Hum.Name = M.RNG()*100
1213
	end
1214
	
1215
	local hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * (4*PlayerSize)), Char)
1216
	
1217
	local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
1218
	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 "Walk" or "Run") or hitfloor and "Idle")
1219
	if(not Effects or not Effects.Parent)then
1220
		Effects = IN("Model",Char)
1221
		Effects.Name = "Effects"
1222
	end																																																																																																				
1223
1224
	Hum.WalkSpeed = WalkSpeed
1225
	if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
1226
	if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
1227
	
1228
	if(angry)then
1229
		local AOE = CheckAOE(Torso.CFrame.p,100)
1230
		if(not AOE)then
1231
			angerCounter = math.min(angerCounter+.005,4)
1232
		end	
1233
		rule.Transparency = 0
1234
		ld.Transparency = 0
1235
		rd.Transparency = 0
1236
		idle = idle + 1
1237
		
1238
		if(idle < (angerCounter*15))then
1239
			WalkSpeed = 0
1240
			gat = 0
1241
			NK.C0 = NKC0
1242
			RJ.C0 = RJC0
1243
			LS.C0 = LSC0*CF.N(0,0,-.25)*CF.A(M.R(65),M.R(180),0)
1244
			RS.C0 = RSC0*CF.A(M.R(90),0,0)
1245
			LH.C0 = LHC0
1246
			RH.C0 = RHC0
1247
			smacked = false
1248
		else
1249
			AOEKill(Torso.CFrame.p,3)
1250
			WalkSpeed = 24
1251
			local fat = (idle - (angerCounter*15))
1252
			if(fat > 9)then
1253
				gat = gat - 10
1254
				if(not smacked)then
1255
					CamShakeAll(15,15,rule)
1256
					smacked = true
1257
					Sound(rule,1804495872,1,3,false,true,true)
1258
				end
1259
			else
1260
				gat = gat + 10
1261
			end
1262
			if(gat <= 0)then
1263
				idle = 0
1264
			end
1265
			NK.C0 = NKC0
1266
			RJ.C0 = RJC0
1267
			LS.C0 = LSC0*CF.N(0,0,-.25)*CF.A(M.R(65),M.R(180),0)
1268
			RS.C0 = RSC0*CF.A(M.R(90),M.R(gat),0)
1269
			LH.C0 = LHC0
1270
			RH.C0 = RHC0
1271
		end
1272
	else
1273
		idle = 0
1274
		gat = 0
1275
		rule.Transparency = 1
1276
		ld.Transparency = 1
1277
		rd.Transparency = 1
1278
		WalkSpeed = 0
1279
		NK.C0 = NKC0
1280
		RJ.C0 = RJC0
1281
		LS.C0 = LSC0
1282
		RS.C0 = RSC0
1283
		LH.C0 = LHC0
1284
		RH.C0 = RHC0
1285
		smacked = false
1286
	end
1287
	for i,v in next, BloodPuddles do
1288
		local mesh = i:FindFirstChild'CylinderMesh'
1289
		BloodPuddles[i] = v + 1
1290
		if(not mesh or i.Transparency >= 1)then
1291
			i:destroy() 
1292
			BloodPuddles[i] = nil
1293
		elseif(v >= Frame_Speed*4)then
1294
			local trans = (v-Frame_Speed*4)/(Frame_Speed*2)
1295
			i.Transparency = trans
1296
	            if(mesh.Scale.Z > 0)then
1297
	                mesh.Scale = mesh.Scale-V3.N(.05,0,.05)
1298
	            end
1299
		else
1300
			i.Transparency = 0
1301
		end
1302
	end
1303
end