View difference between Paste ID: uNhpjgce and Uq2NYUZ6
SHOW: | | - or go back to the newest paste.
1-
--[[
1+
-- This script has been converted to FE by iPxter
2-
	SUN IS A DEADLY LASER SCRIPT
2+
3-
		{ NOT ANYMORE THERE'S A BLANKET! }
3+
4-
		Created by Minty_Latios (ROBLOX)
4+
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5-
				   MintyLatios (V3rmillion)
5+
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6-
				   Minty Latios#1938
6+
do
7-
				   
7+
	print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
8-
				   
8+
	script.Parent = Player.Character
9-
--]]
9+
10
	--RemoteEvent for communicating
11
	local Event = Instance.new("RemoteEvent")
12-
local Player = game.Players.localPlayer
12+
	Event.Name = "UserInput_Event"
13
14
	--Fake event to make stuff like Mouse.KeyDown work
15-
local Mouse = Player:GetMouse()
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
			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
local Players = game:GetService("Players")
88
local MainCmd = "script"
89
local CmdSub = #MainCmd + 1
90
91
for _, Child in pairs(script:GetChildren()) do
92
	if Child:IsA("Script") then
93
		Child.Disabled = true
94
	end
95
end
96
97
function OnChatted(owner, message)
98
	if message:sub(1, CmdSub) == MainCmd .."/" then
99
		local scriptChildren = script:GetChildren()
100
		for _, Child in pairs(scriptChildren) do
101
			if message:sub(CmdSub + 1) == Child.Name:lower() then
102
				local New = Child:Clone()
103
				New.Parent = owner.Backpack or owner.PlayerGui
104
				New.Disabled = false
105
			end
106
		end
107
	end 
108
end
109
110
function ConnectPlr(name)
111
	for _, PossiblePlayer in pairs(Players:GetChildren()) do
112
		if PossiblePlayer:IsA("Player") then
113
			local Player = PossiblePlayer
114
			if Player.Name == name then
115
				Player.Chatted:Connect(function(MESSAGE)
116
					OnChatted(Player, MESSAGE:lower())
117
				end)
118
			else
119
				error("No player found!")
120
			end
121
		end
122
	end
123
end
124
125
return ConnectPlr
126
wait(1 / 60)
127
Effects = { }
128
local Player = owner
129
local Character = Player.Character
130
local Humanoid = Character.Humanoid
131
local LeftArm = Character["Left Arm"]
132
local RightArm = Character["Right Arm"]
133
local LeftLeg = Character["Left Leg"]
134
local RightLeg = Character["Right Leg"]
135
local Head = Character.Head
136
local Torso = Character.Torso
137
local Camera = game.Workspace.CurrentCamera
138
local RootPart = Character.HumanoidRootPart
139
local RootJoint = RootPart.RootJoint
140
local attack = false
141
local Anim = 'Idle'
142
local attacktype = 1
143
local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude 
144
local velocity = RootPart.Velocity.y
145
local sine = 0
146
local change = 1
147
local Create = LoadLibrary("RbxUtility").Create
148
149
local m = Create("Model"){
150
	Parent = Character,
151
	Name = "WeaponModel",
152
}
153
154
Humanoid.Animator.Parent = nil
155
Character.Animate.Parent = nil
156
157
local newMotor = function(part0, part1, c0, c1)
158
	local w = Create('Motor'){
159
		Parent = part0,
160
		Part0 = part0,
161
		Part1 = part1,
162
		C0 = c0,
163
		C1 = c1,
164
	}
165
	return w
166
end
167
168
function clerp(a, b, t)
169
	return a:lerp(b, t)
170
end
171
172
RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
173
NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
174
175
local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0)) 
176
local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
177
local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
178
local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
179
RootJoint.C1 = CFrame.new(0, 0, 0)
180
RootJoint.C0 = CFrame.new(0, 0, 0)
181
Torso.Neck.C1 = CFrame.new(0, 0, 0)
182
Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
183
184
local rarmc1 = RW.C1
185
local larmc1 = LW.C1
186
local rlegc1 = RH.C1
187
local llegc1 = LH.C1
188
189
local resetc1 = false
190
191
function PlayAnimationFromTable(table, speed, bool)
192
	RootJoint.C0 = clerp(RootJoint.C0, table[1], speed) 
193
	Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed) 
194
	RW.C0 = clerp(RW.C0, table[3], speed) 
195
	LW.C0 = clerp(LW.C0, table[4], speed) 
196
	RH.C0 = clerp(RH.C0, table[5], speed) 
197
	LH.C0 = clerp(LH.C0, table[6], speed) 
198
	if bool == true then
199
		if resetc1 == false then
200
			resetc1 = true
201
			RootJoint.C1 = RootJoint.C1
202
			Torso.Neck.C1 = Torso.Neck.C1
203
			RW.C1 = rarmc1
204
			LW.C1 = larmc1
205
			RH.C1 = rlegc1
206
			LH.C1 = llegc1
207
		end
208
	end
209
end
210
211
ArtificialHB = Create("BindableEvent", script){
212
	Parent = script,
213
	Name = "Heartbeat",
214
}
215
216
script:WaitForChild("Heartbeat")
217
218
frame = 1 / 30
219
tf = 0
220
allowframeloss = false
221
tossremainder = false
222
lastframe = tick()
223
script.Heartbeat:Fire()
224
225
game:GetService("RunService").Heartbeat:connect(function(s, p)
226
	tf = tf + s
227
	if tf >= frame then
228
		if allowframeloss then
229
			script.Heartbeat:Fire()
230
			lastframe = tick()
231
		else
232
			for i = 1, math.floor(tf / frame) do
233
				script.Heartbeat:Fire()
234
			end
235
			lastframe = tick()
236
		end
237
		if tossremainder then
238
			tf = 0
239
		else
240
			tf = tf - frame * math.floor(tf / frame)
241
		end
242
	end
243
end)
244
245
function swait(num)
246
	if num == 0 or num == nil then
247
		ArtificialHB.Event:wait()
248
	else
249
		for i = 0, num do
250
			ArtificialHB.Event:wait()
251
		end
252
	end
253
end
254
255
function RemoveOutlines(part)
256
	part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
257
end
258
	
259
CFuncs = {	
260
	["Part"] = {
261
		Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
262
			local Part = Create("Part"){
263
				Parent = Parent,
264
				Reflectance = Reflectance,
265
				Transparency = Transparency,
266
				CanCollide = false,
267
				Locked = true,
268
				BrickColor = BrickColor.new(tostring(BColor)),
269
				Name = Name,
270
				Size = Size,
271
				Material = Material,
272
			}
273
			RemoveOutlines(Part)
274
			return Part
275
		end;
276
	};
277
	
278
	["Mesh"] = {
279
		Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
280
			local Msh = Create(Mesh){
281
				Parent = Part,
282
				Offset = OffSet,
283
				Scale = Scale,
284
			}
285
			if Mesh == "SpecialMesh" then
286
				Msh.MeshType = MeshType
287
				Msh.MeshId = MeshId
288
			end
289
			return Msh
290
		end;
291
	};
292
	
293
	["Mesh"] = {
294
		Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
295
			local Msh = Create(Mesh){
296
				Parent = Part,
297
				Offset = OffSet,
298-
			Value = game:service("Players").LocalPlayer,
298+
299
			}
300
			if Mesh == "SpecialMesh" then
301
				Msh.MeshType = MeshType
302
				Msh.MeshId = MeshId
303
			end
304
			return Msh
305
		end;
306
	};
307
	
308
	["Weld"] = {
309
		Create = function(Parent, Part0, Part1, C0, C1)
310
			local Weld = Create("Weld"){
311
				Parent = Parent,
312
				Part0 = Part0,
313
				Part1 = Part1,
314
				C0 = C0,
315
				C1 = C1,
316
			}
317
			return Weld
318
		end;
319
	};
320
321
	["Sound"] = {
322
		Create = function(id, par, vol, pit) 
323
			coroutine.resume(coroutine.create(function()
324
				local S = Create("Sound"){
325
					Volume = vol,
326
					Pitch = pit or 1,
327
					SoundId = id,
328
					Parent = par or workspace,
329
				}
330
				wait() 
331
				S:play() 
332
				game:GetService("Debris"):AddItem(S, 6)
333
			end))
334
		end;
335
	};
336
	
337
	["ParticleEmitter"] = {
338
		Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
339
			local fp = Create("ParticleEmitter"){
340
				Parent = Parent,
341
				Color = ColorSequence.new(Color1, Color2),
342
				LightEmission = LightEmission,
343
				Size = Size,
344
				Texture = Texture,
345
				Transparency = Transparency,
346
				ZOffset = ZOffset,
347
				Acceleration = Accel,
348
				Drag = Drag,
349
				LockedToPart = LockedToPart,
350
				VelocityInheritance = VelocityInheritance,
351
				EmissionDirection = EmissionDirection,
352
				Enabled = Enabled,
353
				Lifetime = LifeTime,
354
				Rate = Rate,
355
				Rotation = Rotation,
356
				RotSpeed = RotSpeed,
357
				Speed = Speed,
358
				VelocitySpread = VelocitySpread,
359
			}
360
			return fp
361
		end;
362
	};
363
364
	CreateTemplate = {
365
	
366
	};
367
}
368
369
function rayCast(Position, Direction, Range, Ignore)
370
	return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore) 
371
end 
372
373
FindNearestTorso = function(pos)
374
	local list = (game.Workspace:children())
375
	local torso = nil
376
	local dist = 1000
377
	local temp, human, temp2 = nil, nil, nil
378
	for x = 1, #list do
379
		temp2 = list[x]
380
		if temp2.className == "Model" and temp2.Name ~= Character.Name then
381
			temp = temp2:findFirstChild("Torso")
382
			human = temp2:findFirstChild("Humanoid")
383
			if temp ~= nil and human ~= nil and human.Health > 0 and (temp.Position - pos).magnitude < dist then
384
				local dohit = true
385
				if dohit == true then
386
					torso = temp
387
					dist = (temp.Position - pos).magnitude
388
				end
389
			end
390
		end
391
	end
392
	return torso, dist
393
end
394
395
function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
396
	if hit.Parent == nil then
397
		return
398
	end
399
	local h = hit.Parent:FindFirstChild("Humanoid")
400
	for _, v in pairs(hit.Parent:children()) do
401
		if v:IsA("Humanoid") then
402
			h = v
403
		end
404
	end
405
	if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
406
		if hit.Parent:findFirstChild("DebounceHit") ~= nil then
407
			if hit.Parent.DebounceHit.Value == true then
408
				return
409
			end
410
		end
411
		local c = Create("ObjectValue"){
412
			Name = "creator",
413
			Value = owner,
414
			Parent = h,
415
		}
416
		game:GetService("Debris"):AddItem(c, .5)
417
		if HitSound ~= nil and HitPitch ~= nil then
418
			CFuncs.Sound.Create(HitSound, hit, 1, HitPitch) 
419
		end
420
		local Damage = math.random(minim, maxim)
421
		local blocked = false
422
		local block = hit.Parent:findFirstChild("Block")
423
		if block ~= nil then
424
			if block.className == "IntValue" then
425
				if block.Value > 0 then
426
					blocked = true
427
					block.Value = block.Value - 1
428
					print(block.Value)
429
				end
430
			end
431
		end
432
		if blocked == false then
433
			h.Health = h.Health - Damage
434
			ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Really black").Color)
435
		else
436
			h.Health = h.Health - (Damage / 2)
437
			ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Really black").Color)
438
		end
439
		if Type == "Knockdown" then
440
			local hum = hit.Parent.Humanoid
441
			hum.PlatformStand = true
442
			coroutine.resume(coroutine.create(function(HHumanoid)
443
				swait(1)
444
				HHumanoid.PlatformStand = false
445
			end), hum)
446
			local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
447
			local bodvol = Create("BodyVelocity"){
448
				velocity = angle * knockback,
449
				P = 5000,
450
				maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
451
				Parent = hit,
452
			}
453
			local rl = Create("BodyAngularVelocity"){
454
				P = 3000,
455
				maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
456
				angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
457
				Parent = hit,
458
			}
459
			game:GetService("Debris"):AddItem(bodvol, .5)
460
			game:GetService("Debris"):AddItem(rl, .5)
461
		elseif Type == "Normal" then
462
			local vp = Create("BodyVelocity"){
463
				P = 500,
464
				maxForce = Vector3.new(math.huge, 0, math.huge),
465
				velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
466
			}
467
			if knockback > 0 then
468
				vp.Parent = hit.Parent.Torso
469
			end
470
			game:GetService("Debris"):AddItem(vp, .5)
471
		elseif Type == "Up" then
472
			local bodyVelocity = Create("BodyVelocity"){
473
				velocity = Vector3.new(0, 20, 0),
474
				P = 5000,
475
				maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
476
				Parent = hit,
477
			}
478
			game:GetService("Debris"):AddItem(bodyVelocity, .5)
479
		elseif Type == "DarkUp" then
480
			coroutine.resume(coroutine.create(function()
481
				for i = 0, 1, 0.1 do
482
					swait()
483
					Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
484
				end
485
			end))
486
			local bodyVelocity = Create("BodyVelocity"){
487
				velocity = Vector3.new(0, 20, 0),
488
				P = 5000,
489
				maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
490
				Parent = hit,
491
			}
492
			game:GetService("Debris"):AddItem(bodyVelocity, 1)
493
		elseif Type == "Snare" then
494
			local bp = Create("BodyPosition"){
495
				P = 2000,
496
				D = 100,
497
				maxForce = Vector3.new(math.huge, math.huge, math.huge),
498
				position = hit.Parent.Torso.Position,
499
				Parent = hit.Parent.Torso,
500
			}
501
			game:GetService("Debris"):AddItem(bp, 1)
502
		elseif Type == "Freeze" then
503
			local BodPos = Create("BodyPosition"){
504
				P = 50000,
505
				D = 1000,
506
				maxForce = Vector3.new(math.huge, math.huge, math.huge),
507
				position = hit.Parent.Torso.Position,
508
				Parent = hit.Parent.Torso,
509
			}
510
			local BodGy = Create("BodyGyro") {
511
				maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
512
				P = 20e+003,
513
				Parent = hit.Parent.Torso,
514
				cframe = hit.Parent.Torso.CFrame,
515
			}
516
			hit.Parent.Torso.Anchored = true
517
			coroutine.resume(coroutine.create(function(Part) 
518
				swait(1.5)
519
				Part.Anchored = false
520
			end), hit.Parent.Torso)
521
			game:GetService("Debris"):AddItem(BodPos, 3)
522
			game:GetService("Debris"):AddItem(BodGy, 3)
523
		end
524
		local debounce = Create("BoolValue"){
525
			Name = "DebounceHit",
526
			Parent = hit.Parent,
527
			Value = true,
528
		}
529
		game:GetService("Debris"):AddItem(debounce, Delay)
530
		c = Create("ObjectValue"){
531
			Name = "creator",
532
			Value = Player,
533
			Parent = h,
534
		}
535
		game:GetService("Debris"):AddItem(c, .5)
536
	end
537
end
538
539
function ShowDamage(Pos, Text, Time, Color)
540
	local Rate = (1 / 30)
541
	local Pos = (Pos or Vector3.new(0, 0, 0))
542
	local Text = (Text or "")
543
	local Time = (Time or 2)
544
	local Color = (Color or Color3.new(1, 0, 1))
545
	local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
546
	EffectPart.Anchored = true
547
	local BillboardGui = Create("BillboardGui"){
548
		Size = UDim2.new(3, 0, 3, 0),
549
		Adornee = EffectPart,
550
		Parent = EffectPart,
551
	}
552
	local TextLabel = Create("TextLabel"){
553
		BackgroundTransparency = 1,
554
		Size = UDim2.new(1, 0, 1, 0),
555
		Text = Text,
556
		Font = "SciFi",
557
		TextColor3 = Color,
558
		TextScaled = true,
559
		Parent = BillboardGui,
560
	}
561
	game.Debris:AddItem(EffectPart, (Time))
562
	EffectPart.Parent = game:GetService("Workspace")
563
	delay(0, function()
564
		local Frames = (Time / Rate)
565
		for Frame = 1, Frames do
566
			wait(Rate)
567
			local Percent = (Frame / Frames)
568
			EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
569
			TextLabel.TextTransparency = Percent
570
		end
571
		if EffectPart and EffectPart.Parent then
572
			EffectPart:Destroy()
573
		end
574
	end)
575
end
576
577
function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
578
	for _, c in pairs(workspace:children()) do
579
		local hum = c:findFirstChild("Humanoid")
580
		if hum ~= nil then
581
			local head = c:findFirstChild("Torso")
582
			if head ~= nil then
583
				local targ = head.Position - Part.Position
584
				local mag = targ.magnitude
585
				if mag <= Magnitude and c.Name ~= Player.Name then 
586
					Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, .1, "rbxassetid://" .. HitSound, HitPitch)
587
				end
588
			end
589
		end
590
	end
591
end
592
593
EffectModel = Create("Model"){
594
	Parent = Character,
595
	Name = "Effects",
596
}
597
598
Humanoid.WalkSpeed = 0
599
Humanoid.JumpPower = 0
600
601
CFuncs['Sound'].Create("rbxassetid://836740253",Character,10,1)
602
attack = true
603
604
New = function(Object, Parent, Name, Data)
605
	local Object = Instance.new(Object)
606
	for Index, Value in pairs(Data or {}) do
607
		Object[Index] = Value
608
	end
609
	Object.Parent = Parent
610
	Object.Name = Name
611
	return Object
612
end
613
614
Deadly = New("Model",Torso,"Deadly",{})
615
Sun = New("Part",Deadly,"Sun",{BrickColor = BrickColor.new("New Yeller"),Material = Enum.Material.Neon,Size = Vector3.new(0.5, 0.5, 0.5),CFrame = CFrame.new(-128.325043, 6.92500401, -88.5550079, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1, 1, 0),})
616
SunWeld = New("Weld",Sun,"Weld",{Part0 = Sun,Part1 = Torso,C0 = CFrame.new(0,10,-10)})
617
Mesh = New("SpecialMesh",Sun,"Mesh",{Scale = Vector3.new(25, 25, 25),MeshType = Enum.MeshType.Sphere,})
618
619
620
wait(2.4)
621
for i = 0, 5, .1 do
622
	swait()
623
	PlayAnimationFromTable({
624
     CFrame.new(0, -0, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
625
     CFrame.new(7.62939453e-06, 1.49997127, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
626
     CFrame.new(1.49998116, 1.30000138, -0, -0.925471961, -0.378816098, -0, 0.378816068, -0.925472021, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
627
     CFrame.new(-1.49998665, -7.67409801e-07, 0, 0.996534884, 0.083175458, -0, -0.0831753537, 0.996536195, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
628
     CFrame.new(0.500002444, -1.99997056, 0, 0.997888863, -0.0649460033, -0, 0.0649460033, 0.997888863, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
629
     CFrame.new(-0.499981999, -1.99997056, 0, 0.998180926, 0.0602900013, -0, -0.0602900013, 0.998180926, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
630
	}, .1, false)
631
	SunWeld.C0 = clerp(SunWeld.C0, CFrame.new(0,-15,-10), 0.1)
632
end
633
wait(0.5)
634
Humanoid.WalkSpeed = 19
635
Humanoid.JumpPower = 75
636
attack = false
637
638
Effects = {
639
	Block = {
640
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
641
			local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
642
			prt.Anchored = true
643
			prt.CFrame = cframe
644
			local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
645
			game:GetService("Debris"):AddItem(prt, 10)
646
			if Type == 1 or Type == nil then
647
				table.insert(Effects, {
648
					prt,
649
					"Block1",
650
					delay,
651
					x3,
652
					y3,
653
					z3,
654
					msh
655
				})
656
			elseif Type == 2 then
657
				table.insert(Effects, {
658
					prt,
659
					"Block2",
660
					delay,
661
					x3,
662
					y3,
663
					z3,
664
					msh
665
				})
666
			end
667
		end;
668
	};
669
670
		Cylinder = {
671
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
672
			local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
673
			prt.Anchored = true
674
			prt.CFrame = cframe
675
			local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
676
			game:GetService("Debris"):AddItem(prt, 10)
677
			table.insert(Effects, {
678
				prt,
679
				"Cylinder",
680
				delay,
681
				x3,
682
				y3,
683
				z3,
684
				msh
685
			})
686
		end;
687
	};
688
	Head = {
689
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
690
			local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
691
			prt.Anchored = true
692
			prt.CFrame = cframe
693
			local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Head", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
694
			game:GetService("Debris"):AddItem(prt, 10)
695
			table.insert(Effects, {
696
				prt,
697
				"Cylinder",
698
				delay,
699
				x3,
700
				y3,
701
				z3,
702
				msh
703
			})
704
		end;
705
	};
706
	
707
	Sphere = {
708
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
709
			local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
710
			prt.Anchored = true
711
			prt.CFrame = cframe
712
			local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
713
			game:GetService("Debris"):AddItem(prt, 10)
714
			table.insert(Effects, {
715
				prt,
716
				"Cylinder",
717
				delay,
718
				x3,
719
				y3,
720
				z3,
721
				msh
722
			})
723
		end;
724
	};
725
	
726
	Elect = {
727
		Create = function(cff, x, y, z)
728
			local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1))
729
			prt.Anchored = true
730
			prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z))
731
			prt.CFrame = CFrame.new(prt.Position)
732
			game:GetService("Debris"):AddItem(prt, 2)
733
			local xval = math.random() / 2
734
			local yval = math.random() / 2
735
			local zval = math.random() / 2
736
			local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
737
			table.insert(Effects, {
738
				prt,
739
				"Elec",
740
				0.1,
741
				x,
742
				y,
743
				z,
744
				xval,
745
				yval,
746
				zval
747
			})
748
		end;
749
750
	};
751
	
752
	Ring = {
753
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
754
			local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
755
			prt.Anchored = true
756
			prt.CFrame = cframe
757
			local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
758
			game:GetService("Debris"):AddItem(prt, 10)
759
			table.insert(Effects, {
760
				prt,
761
				"Cylinder",
762
				delay,
763
				x3,
764
				y3,
765
				z3,
766
				msh
767
			})
768
		end;
769
	};
770
771
772
	Wave = {
773
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
774
			local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
775
			prt.Anchored = true
776
			prt.CFrame = cframe
777
			local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
778
			game:GetService("Debris"):AddItem(prt, 10)
779
			table.insert(Effects, {
780
				prt,
781
				"Cylinder",
782
				delay,
783
				x3,
784
				y3,
785
				z3,
786
				msh
787
			})
788
		end;
789
	};
790
791
	Break = {
792
		Create = function(brickcolor, cframe, x1, y1, z1)
793
			local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
794
			prt.Anchored = true
795
			prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
796
			local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
797
			local num = math.random(10, 50) / 1000
798
			game:GetService("Debris"):AddItem(prt, 10)
799
			table.insert(Effects, {
800
				prt,
801
				"Shatter",
802
				num,
803
				prt.CFrame,
804
				math.random() - math.random(),
805
				0,
806
				math.random(50, 100) / 100
807
			})
808
		end;
809
	};
810
	
811
	Fire = {
812
		Create = function(brickcolor, cframe, x1, y1, z1, delay)
813
			local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
814
			prt.Anchored = true
815
			prt.CFrame = cframe
816
			msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
817
			game:GetService("Debris"):AddItem(prt, 10)
818
			table.insert(Effects, {
819
				prt,
820
				"Fire",
821
				delay,
822
				1,
823
				1,
824
				1,
825
				msh
826
			})
827
		end;
828
	};
829
	
830
	FireWave = {
831
		Create = function(brickcolor, cframe, x1, y1, z1)
832
			local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 1, brickcolor, "Effect", Vector3.new())
833
			prt.Anchored = true
834
			prt.CFrame = cframe
835
			msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
836
			local d = Create("Decal"){
837
				Parent = prt,
838
				Texture = "rbxassetid://26356434",
839
				Face = "Top",
840
			}
841
			local d = Create("Decal"){
842
				Parent = prt,
843
				Texture = "rbxassetid://26356434",
844
				Face = "Bottom",
845
			}
846
			game:GetService("Debris"):AddItem(prt, 10)
847
			table.insert(Effects, {
848
				prt,
849
				"FireWave",
850
				1,
851
				30,
852
				math.random(400, 600) / 100,
853
				msh
854
			})
855
		end;
856
	};
857
	
858
	Lightning = {
859
		Create = function(p0, p1, tym, ofs, col, th, tra, last)
860
			local magz = (p0 - p1).magnitude
861
			local curpos = p0
862
			local trz = {
863
				-ofs,
864
				ofs
865
			}
866
			for i = 1, tym do
867
				local li = CFuncs.Part.Create(EffectModel, "Neon", 0, tra or 0.4, col, "Ref", Vector3.new(th, th, magz / tym))
868
				local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)])
869
				local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz
870
				li.Material = "Neon"
871
				if tym == i then
872
					local magz2 = (curpos - p1).magnitude
873
					li.Size = Vector3.new(th, th, magz2)
874
					li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2)
875
					table.insert(Effects, {
876
						li,
877
						"Disappear",
878
						last
879
					})
880
				else
881
					do
882
						do
883
							li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2)
884
							curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p
885
							game.Debris:AddItem(li, 10)
886
							table.insert(Effects, {
887
								li,
888
								"Disappear",
889
								last
890
							})
891
						end
892
					end
893
				end
894
			end
895
		end
896
	};
897
898
	EffectTemplate = {
899
900
	};
901
}
902
903
function supernova()
904
	attack = true
905
	for i = 0, 1, 0.1 do
906
		swait()
907
		PlayAnimationFromTable({
908
         CFrame.new(0, -0, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
909
         CFrame.new(7.62939453e-06, 1.49997127, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
910
         CFrame.new(1.49998248, 1.03999865, 1.31132779e-07, -0.874934673, -0.48424086, -8.74230253e-08, 0.48424086, -0.874934673, 2.16521015e-13, -7.64895418e-08, -4.23336139e-08, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
911
         CFrame.new(-1.45997405, 1.03999221, 0, -0.85547322, 0.5178473, -0, -0.517847538, -0.855473042, 0, 0, -0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
912
         CFrame.new(0.500002444, -1.99997056, 0, 0.997888863, -0.0649460033, -0, 0.0649460033, 0.997888863, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
913
         CFrame.new(-0.499981999, -1.99997056, 0, 0.998180926, 0.0602900013, -0, -0.0602900013, 0.998180926, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
914
		}, .3, false)
915
	end
916
	wait(.5)
917
	for i = 0, 5, .1 do
918
		Mesh.Scale = Mesh.Scale + Vector3.new(2,2,2)
919
		swait()
920
	end
921
	--
922
	coroutine.wrap(function()
923
	repeat swait()
924
		Mesh.Scale = Mesh.Scale + Vector3.new(2,2,2)
925
	until nil
926
	end)()
927
	--CFuncs['Sound'].Create("rbxassetid://265492506",Character,10,1)
928
	local a = Instance.new("ColorCorrectionEffect",game:service'Lighting')
929
	a.TintColor = Color3.new(1,1,1)
930
	local b = Instance.new("BlurEffect",game:service'Lighting')
931
	b.Size = 0
932
	
933
	for i = 1,0,-.1 do
934
	    b.Size = b.Size + .5
935
	    a.TintColor = Color3.new(1,1,i)
936
	    wait()
937
	end
938
	wait(1)
939
	
940
	
941
	for i = 1,0,-.1 do
942
	    a.TintColor = Color3.new(1,i,0)
943
	    b.Size = b.Size + 1
944
	    wait()
945
	end
946
	
947
	wait(1)
948
	
949
	for i = 1,0,-.1 do
950
	    a.TintColor = Color3.new(i,0,0)
951
	    wait()
952
	end
953
	wait(1)
954
	
955
	coroutine.wrap(function()
956
	    for i,v in next, workspace:children() do
957
	        if v:IsA"Model" or v:IsA"Part" then
958
	            if v:FindFirstChildOfClass"Humanoid"then
959
	                v:BreakJoints() 
960
	            end
961
	        end   
962
	    end
963
	end)()
964
	wait(1)
965
	
966
	for i = 0,1,.1 do
967
	    a.TintColor = Color3.new(1,1,i)
968
	    b.Size = b.Size - 2
969
	    wait()
970
	end
971
	
972
	a:destroy()
973
	game:service'Debris':AddItem(b,3)
974
end
975
function attackone()
976
	CFuncs['Sound'].Create("rbxassetid://811841430",Character,10,1)
977
	local a = Instance.new("Part",Character)
978
	a.Name = "Lazer"	
979
	a.Anchored = true
980
	a.CanCollide = false
981
	a.BrickColor = BrickColor.new"New Yeller"
982
	local ray = Ray.new(
983
	    Sun.CFrame.p,                           -- origin
984
	    (Mouse.Hit.p - Sun.CFrame.p).unit * 500 -- direction
985
	) 
986
	local ignore = Character
987
	local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
988
	if hit then
989
		local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
990
	 
991
		if not humanoid then
992
			humanoid = hit.Parent.Parent:FindFirstChildOfClass("Humanoid")
993
		end
994
		if humanoid then
995
			if humanoid.Parent:IsA"Model" then
996
				humanoid.Parent:BreakJoints()
997
			end
998
		end
999
	end
1000
	a.BottomSurface = 10
1001
	a.TopSurface = 10
1002
	local distance = (Sun.CFrame.p - position).magnitude
1003
	a.Size = Vector3.new(1, 1, distance)
1004
	a.CFrame = CFrame.new(Sun.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
1005
	game:GetService("Debris"):AddItem(a, 0.1)
1006
end
1007
1008
Mouse.Button1Down:connect(function()
1009
	if attack == false and attacktype == 1 then
1010
		attackone()
1011
	end
1012
end)
1013
1014
1015
Mouse.KeyDown:connect(function(k)
1016
	if attack == false and k == 'v' then
1017
		supernova()
1018
	end
1019
end)
1020
while true do
1021
	swait()
1022
	for i, v in pairs(Character:GetChildren()) do
1023
		if v:IsA("Part") then
1024
			v.Material = "SmoothPlastic"
1025
		elseif v:IsA("Accessory") then
1026
			v:WaitForChild("Handle").Material = "SmoothPlastic"
1027
		end
1028
	end
1029
	Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude 
1030
	velocity = RootPart.Velocity.y
1031
	sine = sine + change
1032
	local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
1033
		if RootPart.Velocity.y > 1 and hit == nil then 
1034
			Anim = "Jump"
1035
			if attack == false then
1036
			PlayAnimationFromTable({
1037
	         CFrame.new(0, 0, 0, 1, -2.21689355e-12, -5.11591203e-13, -2.21689355e-12, 1, 7.74860496e-07, -5.11591203e-13, 7.74860496e-07, 1.00000048) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1038
	         CFrame.new(-0.0579944476, 1.48445117, -0.000906195492, 0.999631822, -0.0259140469, -0.00804444961, 0.0262291897, 0.998776913, 0.0419151038, 0.0069484422, -0.0421099029, 0.999089062) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1039
	         CFrame.new(1.68067598, 0.167780995, 5.50026158e-08, 0.965881884, -0.258982956, -3.41060513e-13, 0.258982956, 0.965881884, 4.47034836e-07, 8.49010675e-08, 3.16640808e-07, 1.00000024) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1040
	         CFrame.new(-1.67620921, 0.188169807, -3.04922651e-07, 0.95698452, 0.290146649, -2.61441073e-07, -0.290146649, 0.95698452, -1.0069979e-05, -2.89639524e-06, 1.04542296e-05, 1.00000024) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1041
	         CFrame.new(0.537238836, -1.93797374, 0.176598221, 0.998698533, -0.0506777391, -0.00574572897, 0.0510024093, 0.992341697, 0.112511501, -6.35704041e-08, -0.112657718, 0.993634105) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1042
	         CFrame.new(-0.536944568, -1.94808352, 0.126473114, 0.998626292, 0.0520468242, 0.00521374354, -0.0523067154, 0.993665218, 0.0995327011, -3.84102691e-07, -0.099668026, 0.995023906) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1043
			}, .3, false)
1044
			end
1045
		elseif RootPart.Velocity.y < -1 and hit == nil then 
1046
			Anim = "Fall"
1047
			if attack == false then
1048
				PlayAnimationFromTable({
1049
		         CFrame.new(0, 0, 0, 1, -2.21689355e-12, -5.11591203e-13, -2.21689355e-12, 1, 7.74860496e-07, -5.11591203e-13, 7.74860496e-07, 1.00000048) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1050
		         CFrame.new(-0.0576509275, 1.50532985, -0.129091382, 0.999631822, -0.0231846143, -0.0140984114, 0.0262298863, 0.958684564, 0.283279002, 0.00694822101, -0.283544153, 0.958935201) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1051
		         CFrame.new(1.68622994, 0.21415168, 7.02040666e-08, 0.881990671, -0.471266806, -3.41060513e-13, 0.471266806, 0.881990671, 4.47034836e-07, 1.54493137e-07, 2.89139166e-07, 1.00000024) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1052
		         CFrame.new(-1.72513735, 0.240890861, 2.54038241e-07, 0.814108491, 0.58071363, -2.61430017e-07, -0.580713034, 0.814108849, -1.00698489e-05, -6.08482924e-06, 8.98058715e-06, 1.00000024) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1053
		         CFrame.new(0.536720514, -1.92783141, 0.223740995, 0.998698533, -0.0498600565, -0.0107376017, 0.0510031059, 0.976314366, 0.210260883, -3.04512355e-07, -0.210534185, 0.977587521) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1054
		         CFrame.new(-0.535922825, -1.92850935, 0.222419083, 0.99863112, 0.0512506701, 0.0104565797, -0.0523065142, 0.978474379, 0.199629858, -3.7062793e-07, -0.199902818, 0.97981596) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1055
				}, .3, false)
1056
			end
1057
		elseif Torsovelocity < 1 and hit ~= nil then
1058
			Anim = "Idle"
1059
			if attack == false then
1060
				change = 1
1061
				PlayAnimationFromTable({
1062
		         CFrame.new(0, -0, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1063
		         CFrame.new(7.62939453e-06, 1.49997127, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(math.sin(sine/22)/12,0,0), 
1064
		         CFrame.new(0.429973245, 0.490001738, -0.460011989, 0.0975494087, 0.994276762, -0.0435587466, 0.0559796244, -0.0491798446, -0.997221529, -0.993656218, 0.0948399603, -0.0604567304) * CFrame.new(0, 0, math.sin(sine/16)/14) * CFrame.Angles(0, math.sin(sine/16)/10, math.sin(sine/16)/10), 
1065
		         CFrame.new(-0.320005357, 0.480002224, -0.539992452, 0.357028693, -0.930425704, -0.0826981664, -0.130211353, 0.0380947962, -0.990754068, 0.924973309, 0.364495993, -0.107551016) * CFrame.new(0, 0, math.sin(sine/16)/14) * CFrame.Angles(0, -math.sin(sine/16)/10, -math.sin(sine/16)/10), 
1066
		         CFrame.new(0.500002444, -1.99997056, 0, 0.997888863, -0.0649460033, -0, 0.0649460033, 0.997888863, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1067
		         CFrame.new(-0.499981999, -1.99997056, 0, 0.998180926, 0.0602900013, -0, -0.0602900013, 0.998180926, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1068
				}, .3, false)
1069
				
1070
			end
1071
		elseif Torsovelocity > 2 and hit ~= nil then
1072
			Anim = "Walk"
1073
			if attack == false then
1074
			 	PlayAnimationFromTable({		
1075
		         CFrame.new(0, 0, 0, 1, -2.21689355e-12, -5.11591203e-13, -2.21689355e-12, 1, 7.74860496e-07, -5.11591203e-13, 7.74860496e-07, 1.00000048) * CFrame.new(0, 0- .08 * math.cos((sine) / 3), 0) * CFrame.Angles(0, 0, 0), 
1076
		         CFrame.new(-0.0595112406, 1.55331731, -0.0425721854, 0.999631822, -0.0248252042, -0.010953242, 0.0262294486, 0.987443328, 0.155781403, 0.00694842171, -0.156010598, 0.987731278) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
1077
		         CFrame.new(0.429973245, 0.490001738, -0.460011989, 0.0975494087, 0.994276762, -0.0435587466, 0.0559796244, -0.0491798446, -0.997221529, -0.993656218, 0.0948399603, -0.0604567304) * CFrame.new(0, 0, math.sin(sine/16)/14) * CFrame.Angles(0, math.sin(sine/16)/10, math.sin(sine/16)/10), 
1078
		         CFrame.new(-0.320005357, 0.480002224, -0.539992452, 0.357028693, -0.930425704, -0.0826981664, -0.130211353, 0.0380947962, -0.990754068, 0.924973309, 0.364495993, -0.107551016) * CFrame.new(0, 0, math.sin(sine/16)/14) * CFrame.Angles(0, -math.sin(sine/16)/10, -math.sin(sine/16)/10), 
1079
		         CFrame.new(0.540300786, -1.99793816, -9.82598067e-07, 0.998698533, -0.0510031395, 6.36324955e-07, 0.0510031395, 0.998698533, -1.00461093e-05, -8.35937328e-08, 1.08393433e-05, 1.00000024) * CFrame.new(0, 0, 0+ .5 * math.cos((sine) / 6)) * CFrame.Angles(math.rad(0 - 30 * math.cos((sine) / 6)), 0, 0), 
1080
		         CFrame.new(-0.539563596, -1.99794078, 1.12228372e-06, 0.998635888, 0.0523072146, -1.77852357e-07, -0.0523072146, 0.998635888, -1.00715051e-05, -3.89727461e-07, 1.08406466e-05, 1.00000024) * CFrame.new(0, 0, 0- .5 * math.cos((sine) / 6)) * CFrame.Angles(math.rad(0 + 30 * math.cos((sine) / 6)), 0, 0), 
1081
				}, .3, false)
1082
			end
1083
		end
1084
	if 0 < #Effects then
1085
		for e = 1, #Effects do
1086
			if Effects[e] ~= nil then
1087
				local Thing = Effects[e]
1088
				if Thing ~= nil then
1089
					local Part = Thing[1]
1090
					local Mode = Thing[2]
1091
					local Delay = Thing[3]
1092
					local IncX = Thing[4]
1093
					local IncY = Thing[5]
1094
					local IncZ = Thing[6]
1095
					if Thing[2] == "Shoot" then
1096
						local Look = Thing[1]
1097
						local move = 30
1098
						if Thing[8] == 3 then
1099
							move = 10
1100
						end
1101
						local hit, pos = rayCast(Thing[4], Thing[1], move, m)
1102
						if Thing[10] ~= nil then
1103
							da = pos
1104
							cf2 = CFrame.new(Thing[4], Thing[10].Position)
1105
							cfa = CFrame.new(Thing[4], pos)
1106
							tehCF = cfa:lerp(cf2, 0.2)
1107
							Thing[1] = tehCF.lookVector
1108
						end
1109
						local mag = (Thing[4] - pos).magnitude
1110
						Effects["Head"].Create(Torso.BrickColor, CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0), 1, mag * 5, 1, 0.5, 0, 0.5, 0.2)
1111
						if Thing[8] == 2 then
1112
							Effects["Ring"].Create(Torso.BrickColor, CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0) * CFrame.fromEulerAnglesXYZ(1.57, 0, 0), 1, 1, 0.1, 0.5, 0.5, 0.1, 0.1, 1)
1113
						end
1114
						Thing[4] = Thing[4] + Look * move
1115
						Thing[3] = Thing[3] - 1
1116
						if 2 < Thing[5] then
1117
							Thing[5] = Thing[5] - 0.3
1118
							Thing[6] = Thing[6] - 0.3
1119
						end
1120
						if hit ~= nil then
1121
							Thing[3] = 0
1122
							if Thing[8] == 1 or Thing[8] == 3 then
1123
								Damage(hit, hit, Thing[5], Thing[6], Thing[7], "Normal", RootPart, 0, "", 1)
1124
							else
1125
								if Thing[8] == 2 then
1126
									Damage(hit, hit, Thing[5], Thing[6], Thing[7], "Normal", RootPart, 0, "", 1)
1127
									if (hit.Parent:findFirstChild("Humanoid")) ~= nil or (hit.Parent.Parent:findFirstChild("Humanoid")) ~= nil then
1128
										ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
1129
										ref.Anchored = true
1130
										ref.CFrame = CFrame.new(pos)
1131
										CFuncs["Sound"].Create("161006093", ref, 1, 1.2)
1132
										game:GetService("Debris"):AddItem(ref, 0.2)
1133
										Effects["Block"].Create(Torso.BrickColor, CFrame.new(ref.Position) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 10, 10, 10, 0.1, 2)
1134
										Effects["Ring"].Create(BrickColor.new("Bright yellow"), CFrame.new(ref.Position) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 0.1, 4, 4, 0.1, 0.1)
1135
										MagnitudeDamage(ref, 15, Thing[5] / 1.5, Thing[6] / 1.5, 0, "Normal", "", 1)
1136
									end
1137
								end
1138
							end
1139
							ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
1140
							ref.Anchored = true
1141
							ref.CFrame = CFrame.new(pos)
1142
							Effects["Sphere"].Create(Torso.BrickColor, CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07)
1143
							game:GetService("Debris"):AddItem(ref, 1)
1144
						end
1145
						if Thing[3] <= 0 then
1146
							table.remove(Effects, e)
1147
						end
1148
					end
1149
					do
1150
						do
1151
							if Thing[2] == "FireWave" then
1152
								if Thing[3] <= Thing[4] then
1153
									Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(0, 1, 0)
1154
									Thing[3] = Thing[3] + 1
1155
									Thing[6].Scale = Thing[6].Scale + Vector3.new(Thing[5], 0, Thing[5])
1156
								else
1157
									Part.Parent = nil
1158
									table.remove(Effects, e)
1159
								end
1160
							end
1161
							if Thing[2] ~= "Shoot" and Thing[2] ~= "Wave" and Thing[2] ~= "FireWave" then
1162
								if Thing[1].Transparency <= 1 then
1163
									if Thing[2] == "Block1" then
1164
										Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1165
										Mesh = Thing[7]
1166
										Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1167
										Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1168
									else
1169
										if Thing[2] == "Block2" then
1170
											Thing[1].CFrame = Thing[1].CFrame
1171
											Mesh = Thing[7]
1172
											Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1173
											Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1174
										else
1175
											if Thing[2] == "Fire" then
1176
												Thing[1].CFrame = CFrame.new(Thing[1].Position) + Vector3.new(0, 0.2, 0)
1177
												Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1178
												Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1179
											else
1180
												if Thing[2] == "Cylinder" then
1181
													Mesh = Thing[7]
1182
													Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1183
													Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1184
												else
1185
													if Thing[2] == "Blood" then
1186
														Mesh = Thing[7]
1187
														Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0)
1188
														Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1189
														Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1190
													else
1191
														if Thing[2] == "Elec" then
1192
															Mesh = Thing[10]
1193
															Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
1194
															Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1195
														else
1196
															if Thing[2] == "Disappear" then
1197
																Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1198
															else
1199
																if Thing[2] == "Shatter" then
1200
														Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1201
														Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
1202
														Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
1203
														Thing[6] = Thing[6] + Thing[5]
1204
																end
1205
															end
1206
														end
1207
													end
1208
												end
1209
											end
1210
										end
1211
									end
1212
								else
1213
									Part.Parent = nil
1214
									table.remove(Effects, e)
1215
								end
1216
							end
1217
						end
1218
					end
1219
				end
1220
			end
1221
		end
1222
	end
1223
end