View difference between Paste ID: J1UpkKcf and S50VwspY
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
local Player,game,owner = owner,game
3
local RealPlayer = Player
4
do
5
    print("FE Compatibility code V2 by Mokiros")
6
    local RealPlayer = RealPlayer
7
    script.Parent = RealPlayer.Character
8
 
9
    --Fake event to make stuff like Mouse.KeyDown work
10
    local Disconnect_Function = function(this)
11
        this[1].Functions[this[2]] = nil
12
    end
13
    local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
14
    local FakeEvent_Metatable = {__index={
15
        Connect = function(this,f)
16
            local i = tostring(math.random(0,10000))
17
            while this.Functions[i] do
18
                i = tostring(math.random(0,10000))
19
            end
20
            this.Functions[i] = f
21
            return setmetatable({this,i},Disconnect_Metatable)
22
        end
23
    }}
24
    FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
25
    local function fakeEvent()
26
        return setmetatable({Functions={}},FakeEvent_Metatable)
27
    end
28
 
29
    --Creating fake input objects with fake variables
30
    local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
31
    FakeMouse.keyUp = FakeMouse.KeyUp
32
    FakeMouse.keyDown = FakeMouse.KeyDown
33
    local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
34
    local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
35
        CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
36
    end}
37
    --Merged 2 functions into one by checking amount of arguments
38
    CAS.UnbindAction = CAS.BindAction
39
 
40
    --This function will trigger the events that have been :Connect()'ed
41
    local function TriggerEvent(self,ev,...)
42
        for _,f in pairs(self[ev].Functions) do
43
            f(...)
44
        end
45
    end
46
    FakeMouse.TriggerEvent = TriggerEvent
47
    UIS.TriggerEvent = TriggerEvent
48
 
49
    --Client communication
50
    local Event = Instance.new("RemoteEvent")
51
    Event.Name = "UserInput_Event"
52
    Event.OnServerEvent:Connect(function(plr,io)
53
        if plr~=RealPlayer then return end
54
        FakeMouse.Target = io.Target
55
        FakeMouse.Hit = io.Hit
56
        if not io.isMouse then
57
            local b = io.UserInputState == Enum.UserInputState.Begin
58
            if io.UserInputType == Enum.UserInputType.MouseButton1 then
59
                return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
60
            end
61
            if io.UserInputType == Enum.UserInputType.MouseButton2 then
62
                return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
63
            end
64
            for _,t in pairs(CAS.Actions) do
65
                for _,k in pairs(t.Keys) do
66
                    if k==io.KeyCode then
67
                        t.Function(t.Name,io.UserInputState,io)
68
                    end
69
                end
70
            end
71
            FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
72
            UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
73
        end
74
    end)
75
    Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
76
    local Mouse = owner:GetMouse()
77
    local UIS = game:GetService("UserInputService")
78
    local input = function(io,RobloxHandled)
79
        if RobloxHandled then return end
80
        --Since InputObject is a client-side instance, we create and pass table instead
81
        Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
82
    end
83
    UIS.InputBegan:Connect(input)
84
    UIS.InputEnded:Connect(input)
85
    local h,t
86
    --Give the server mouse data every second frame, but only if the values changed
87
    --If player is not moving their mouse, client won't fire events
88
    local HB = game:GetService("RunService").Heartbeat
89
    while true do
90
        if h~=Mouse.Hit or t~=Mouse.Target then
91
            h,t=Mouse.Hit,Mouse.Target
92
            Event:FireServer({isMouse=true,Target=t,Hit=h})
93
        end
94
        --Wait 2 frames
95
        for i=1,2 do
96
            HB:Wait()
97
        end
98
    end]==],script)
99
 
100
    ----Sandboxed game object that allows the usage of client-side methods and services
101
    --Real game object
102
    local RealGame = game
103
 
104
    --Metatable for fake service
105
    local FakeService_Metatable = {
106
        __index = function(self,k)
107
            local s = rawget(self,"_RealService")
108
            if s then
109
                return typeof(s[k])=="function"
110
                and function(_,...)return s[k](s,...)end or s[k]
111
            end
112
        end,
113
        __newindex = function(self,k,v)
114
            local s = rawget(self,"_RealService")
115
            if s then s[k]=v end
116
        end
117
    }
118
    local function FakeService(t,RealService)
119
        t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
120
        return setmetatable(t,FakeService_Metatable)
121
    end
122
 
123
    --Fake game object
124
    local FakeGame = {
125
        GetService = function(self,s)
126
            return rawget(self,s) or RealGame:GetService(s)
127
        end,
128
        Players = FakeService({
129
            LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
130
        },"Players"),
131
        UserInputService = FakeService(UIS,"UserInputService"),
132
        ContextActionService = FakeService(CAS,"ContextActionService"),
133
        RunService = FakeService({
134
            _btrs = {},
135
            RenderStepped = RealGame:GetService("RunService").Heartbeat,
136
            BindToRenderStep = function(self,name,_,fun)
137
                self._btrs[name] = self.Heartbeat:Connect(fun)
138
            end,
139
            UnbindFromRenderStep = function(self,name)
140
                self._btrs[name]:Disconnect()
141
            end,
142
        },"RunService")
143
    }
144
    rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
145
    FakeGame.service = FakeGame.GetService
146
    FakeService(FakeGame,game)
147
    --Changing owner to fake player object to support owner:GetMouse()
148
    game,owner = FakeGame,FakeGame.Players.LocalPlayer
149
end
150
151
Character = game.Players.LocalPlayer.Character
152
Head = Character.Head
153
154
CV="Blue"
155
	p = game.Players.LocalPlayer
156
	char = p.Character
157
	local txt = Instance.new("BillboardGui", char)
158
	txt.Adornee = char .Head
159
	txt.Name = "_status"
160
	txt.Size = UDim2.new(2, 0, 1.2, 0)
161
	txt.StudsOffset = Vector3.new(-9, 8, 0)
162
	local text = Instance.new("TextLabel", txt)
163
	text.Size = UDim2.new(10, 0, 7, 0)
164
	text.FontSize = "Size24"
165
	text.TextScaled = true
166
	text.TextTransparency = 0
167
	text.BackgroundTransparency = 1 
168
	text.TextTransparency = 0
169
	text.TextStrokeTransparency = 0
170
	text.Font = "Cartoon"
171
	text.TextStrokeColor3 = Color3.new(10,0,0)
172
173
	v=Instance.new("Part")
174
	v.Name = "ColorBrick"
175
	v.Parent=p.Character
176
	v.FormFactor="Symmetric"
177
	v.Anchored=true
178
	v.CanCollide=false
179
	v.BottomSurface="Smooth"
180
	v.TopSurface="Smooth"
181
	v.Size=Vector3.new(10,5,3)
182
	v.Transparency=1
183
	v.CFrame=char.Torso.CFrame
184
	v.BrickColor=BrickColor.new(CV)
185
	v.Transparency=1
186
	text.TextColor3 = Color3.new(10,0,0)
187
	v.Shape="Block"
188
	text.Text = "Drunk guy with a inverted flare "
189
190
	local s = Instance.new("Sound",char)
191
	s.Name = "BGMusic"
192
	s.SoundId = "rbxassetid://813670691"
193
	s.Pitch = 1
194
	s.Volume = 4
195
	s.Looped = true
196
	s.archivable = false
197
	s.Parent = char.Head
198
	wait(0.1)
199
	s:play()
200
201
202
--[[Nocturna_A._Alteriano_Night.Owl.Inc]]--
203
--[[Edited by whenyoudiev3]]--
204
wait(1 / 60)
205
Effects = { }
206
local Player = game.Players.localPlayer
207
local Character = Player.Character
208
local Humanoid = Character.Humanoid
209
local mouse = Player:GetMouse()
210
local m = Instance.new('Model', Character)
211
m.Name = "WeaponModel"
212
local LeftArm = Character["Left Arm"]
213
local RightArm = Character["Right Arm"]
214
local LeftLeg = Character["Left Leg"]
215
local RightLeg = Character["Right Leg"]
216
local Head = Character.Head
217
local Torso = Character.Torso
218
local cam = game.Workspace.CurrentCamera
219
local RootPart = Character.HumanoidRootPart
220
local RootJoint = RootPart.RootJoint
221
local equipped = false
222
local attack = false
223
local Anim = 'Idle'
224
local idle = 0
225
local attacktype = 1
226
local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude 
227
local velocity = RootPart.Velocity.y
228
local sine = 0
229
local change = 1
230
local grabbed = false
231
local cn = CFrame.new
232
local mr = math.rad
233
local angles = CFrame.Angles
234
local ud = UDim2.new
235
local c3 = Color3.new
236
Instance.new("ForceField", game.Players.LocalPlayer.Character)
237
238
Humanoid.Animator.Parent = nil
239
Character.Animate.Parent = nil
240
241
local newMotor = function(part0, part1, c0, c1)
242
	local w = Instance.new('Motor', part0)
243
	w.Part0 = part0
244
	w.Part1 = part1
245
	w.C0 = c0
246
	w.C1 = c1
247
	return w
248
end
249
250
function clerp(a, b, t)
251
	return a:lerp(b, t)
252
end
253
254
RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
255
NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
256
257
local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0)) 
258
local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
259
local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
260
local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
261
RootJoint.C1 = CFrame.new(0, 0, 0)
262
RootJoint.C0 = CFrame.new(0, 0, 0)
263
Torso.Neck.C1 = CFrame.new(0, 0, 0)
264
Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
265
266
local rarmc1 = RW.C1
267
local larmc1 = LW.C1
268
local rlegc1 = RH.C1
269
local llegc1 = LH.C1
270
271
local resetc1 = false
272
273
function PlayAnimationFromTable(table, speed, bool)
274
	RootJoint.C0 = clerp(RootJoint.C0, table[1], speed) 
275
	Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed) 
276
	RW.C0 = clerp(RW.C0, table[3], speed) 
277
	LW.C0 = clerp(LW.C0, table[4], speed) 
278
	RH.C0 = clerp(RH.C0, table[5], speed) 
279
	LH.C0 = clerp(LH.C0, table[6], speed) 
280
	if bool == true then
281
		if resetc1 == false then
282
			resetc1 = true
283
			RootJoint.C1 = RootJoint.C1
284
			Torso.Neck.C1 = Torso.Neck.C1
285
			RW.C1 = rarmc1
286
			LW.C1 = larmc1
287
			RH.C1 = rlegc1
288
			LH.C1 = llegc1
289
		end
290
	end
291
end
292
293
Char = char
294
295
--[[Credits to SazErenos for his Artificial Heartbeat]]--
296
297
ArtificialHB = Instance.new("BindableEvent", script)
298
ArtificialHB.Name = "Heartbeat"
299
300
script:WaitForChild("Heartbeat")
301
302
frame = 1 / 30
303
tf = 0
304
allowframeloss = false
305
tossremainder = false
306
lastframe = tick()
307
script.Heartbeat:Fire()
308
309
game:GetService("RunService").Heartbeat:connect(function(s, p)
310
	tf = tf + s
311
	if tf >= frame then
312
		if allowframeloss then
313
			script.Heartbeat:Fire()
314
			lastframe = tick()
315
		else
316
			for i = 1, math.floor(tf / frame) do
317
				script.Heartbeat:Fire()
318
			end
319
			lastframe = tick()
320
		end
321
		if tossremainder then
322
			tf = 0
323
		else
324
			tf = tf - frame * math.floor(tf / frame)
325
		end
326
	end
327
end)
328
329
function swait(num)
330
	if num == 0 or num == nil then
331
		ArtificialHB.Event:wait()
332
	else
333
		for i = 0, num do
334
			ArtificialHB.Event:wait()
335
		end
336
	end
337
end
338
339
local RbxUtility = LoadLibrary("RbxUtility")
340
local Create = RbxUtility.Create
341
342
function RemoveOutlines(part)
343
	part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
344
end
345
	
346
CFuncs = {	
347
	["Part"] = {
348
		Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
349
			local Part = Create("Part"){
350
				Parent = Parent,
351
				Reflectance = Reflectance,
352
				Transparency = Transparency,
353
				CanCollide = false,
354
				Locked = true,
355
				BrickColor = BrickColor.new(tostring(BColor)),
356
				Name = Name,
357
				Size = Size,
358
				Material = Material,
359
			}
360
			RemoveOutlines(Part)
361
			return Part
362
		end;
363
	};
364
	
365
	["Mesh"] = {
366
		Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
367
			local Msh = Create(Mesh){
368
				Parent = Part,
369
				Offset = OffSet,
370
				Scale = Scale,
371
			}
372
			if Mesh == "SpecialMesh" then
373
				Msh.MeshType = MeshType
374
				Msh.MeshId = MeshId
375
			end
376
			return Msh
377
		end;
378
	};
379
	
380
	["Mesh"] = {
381
		Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
382
			local Msh = Create(Mesh){
383
				Parent = Part,
384
				Offset = OffSet,
385
				Scale = Scale,
386
			}
387
			if Mesh == "SpecialMesh" then
388
				Msh.MeshType = MeshType
389
				Msh.MeshId = MeshId
390
			end
391
			return Msh
392
		end;
393
	};
394
	
395
	["Weld"] = {
396
		Create = function(Parent, Part0, Part1, C0, C1)
397
			local Weld = Create("Weld"){
398
				Parent = Parent,
399
				Part0 = Part0,
400
				Part1 = Part1,
401
				C0 = C0,
402
				C1 = C1,
403
			}
404
			return Weld
405
		end;
406
	};
407
408
	["Sound"] = {
409
		Create = function(id, par, vol, pit) 
410
			coroutine.resume(coroutine.create(function()
411
				local S = Create("Sound"){
412
					Volume = vol,
413
					Pitch = pit or 1,
414
					SoundId = id,
415
					Parent = par or workspace,
416
				}
417
				Instance.new("DistortionSoundEffect", S).Level = 1
418
				wait() 
419
				S:play() 
420
				game:GetService("Debris"):AddItem(S, 10)
421
			end))
422
		end;
423
	};
424
	
425
	["ParticleEmitter"] = {
426
		Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
427
			local fp = Create("ParticleEmitter"){
428
				Parent = Parent,
429
				Color = ColorSequence.new(Color1, Color2),
430
				LightEmission = LightEmission,
431
				Size = Size,
432
				Texture = Texture,
433
				Transparency = Transparency,
434
				ZOffset = ZOffset,
435
				Acceleration = Accel,
436
				Drag = Drag,
437
				LockedToPart = LockedToPart,
438
				VelocityInheritance = VelocityInheritance,
439
				EmissionDirection = EmissionDirection,
440
				Enabled = Enabled,
441
				Lifetime = LifeTime,
442
				Rate = Rate,
443
				Rotation = Rotation,
444
				RotSpeed = RotSpeed,
445
				Speed = Speed,
446
				VelocitySpread = VelocitySpread,
447
			}
448
			return fp
449
		end;
450
	};
451
}
452
453
function rayCast(Position, Direction, Range, Ignore)
454
	return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore) 
455
end 
456
457
local function GetNearest(obj, distance)
458
	local last, lastx = distance + 1
459
	for i, v in pairs(workspace:GetChildren()) do
460
		if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
461
			local t = v.Torso
462
			local dist = (t.Position - obj.Position).magnitude
463
			if dist <= distance then
464
				if dist < last then
465
					last = dist
466
					lastx = v
467
				end
468
			end
469
		end
470
	end
471
	return lastx
472
end
473
474
--[[ Credits to Kert109 (Ninja_Deer) for the Damage function. Fenrier for the Magnitude Damage ]]--
475
476
function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
477
	for i, v in pairs(hit:GetChildren()) do 
478
		if v:IsA("Humanoid") and hit.Name ~= Character.Name then
479
			local find = v:FindFirstChild("DebounceHit")
480
			if not find then
481
				if v.Parent:findFirstChild("Head") then
482
					local BillG = Create("BillboardGui"){
483
						Parent = v.Parent.Head,
484
						Size = UDim2.new(1, 0, 1, 0),
485
						Adornee = v.Parent.Head,
486
						StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
487
					}
488
					local TL = Create("TextLabel"){
489
						Parent = BillG,
490
						Size = UDim2.new(3, 3, 3, 3),
491
						BackgroundTransparency = 1,
492
						Text = tostring(damage).."-",
493
						TextColor3 = Color1.Color,
494
						TextStrokeColor3 = Color2.Color,
495
						TextStrokeTransparency = 0,
496
						TextXAlignment = Enum.TextXAlignment.Center,
497
						TextYAlignment = Enum.TextYAlignment.Center,
498
						FontSize = Enum.FontSize.Size18,
499
						Font = "ArialBold",
500
					}
501
					coroutine.resume(coroutine.create(function()
502
						swait(1)
503
						for i = 0, 1, .1 do
504
							swait(.1)
505
							BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
506
						end
507
						BillG:Destroy()
508
					end))
509
				end
510
				v.Health = v.Health - damage
511
				local bool = Create("BoolValue"){
512
					Parent = v,
513
					Name = "DebounceHit",
514
				}
515
				if HSound ~= nil and HPitch ~= nil then
516
					CFuncs["Sound"].Create(HSound, hit, 1, HPitch) 
517
				end
518
				game:GetService("Debris"):AddItem(bool, cooldown)
519
			end
520
		end
521
	end
522
end
523
524
function MagnitudeDamage(Part, magni, mindam, maxdam, Color1, Color2, HSound, HPitch)
525
	for _, c in pairs(workspace:children()) do
526
		local hum = c:findFirstChild("Humanoid")
527
		if hum ~= nil then
528
			local head = c:findFirstChild("Torso")
529
			if head ~= nil then
530
				local targ = head.Position - Part.Position
531
				local mag = targ.magnitude
532
				if mag <= magni and c.Name ~= Player.Name then 
533
					Damage(head.Parent, math.random(mindam, maxdam), 0.5, Color1, Color2, HSound, HPitch)
534
				end
535
			end
536
		end
537
	end
538
end
539
540
Handle = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "Handle", Vector3.new(-0.399999946, 0.899999976, -0.400000095))
541
HandleWeld = CFuncs["Weld"].Create(m, Character["Right Arm"], Handle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.199958801, -0.0500774384, -1.09998882, -1, 0, 0, 0, 0, -1, -0, -1, -0))
542
FakeHandle = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "FakeHandle", Vector3.new(0.399999946, 0.899999976, 0.400000095))
543
FakeHandleWeld = CFuncs["Weld"].Create(m, Handle, FakeHandle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.199996948, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
544
Barrel = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "Barrel", Vector3.new(0.399999946, 0.399999976, 0.400000095))
545
BarrelWeld = CFuncs["Weld"].Create(m, FakeHandle, Barrel, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0, -0.749999046, -1.50000024, 1, 0, 0, 0, 1, 0, 0, 0, 1))
546
Part = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 0, "Medium stone grey", "Part", Vector3.new(-0.399999946, 0.299999952, -0.400000095))
547
PartWeld = CFuncs["Weld"].Create(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.38, -0.300000194, 0.400000160, 1, 0, 0, 0, 1, 0, 0, 0, -1))
548-
CFuncs["Mesh"].Create("SpecialMesh", Part, Enum.MeshType.FileMesh, "rbxassetid://443983595", Vector3.new(0, 0, 0), Vector3.new(0.002000000010, 0.007000000010, 0.003000010))
548+
CFuncs["Mesh"].Create("SpecialMesh", Part, Enum.MeshType.FileMesh, "rbxassetid://85273400", Vector3.new(0, 0, 0), Vector3.new(0.002000000020, 0.007000000020, 0.003000020))
549
Part.Mesh.TextureId = "rbxassetid://443983604"
550
Part.Mesh.Scale = Vector3.new(0.018, 0.018, 0.018)
551
552
EffectModel = Instance.new("Model", Character)
553
EffectModel.Name = "Effects"
554
555
Effects = {
556
	["Block"] = {
557
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
558
			local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
559
			prt.Anchored = true
560
			prt.CFrame = cframe
561
			local msh = CFuncs["Mesh"].Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
562
			game:GetService("Debris"):AddItem(prt, 10)
563
			if Type == 1 or Type == nil then
564
				table.insert(Effects, {
565
					prt,
566
					"Block1",
567
					delay,
568
					x3,
569
					y3,
570
					z3,
571
					msh
572
				})
573
			elseif Type == 2 then
574
				table.insert(Effects, {
575
					prt,
576
					"Block2",
577
					delay,
578
					x3,
579
					y3,
580
					z3,
581
					msh
582
				})
583
			end
584
		end;
585
	};
586
	
587
	["Cylinder"] = {
588
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
589
			local prt = CFuncs["Part"].Create(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.2, 0.2, 0.2))
590
			prt.Anchored = true
591
			prt.CFrame = cframe
592
			local msh = CFuncs["Mesh"].Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
593
			game:GetService("Debris"):AddItem(prt, 2)
594
			Effects[#Effects + 1] = {
595
				prt,
596
				"Cylinder",
597
				delay,
598
				x3,
599
				y3,
600
				z3
601
			}
602
		end;
603
	};
604
	
605
	["Sphere"] = {
606
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
607
			local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
608
			prt.Anchored = true
609
			prt.CFrame = cframe
610
			local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
611
			game:GetService("Debris"):AddItem(prt, 10)
612
			table.insert(Effects, {
613
				prt,
614
				"Cylinder",
615
				delay,
616
				x3,
617
				y3,
618
				z3,
619
				msh
620
			})
621
		end;
622
	};
623
	
624
	["Elec"] = {
625
		Create = function(cff, x, y, z)
626
			local prt = CFuncs["Part"].Create(workspace, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1))
627
			prt.Anchored = true
628
			prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z))
629
			prt.CFrame = CFrame.new(prt.Position)
630
			game:GetService("Debris"):AddItem(prt, 2)
631
			local xval = math.random() / 2
632
			local yval = math.random() / 2
633
			local zval = math.random() / 2
634
			local msh = CFuncs["Mesh"].Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
635
			table.insert(Effects, {
636
				prt,
637
				"Elec",
638
				0.1,
639
				x,
640
				y,
641
				z,
642
				xval,
643
				yval,
644
				zval
645
			})
646
		end;
647
648
	};
649
	
650
	["Ring"] = {
651
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
652
			local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
653
			prt.Anchored = true
654
			prt.CFrame = cframe
655
			local msh = CFuncs["Mesh"].Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
656
			game:GetService("Debris"):AddItem(prt, 10)
657
			table.insert(Effects, {
658
				prt,
659
				"Cylinder",
660
				delay,
661
				x3,
662
				y3,
663
				z3,
664
				msh
665
			})
666
		end;
667
	};
668
669
670
	["Wave"] = {
671
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
672
			local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
673
			prt.Anchored = true
674
			prt.CFrame = cframe
675
			local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", 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
689
	["Break"] = {
690
		Create = function(brickcolor, cframe, x1, y1, z1)
691
			local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
692
			prt.Anchored = true
693
			prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
694
			local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
695
			local num = math.random(10, 50) / 1000
696
			game:GetService("Debris"):AddItem(prt, 10)
697
			table.insert(Effects, {
698
				prt,
699
				"Shatter",
700
				num,
701
				prt.CFrame,
702
				math.random() - math.random(),
703
				0,
704
				math.random(50, 100) / 100
705
			})
706
		end;
707
	};
708
}
709
710
Shoot2 = function(orgpos)
711
	local MouseLook = CFrame.new((orgpos + mouse.Hit.p) / 2, mouse.Hit.p)
712
	Effects["Sphere"].Create(BrickColor.new("Really red"), CFrame.new(orgpos), 5, 5, 5, 3, 3, 3, 0.1)
713
	table.insert(Effects, {
714
		MouseLook.lookVector,
715
		"Shoot2",
716
		50,
717
		orgpos,
718
		5,
719
		7,
720
		0,
721
		1,
722
		2
723
	})
724
end
725
726
function bulletstorm()
727
	attack = true
728
	CFuncs["Sound"].Create("rbxassetid://243053454", Torso, .1, 2.8) 
729
	for i = 0, 1, 0.025 do
730
		swait()
731
		PlayAnimationFromTable({
732
			CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
733
			CFrame.new(0, 1.4999907, 3.42726707e-007, 1, 0, 0, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
734
			CFrame.new(0.431798398, 0.400000006, -0.888215482, 0.939692736, 0.342019886, 0, 0, 0, -1, -0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
735
			CFrame.new(-0.559965074, 0.300000012, -0.828456283, 0.939692736, -0.342019886, 0, 0, 0, -1, 0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
736
			CFrame.new(0.599619746, -1.99127948, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
737
			CFrame.new(-0.599619746, -1.99127901, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
738
		}, .3, false)
739
		FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3)
740
Shoot2(Barrel.Position)
741
	end
742
743
	attack = false
744
end
745
746
function overload()
747
	attack = true
748
	CFuncs["Sound"].Create("rbxassetid://243053454", Torso, .1, 2.8)
749
Shoot2(LeftArm.Position)
750
Shoot2(RightArm.Position)
751
Shoot2(RightLeg.Position)
752
Shoot2(LeftLeg.Position)
753
Shoot2(Head.Position)
754
Shoot2(Torso.Position)
755
wait(0)
756
	attack = false
757
end
758
759
function overcharge()
760
        attack = true
761
        CFuncs["Sound"].Create("rbxassetid://813670691", Torso, .1, 2.8)
762
	for i = 0, 1, 0.15 do
763
		swait()
764
		PlayAnimationFromTable({
765
			CFrame.new(-0.0325974114, -4.05311584e-006, 0.110728048, 0.64278698, 0, -0.766044974, 0, 1, 0, 0.766044974, 0, 0.64278698),
766
			CFrame.new(0, 1.50000095, 0, 0.64278698, 0, 0.766044974, 0, 1, 0, -0.766044974, 0, 0.64278698),
767
			CFrame.new(1.10100186, 0.535800219, -0.637803555, 0.658456147, 0.673041463, 0.336824596, 0.280167073, 0.196174845, -0.939692438, -0.698528469, 0.713113427, -0.0593915135),
768
			CFrame.new(-1.62758517, 0.073027119, -0.378663093, 0.90510416, 0.321394593, -0.278374165, -0.392632991, 0.883023262, -0.25711751, 0.163174719, 0.342016995, 0.92541796),
769
			CFrame.new(0.644929826, -1.96549833, 0.164695352, 0.962249994, -0.148305506, 0.228211343, 0.0871559754, 0.962249756, 0.257835865, -0.257834762, -0.22821258, 0.938850582),
770
			CFrame.new(-0.750219464, -1.99537396, -0.240616962, 0.862504363, 0.0818999186, 0.499378443, -0.08583197, 0.99619472, -0.0151344473, -0.498717606, -0.0298091136, 0.866251826),
771
		}, .5, false)
772
	end
773
wait(3)
774
Shoot2(Barrel.Position)
775
Shoot2(Barrel.Position)
776
Shoot2(Handle.Position)
777
Shoot2(Handle.Position)
778
Shoot2(FakeHandle.Position)
779
Shoot2(FakeHandle.Position)
780
Shoot2(Barrel.Position)
781
Shoot2(Barrel.Position)
782
Shoot2(Handle.Position)
783
Shoot2(Handle.Position)
784
Shoot2(FakeHandle.Position)
785
Shoot2(FakeHandle.Position)
786
Shoot2(Barrel.Position)
787
Shoot2(Barrel.Position)
788
Shoot2(Handle.Position)
789
Shoot2(Handle.Position)
790
Shoot2(FakeHandle.Position)
791
Shoot2(FakeHandle.Position)
792
Shoot2(Barrel.Position)
793
Shoot2(Barrel.Position)
794
Shoot2(Handle.Position)
795
Shoot2(Handle.Position)
796
Shoot2(FakeHandle.Position)
797
Shoot2(FakeHandle.Position)
798
	for i = 0, 1, 0.15 do
799
		swait()
800
		PlayAnimationFromTable({
801
         CFrame.new(2.70828605e-006, -0.256154776, -0.071654655, 0.499999046, -1.78813579e-007, -0.866026044, 0.150384009, 0.984807789, 0.0868238211, 0.852869093, -0.173648283, 0.492402941),
802
         CFrame.new(4.34633694e-006, 1.49999607, 2.42484384e-006, 0.646143615, 0.0549410731, 0.761235893, -0.0851004422, 0.996372402, 0.000322267413, -0.758456767, -0.0649897307, 0.648474991),
803
         CFrame.new(1.86507177, 0.598104239, 0.183552518, -0.114682339, -0.981059372, -0.156110525, 0.981060445, -0.0871559381, -0.172987223, 0.156104773, -0.172992408, 0.9724738),
804
         CFrame.new(-1.52644157, 0.0874626189, -0.302744657, 0.95125103, 0.20658794, -0.229004204, -0.254887104, 0.944645047, -0.2065873, 0.173649222, 0.254886597, 0.951251268),
805
         CFrame.new(0.623469114, -1.90178788, 0.0298061967, 0.992532074, -0.0928985924, 0.079056859, 0.0757590532, 0.97739321, 0.197391063, -0.0956070125, -0.189927697, 0.977131963),
806
         CFrame.new(-0.786503196, -1.67652178, -0.389780819, 0.631277382, 0.179900557, 0.754403591, -0.0723632798, 0.982144117, -0.173656344, -0.772174001, 0.0550341941, 0.6330235),
807
		}, .35, false)
808
end
809
attack = false
810
end
811
812
function attackone()
813
	attack = true
814
	CFuncs["Sound"].Create("rbxassetid://243053454", Torso, .1, 2.8) 
815
	for i = 0, 1, 0.025 do
816
		swait()
817
		PlayAnimationFromTable({
818
			CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
819
			CFrame.new(0, 1.4999907, 3.42726707e-007, 1, 0, 0, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
820
			CFrame.new(0.431798398, 0.400000006, -0.888215482, 0.939692736, 0.342019886, 0, 0, 0, -1, -0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
821
			CFrame.new(-0.559965074, 0.300000012, -0.828456283, 0.939692736, -0.342019886, 0, 0, 0, -1, 0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
822
			CFrame.new(0.599619746, -1.99127948, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
823
			CFrame.new(-0.599619746, -1.99127901, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
824
		}, .3, false)
825
		FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3)
826
	end
827
	CFuncs["Sound"].Create("rbxassetid://203691837", Barrel, .01, .3)
828
	CFuncs["Sound"].Create("rbxassetid://203691885", Barrel, .01, .9)
829
	CFuncs["Sound"].Create("rbxassetid://184718741", Barrel, .05, .9)
830
	Shoot2(Barrel.Position)
831
	for i = 0, 1, 0.15 do
832
		swait()
833
		RootPart.Velocity = RootPart.CFrame.lookVector * -50
834
		PlayAnimationFromTable({
835
			CFrame.new(-0, -0.281125277, 0.157014638, 1, 0, -0, 0, 0.906307876, -0.422617942, 0, 0.422617942, 0.906307876) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
836
			CFrame.new(0, 1.4999938, 1.05202198e-005, 1, 0, -0, 0, 0.965925813, 0.258818924, -0, -0.258818924, 0.965925813) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
837
			CFrame.new(0.406597674, 0.817824185, -0.957423151, 0.939692974, 0.280165672, -0.196174338, -5.36441803e-007, -0.573575616, -0.819152534, -0.34201926, 0.769751906, -0.538984895) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
838
			CFrame.new(-0.506752789, 0.775180221, -0.974653006, 0.939692974, -0.280165732, 0.196174279, 5.36441803e-007, -0.573575556, -0.819152713, 0.34201926, 0.769752145, -0.538984716) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
839
			CFrame.new(0.566868722, -1.61683154, -0.13679418, 0.954536259, -0.174988821, -0.241328761, 0.172366679, 0.984509468, -0.0321052969, 0.243208498, -0.0109513998, 0.969912171) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
840
			CFrame.new(-0.545306504, -1.37044179, -0.679420352, 0.996202111, 0.0754783303, 0.0434113704, -0.0434117466, 0.862729907, -0.503797948, -0.0754781216, 0.49999994, 0.862729967) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
841
		}, .6, false)
842
		FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-30), math.rad(-20), math.rad(0)), 0.3)
843
	end
844
	for i = 0, 1, 0.15 do
845
		swait()
846
		RootPart.Velocity = RootPart.CFrame.lookVector * -100
847
		PlayAnimationFromTable({
848
			CFrame.new(-0, -0.795007467, 0.0831707418, 1, 0, -0, 0, 0.76604414, -0.642788053, 0, 0.642788053, 0.76604414) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
849
			CFrame.new(0, 1.49999774, 1.20103359e-005, 1, 0, -0, 0, 0.965925634, 0.258819878, -0, -0.258819878, 0.965925634) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
850
			CFrame.new(1.70605683, 1.21151328, -0.185158521, 0.893217862, -0.29338178, -0.340718448, -0.340719074, -0.936116338, -0.0871595442, -0.293381065, 0.193941653, -0.936116695) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
851
			CFrame.new(-1.69524968, 1.05172348, -0.252849877, 0.812758088, 0.493294626, 0.309975445, 0.582562625, -0.694268882, -0.422624737, 0.00672781467, 0.524071693, -0.851647615) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
852
			CFrame.new(0.689150453, -1.88461804, -0.0157705098, 0.954536736, -0.174989104, -0.241326213, 0.172367141, 0.984509468, -0.0321044922, 0.243205875, -0.0109517872, 0.969912887) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
853
			CFrame.new(-0.536899447, -1.34506011, -0.583059072, 0.99620223, 0.0226762109, 0.0840658173, -0.043412663, 0.966281295, 0.253803402, -0.0754759163, -0.256489068, 0.963595748) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
854
		}, .2, false)
855
		FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.3)
856
	end
857
	for i = 0, 1, 0.05 do
858
		swait()
859
		RootPart.Velocity = RootPart.CFrame.lookVector * -50
860
		PlayAnimationFromTable({
861
			CFrame.new(-0, -2.09708667, 0.108620644, 1, 0, -0, 0, 0.573575675, -0.819152594, 0, 0.819152594, 0.573575675) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
862
			CFrame.new(0, 1.53697455, -0.422635257, 1, 0, -0, 0, 0.766043842, 0.64278841, -0, -0.64278841, 0.766043842) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
863
			CFrame.new(1.57810855, 0.650130272, 0.33058399, 0.930655897, -0.284022599, -0.230674848, 0.352510452, 0.527023435, 0.773293555, -0.0980618149, -0.800985396, 0.590598404) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
864
			CFrame.new(-1.38994181, 0.87733829, 0.667137444, 0.963715255, 0.08906921, 0.251633942, -0.25866431, 0.0788001418, 0.962747812, 0.0659223944, -0.992903471, 0.0989798903) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
865
			CFrame.new(0.774198592, -1.52057803, -0.607582211, 0.954536974, -0.272207022, -0.121501081, 0.172365844, 0.83655864, -0.520057499, 0.243206039, 0.475471497, 0.845445395) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
866
			CFrame.new(-0.530096769, -1.05517173, -0.660005629, 0.99620223, 0.0226761587, 0.0840661526, -0.0434127897, 0.966280818, 0.253804684, -0.0754762068, -0.256490231, 0.96359539) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
867
		}, .3, false)
868
		FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-60), math.rad(0)), 0.3)
869
	end
870
	for i = 0, 1, 0.13 do
871
		swait()
872
		PlayAnimationFromTable({
873
			CFrame.new(-0, -1.01349139, -0.251608461, 1, 0, 0, 0, 0.707105339, 0.707108378, 0, -0.707108378, 0.707105339) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
874
			CFrame.new(0.0127754211, 1.44207788, 0.0749337673, 1, 0, 0, 0, 0.939691544, -0.342023343, 0, 0.342023343, 0.939691544) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
875
			CFrame.new(1.62296665, 0.191783041, -0.192457974, 0.930656254, -0.329096794, 0.159920022, 0.352511466, 0.923570275, -0.150843769, -0.098055169, 0.196757287, 0.975536823) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
876
			CFrame.new(-0.870643735, 0.71258086, -0.942903101, 0.18127799, -0.372358024, -0.910213113, -0.781424284, 0.507405519, -0.363202393, 0.597088516, 0.777103186, -0.19898814) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
877
			CFrame.new(0.214147568, -1.73508716, -0.0895051956, 0.924306214, 0.282332808, -0.256800473, -0.113861978, 0.846218646, 0.520528436, 0.364271581, -0.451887846, 0.814311981) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
878
			CFrame.new(-0.535767198, -0.599929333, -0.996632636, 0.996202111, 0.0754788443, 0.0434101112, -0.0434126705, 0.862728953, -0.503799856, -0.0754773915, 0.500001788, 0.862729192) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
879
		}, .3, false)
880
	end
881
	attack = false
882
end
883
884
--[[Attacks]]--
885
886
mouse.Button1Down:connect(function()
887
	if attack == false and attacktype == 1 then
888
		attackone()
889
	end
890
end)
891
892
mouse.KeyDown:connect(function(k)
893
	k = k:lower()
894
	if attack == false and k == 'q' then
895
	  bulletstorm()
896
	elseif attack == false and k == 'e' then
897
          overload()
898
        elseif attack == false and k == 'r' then
899
          overcharge()
900
      end
901
end)
902
903
while true do
904
	swait()
905
	for i, v in pairs(Character:GetChildren()) do
906
		if v:IsA("Part") then
907
			v.Material = "SmoothPlastic"
908
		elseif v:IsA("Accessory") then
909
			v:WaitForChild("Handle").Material = "SmoothPlastic"
910
		end
911
	end
912
	Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude 
913
	velocity = RootPart.Velocity.y
914
	sine = sine + change
915
	local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
916
	if equipped == true or equipped == false then
917
		if RootPart.Velocity.y > 1 and hit == nil then 
918
			Anim = "Jump"
919
			if attack == false then
920
				PlayAnimationFromTable({
921
					CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
922
					CFrame.new(0, 1.49221826, -0.044082582, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
923
					CFrame.new(1.66304386, 0.182627335, 0.00782334805, 0.883022726, -0.392632574, 0.257119894, 0.321392894, 0.905103981, 0.2783764, -0.342019886, -0.163176134, 0.925416708) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
924
					CFrame.new(-1.66570556, 0.224230319, 0.110721856, 0.903736115, 0.408218145, -0.128915116, -0.34750703, 0.875426054, 0.33595863, 0.25000003, -0.258819014, 0.933012724) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
925
					CFrame.new(0.499999166, -1.99999452, 4.76837158e-007, 0.984807849, -5.94328526e-007, -0.173648044, 0.0449439958, 0.965925872, 0.254886925, 0.167730987, -0.258819073, 0.951251388) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
926
					CFrame.new(-0.499999404, -1.51703107, -0.129407585, 0.965925753, 6.6929374e-007, 0.258819193, -0.0669879839, 0.965925813, 0.24999994, -0.24999994, -0.258819163, 0.933012724) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
927
				}, .3, false)
928
			end
929
		elseif RootPart.Velocity.y < -60 and hit == nil then 
930
			Anim = "Fall"
931
			if attack == false then
932
				PlayAnimationFromTable({
933
					CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
934
					CFrame.new(0, 1.49221873, -0.0440826714, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
935
					CFrame.new(1.76076102, 0.406842887, 0.0212866664, 0.695482016, -0.670965135, 0.257119834, 0.611573994, 0.74059701, 0.278376371, -0.377202988, -0.0363579579, 0.925416648) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
936
					CFrame.new(-1.68029141, 0.390803367, 0.155905366, 0.70961535, 0.692695498, -0.128914997, -0.625963271, 0.703777075, 0.335958213, 0.323444158, -0.157705069, 0.933012843) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
937
					CFrame.new(0.693307817, -1.96826017, -0.0605875254, 0.986561239, -0.127662987, -0.101976946, 0.137943029, 0.985269904, 0.101069227, 0.0875720233, -0.113777988, 0.989639223) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
938
					CFrame.new(-0.526552737, -1.81498528, -0.152177691, 0.965925574, 0.0449441113, 0.254888207, -0.066988036, 0.994663239, 0.0784704387, -0.250001162, -0.0928710476, 0.963781357) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
939
				}, .3, false)
940
			end
941
		elseif Torsovelocity < 1 and hit ~= nil then
942
			Anim = "Idle"
943
			if attack == false then
944
				change = 1
945
				PlayAnimationFromTable({
946
					CFrame.new(1.22602091e-006, -0.219458103, 1.46111324e-006, 0.76604414, 0, 0.642788053, 0, 1, 0, -0.642788053, 0, 0.76604414) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
947
					CFrame.new(0, 1.49999201, 0, 0.707106233, 0, -0.707107306, 0, 1, 0, 0.707107306, 0, 0.707106233) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
948
					CFrame.new(0.571566343, -0.0739164352, -0.639066696, 0.939692855, 0.340718329, -0.0298085809, -0.241844058, 0.600305915, -0.762328327, -0.241844922, 0.723563433, 0.646503866) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
949
					CFrame.new(-0.628383756, -0.12163578, -0.696761668, 0.939692736, -0.342020065, -5.06639481e-007, 0.196173996, 0.538984895, -0.819152653, 0.280166954, 0.769751549, 0.573575616) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
950
					CFrame.new(0.624118924, -1.79798961, 0.0678238794, 0.995454907, -0.0383867361, -0.0871553123, 0.0385330059, 0.999257326, -4.09960694e-006, 0.0870907605, -0.00335427374, 0.996194839) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
951
					CFrame.new(-0.53866595, -1.82180798, 0.00821807235, 0.977763176, 0.0281341001, 0.207816422, -0.0287620034, 0.999586344, -1.4934686e-007, -0.207730502, -0.00597707182, 0.978167892) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
952
				}, .3, false)
953
				FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3)
954
			end
955
		elseif Torsovelocity > 2 and hit ~= nil then
956
			Anim = "Walk"
957
			if attack == false then
958
				change = 3
959
				PlayAnimationFromTable({
960
					CFrame.new(0, -0.0240751095, -0.146390602, 1, 0, 0, 0, 0.965925872, 0.258818984, 0, -0.258818984, 0.965925872) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
961
					CFrame.new(0, 1.49999237, -1.81794167e-006, 1, 0, 0, 0, 0.984807789, -0.173647881, 0, 0.173647881, 0.984807789) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
962
					CFrame.new(0.172261134, 0.427689523, -1.09730911, 0.644483984, 0.748984814, -0.153825179, 0.413525045, -0.510645986, -0.753815472, -0.643146515, 0.422211438, -0.638827145) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
963
					CFrame.new(-1.1922102, 0.363029838, -0.448653877, 0.935289383, -0.110854559, -0.33607316, -0.341521561, -0.531564534, -0.775114357, -0.0927196145, 0.839732468, -0.535025835) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), 
964
					CFrame.new(.5, -1.85 - 0.5 * math.cos(sine / 8) / 2, 0 + 1.8 *  math.sin(sine / 8) / 2) * angles(math.rad(-50 *  math.sin(sine / 8)), math.rad(0), math.rad(0)),
965
					CFrame.new(-.5, -1.85 + 0.5 * math.cos(sine / 8) / 2, 0 - 1.8 * math.sin(sine / 8) / 2) * angles(math.rad(50 *  math.sin(sine / 8)), math.rad(0), math.rad(0)),
966
				}, .3, false)
967
				FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-30), math.rad(0)), 0.3)
968
			end
969
		end
970
	end
971
	if 0 < #Effects then
972
		for e = 1, #Effects do
973
			if Effects[e] ~= nil then
974
				local Thing = Effects[e]
975
				if Thing ~= nil then
976
					local Part = Thing[1]
977
					local Mode = Thing[2]
978
					local Delay = Thing[3]
979
					local IncX = Thing[4]
980
					local IncY = Thing[5]
981
					local IncZ = Thing[6]
982
					if Thing[2] == "Shoot" then
983
						local Look = Thing[1]
984
						local hit, pos = rayCast(Thing[4], Look, 15, Character)
985
						local mag = (Thing[4] - pos).magnitude
986
						Thing[9] = Thing[9] + 0.5
987
						Thing[5] = Thing[5] + 0.2
988
						Thing[6] = Thing[6] + 0.2
989
						Effects["Cylinder"].Create(BrickColor.new("Really red"), CFrame.new((Thing[4] + pos) / 2, pos) * angles(1.57, 0, 0), Thing[9], mag * 5, Thing[9], -0.2, 0, -0.2, 0.1)
990
						Thing[4] = Thing[4] + Look * 15
991
						Thing[3] = Thing[3] - 1
992
						if hit ~= nil then
993
							Thing[3] = 0
994
							ref = CFuncs["Part"].Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
995
							ref.Anchored = true
996
							ref.CFrame = CFrame.new(pos)
997
							Effects["Sphere"].Create(BrickColor.new("Bright red"), CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07)
998
							CFuncs["Sound"].Create("rbxassetid://315748949", ref, 1, 1.1)
999
							game:GetService("Debris"):AddItem(ref, 1)
1000
						end
1001
						if Thing[3] <= 0 then
1002
							table.remove(Effects, e)
1003
						end
1004
					end
1005
					do
1006
						if Thing[2] == "Shoot2" then
1007
							local Look = Thing[1]
1008
							local hit, pos = rayCast(Thing[4], Look, 3, Character)
1009
							local mag = (Thing[4] - pos).magnitude
1010
							Thing[9] = Thing[9] + 0.5
1011
							Thing[5] = Thing[5] + 0.2
1012
							Thing[6] = Thing[6] + 0.2
1013
							Effects["Sphere"].Create(BrickColor.new("Bright red"), CFrame.new((Thing[4] + pos) / 2, pos), 25, 25, 25, -5, -5, -5, 0.2)
1014
							Thing[4] = Thing[4] + Look * 3
1015
							Thing[3] = Thing[3] + 5
1016
							if hit ~= nil then
1017
								Thing[3] = 0
1018
								ref = CFuncs["Part"].Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
1019
								ref.Anchored = true
1020
								ref.CFrame = CFrame.new(pos)
1021
								Effects["Sphere"].Create(BrickColor.new("Really red"), CFrame.new(pos), 25, 25, 25, 5, 5, 5, 0.01)
1022
								Effects["Sphere"].Create(BrickColor.new("Bright red"), CFrame.new(pos), 10, 10, 10, 15, 15, 15, 0.01)
1023
								Effects["Block"].Create(BrickColor.new("Bright red"), CFrame.new(pos), 10, 10, 10, 15, 15, 15, 0.01, 1)
1024
								Effects["Wave"].Create(BrickColor.new("Bright red"), CFrame.new(pos), 2, 2, 2, 3, 3, 3, 0.01)
1025
								CFuncs["Sound"].Create("rbxassetid://203691837", ref, 1, .3)
1026
								CFuncs["Sound"].Create("rbxassetid://203691885", ref, 1, .9)
1027
								CFuncs["Sound"].Create("rbxassetid://184718741", ref, 1, .9)
1028
								local e = Instance.new("Explosion", ref)
1029
								e.Position = ref.Position
1030
								e.BlastRadius = 400
1031
								e.DestroyJointRadiusPercent = 20
1032
								e.Visible = false
1033
								e.ExplosionType = "CratersAndDebris"
1034
								game:GetService("Debris"):AddItem(ref, 10)
1035
							end
1036
							if Thing[3] <= 0 then
1037
								table.remove(Effects, e)
1038
							end
1039
						end
1040
						do
1041
							do
1042
								if Thing[2] ~= "Shoot" and Thing[2] ~= "DecreaseStat" and Thing[2] ~= "showDamage" and Thing[2] ~= "Shoot2" then
1043
									if Thing[1].Transparency <= 1 then
1044
										if Thing[2] == "Block1" then
1045
											Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1046
											Mesh = Thing[7]
1047
											Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1048
											Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1049
										else
1050
											if Thing[2] == "Block2" then
1051
												Thing[1].CFrame = Thing[1].CFrame
1052
												Mesh = Thing[7]
1053
												Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1054
												Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1055
											else
1056
												if Thing[2] == "Block3" then
1057
													Thing[8].C0 = CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) * Thing[9]
1058
													Mesh = Thing[7]
1059
													Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1060
													Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1061
												else
1062
													if Thing[2] == "Cylinder" then
1063
														Mesh = Thing[7]
1064
														Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1065
														Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1066
													else
1067
														if Thing[2] == "Cylinder2" then
1068
															Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, Thing[8], 0)
1069
															Mesh = Thing[7]
1070
															Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1071
															Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1072
														else
1073
															if Thing[2] == "Blood" then
1074
																Mesh = Thing[7]
1075
																Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0)
1076
																Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1077
																Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1078
															else
1079
																if Thing[2] == "Elec" then
1080
																	Mesh = Thing[10]
1081
																	Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
1082
																	Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1083
																else
1084
																	if Thing[2] == "Disappear" then
1085
																		Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1086
																	end
1087
																end
1088
															end
1089
														end
1090
													end
1091
												end
1092
											end
1093
										end
1094
									else
1095
										Part.Parent = nil
1096
										table.remove(Effects, e)
1097
									end
1098
								end
1099
							end
1100
						end
1101
					end
1102
				end
1103
			end
1104
		end
1105
	end
1106
end