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