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