View difference between Paste ID: Ft6n6TnU and Y8FrnuH3
SHOW: | | - or go back to the newest paste.
1
--https://github.com/Mokiros/roblox-FE-compatibility
2
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
3
local Player,game,owner = owner,game
4
local RealPlayer = Player
5
do
6
	print("FE Compatibility code V2 by Mokiros")
7
	local RealPlayer = RealPlayer
8
	script.Parent = RealPlayer.Character
9
10
	--Fake event to make stuff like Mouse.KeyDown work
11
	local Disconnect_Function = function(this)
12
		this[1].Functions[this[2]] = nil
13
	end
14
	local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
15
	local FakeEvent_Metatable = {__index={
16
		Connect = function(this,f)
17
			local i = tostring(math.random(0,10000))
18
			while this.Functions[i] do
19
				i = tostring(math.random(0,10000))
20
			end
21
			this.Functions[i] = f
22
			return setmetatable({this,i},Disconnect_Metatable)
23
		end
24
	}}
25
	FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
26
	local function fakeEvent()
27
		return setmetatable({Functions={}},FakeEvent_Metatable)
28
	end
29
30
	--Creating fake input objects with fake variables
31
    local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
32
    FakeMouse.keyUp = FakeMouse.KeyUp
33
    FakeMouse.keyDown = FakeMouse.KeyDown
34
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
35
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
36
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
37
	end}
38
	--Merged 2 functions into one by checking amount of arguments
39
	CAS.UnbindAction = CAS.BindAction
40
41
	--This function will trigger the events that have been :Connect()'ed
42
	local function TriggerEvent(self,ev,...)
43
		for _,f in pairs(self[ev].Functions) do
44
			f(...)
45
		end
46
	end
47
	FakeMouse.TriggerEvent = TriggerEvent
48
	UIS.TriggerEvent = TriggerEvent
49
50
	--Client communication
51
	local Event = Instance.new("RemoteEvent")
52
	Event.Name = "UserInput_Event"
53
	Event.OnServerEvent:Connect(function(plr,io)
54
	    if plr~=RealPlayer then return end
55
		FakeMouse.Target = io.Target
56
		FakeMouse.Hit = io.Hit
57
		if not io.isMouse then
58
			local b = io.UserInputState == Enum.UserInputState.Begin
59
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
60
				return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
61
			end
62
			if io.UserInputType == Enum.UserInputType.MouseButton2 then
63
				return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
64
			end
65
			for _,t in pairs(CAS.Actions) do
66
				for _,k in pairs(t.Keys) do
67
					if k==io.KeyCode then
68
						t.Function(t.Name,io.UserInputState,io)
69
					end
70
				end
71
			end
72
			FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
73
			UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
74
	    end
75
	end)
76
	Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
77
	local Mouse = owner:GetMouse()
78
	local UIS = game:GetService("UserInputService")
79
	local input = function(io,RobloxHandled)
80
		if RobloxHandled then return end
81
		--Since InputObject is a client-side instance, we create and pass table instead
82
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
83
	end
84
	UIS.InputBegan:Connect(input)
85
	UIS.InputEnded:Connect(input)
86
	local h,t
87
	--Give the server mouse data every second frame, but only if the values changed
88
	--If player is not moving their mouse, client won't fire events
89
	local HB = game:GetService("RunService").Heartbeat
90
	while true do
91
		if h~=Mouse.Hit or t~=Mouse.Target then
92
			h,t=Mouse.Hit,Mouse.Target
93
			Event:FireServer({isMouse=true,Target=t,Hit=h})
94
		end
95
		--Wait 2 frames
96
		for i=1,2 do
97
			HB:Wait()
98
		end
99
	end]==],script)
100
101
	----Sandboxed game object that allows the usage of client-side methods and services
102
	--Real game object
103
	local RealGame = game
104
105
	--Metatable for fake service
106
	local FakeService_Metatable = {
107
		__index = function(self,k)
108
			local s = rawget(self,"_RealService")
109
			if s then
110
				return typeof(s[k])=="function"
111
				and function(_,...)return s[k](s,...)end or s[k]
112
			end
113
		end,
114
		__newindex = function(self,k,v)
115
			local s = rawget(self,"_RealService")
116
			if s then s[k]=v end
117
		end
118
	}
119
	local function FakeService(t,RealService)
120
		t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
121
		return setmetatable(t,FakeService_Metatable)
122
	end
123
124
	--Fake game object
125
	local FakeGame = {
126
		GetService = function(self,s)
127
			return rawget(self,s) or RealGame:GetService(s)
128
		end,
129
		Players = FakeService({
130
			LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
131
		},"Players"),
132
		UserInputService = FakeService(UIS,"UserInputService"),
133
		ContextActionService = FakeService(CAS,"ContextActionService"),
134
		RunService = FakeService({
135
			_btrs = {},
136
			RenderStepped = RealGame:GetService("RunService").Heartbeat,
137
			BindToRenderStep = function(self,name,_,fun)
138
				self._btrs[name] = self.Heartbeat:Connect(fun)
139
			end,
140
			UnbindFromRenderStep = function(self,name)
141
				self._btrs[name]:Disconnect()
142
			end,
143
		},"RunService")
144
	}
145
	rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
146
	FakeGame.service = FakeGame.GetService
147
	FakeService(FakeGame,game)
148
	--Changing owner to fake player object to support owner:GetMouse()
149
	game,owner = FakeGame,FakeGame.Players.LocalPlayer
150
end
151
152
--------------------------------------------------------------------------------
153
--A Really Mad Guy with a Knife, a Tec-9 and a Sawed-Off! THOSE KIDS WILL PAY!--
154
--------------------------------------------------------------------------------
155
--By CKbackup (Sugarie Saffron)                               --
156
--YT: https://www.youtube.com/channel/UC8n9FFz7e6Zo13ob_5F9MJw--
157
--Discord: Sugarie Saffron#4705                               --
158
----------------------------------------------------------------
159
160
wait(1/60)
161
Effects = { }
162
local Player = game:service'Players'.localPlayer
163
local chara = Player.Character
164
local Humanoid = chara:FindFirstChildOfClass("Humanoid")
165
local Mouse = Player:GetMouse()
166
local LeftArm = chara["Left Arm"]
167
local RightArm = chara["Right Arm"]
168
local LeftLeg = chara["Left Leg"]
169
local RightLeg = chara["Right Leg"]
170
local Head = chara.Head
171
local Torso = chara.Torso
172
local Camera = workspace.CurrentCamera
173
local RootPart = chara.HumanoidRootPart
174
local RootJoint = RootPart.RootJoint
175
local attack = false
176
local Anim = 'Idle'
177
local attacktype = 1
178
local delays = false
179
local play = true
180
local targetted = nil
181
local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude 
182
local velocity = RootPart.Velocity.y
183
local sine = 0
184
local change = 1
185
local doe = 0
186
local Create = LoadLibrary("RbxUtility").Create
187
local debby = game:GetService("Debris")
188
Humanoid.WalkSpeed = 8
189
190
Humanoid.Animator.Parent = nil
191
chara.Animate.Parent = nil
192
193
local newMotor = function(part0, part1, c0, c1)
194
local w = Create('Motor'){
195
Parent = part0,
196
Part0 = part0,
197
Part1 = part1,
198
C0 = c0,
199
C1 = c1,
200
}
201
return w
202
end
203
204
function clerp(a, b, t)
205
return a:lerp(b, t)
206
end
207
208
RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
209
NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
210
211
local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0)) 
212
local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
213
local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
214
local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
215
RootJoint.C1 = CFrame.new(0, 0, 0)
216
RootJoint.C0 = CFrame.new(0, 0, 0)
217
Torso.Neck.C1 = CFrame.new(0, 0, 0)
218
Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
219
220
local rarmc1 = RW.C1
221
local larmc1 = LW.C1
222
local rlegc1 = RH.C1
223
local llegc1 = LH.C1
224
225
local resetc1 = false
226
227
function PlayAnimationFromTable(table, speed, bool)
228
RootJoint.C0 = clerp(RootJoint.C0, table[1], speed) 
229
Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed) 
230
RW.C0 = clerp(RW.C0, table[3], speed) 
231
LW.C0 = clerp(LW.C0, table[4], speed) 
232
RH.C0 = clerp(RH.C0, table[5], speed) 
233
LH.C0 = clerp(LH.C0, table[6], speed) 
234
if bool == true then
235
if resetc1 == false then
236
resetc1 = true
237
RootJoint.C1 = RootJoint.C1
238
Torso.Neck.C1 = Torso.Neck.C1
239
RW.C1 = rarmc1
240
LW.C1 = larmc1
241
RH.C1 = rlegc1
242
LH.C1 = llegc1
243
end
244
end
245
end
246
247
ArtificialHB = Instance.new("BindableEvent", script)
248
ArtificialHB.Name = "Heartbeat"
249
script:WaitForChild("Heartbeat")
250
frame = 0.03333333333333
251
tf = 0
252
allowframeloss = false
253
tossremainder = false
254
lastframe = tick()
255
script.Heartbeat:Fire()
256
game:GetService("RunService").Heartbeat:connect(function(s, p)
257
tf = tf + s
258
if tf >= frame then
259
if allowframeloss then
260
script.Heartbeat:Fire()
261
lastframe = tick()
262
else
263
for i = 1, math.floor(tf / frame) do
264
script.Heartbeat:Fire()
265
end
266
lastframe = tick()
267
end
268
if tossremainder then
269
tf = 0
270
else
271
tf = tf - frame * math.floor(tf / frame)
272
end
273
end
274
end)
275
function swait(num)
276
if num == 0 or num == nil then
277
ArtificialHB.Event:wait()
278
else
279
for i = 0, num do
280
ArtificialHB.Event:wait()
281
end
282
end
283
end
284
285
function RemoveOutlines(part)
286
part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
287
end
288
289
function so(id,par,pit,vol)
290
local sou = Instance.new("Sound", par or workspace)
291
if par == chara then
292
sou.Parent = chara.Torso
293
end
294
sou.Volume = vol
295
sou.Pitch = pit or 1
296
sou.SoundId = "rbxassetid://" .. id
297
sou.PlayOnRemove = true
298
sou:Destroy()
299
end
300
301
--This is just for builds--
302
New = function(Object, Parent, Name, Data)
303
local Object = Instance.new(Object)
304
for Index, Value in pairs(Data or {}) do
305
Object[Index] = Value
306
end
307
Object.Parent = Parent
308
Object.Name = Name
309
return Object
310
end
311
Naifu = New("Part",chara,"Naifu",{BrickColor = BrickColor.new("Dark stone grey"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000018, 0.200000003, 2.09999967),CFrame = CFrame.new(-46.1688423, 1.71234488, -46.3381615, -0.556669891, -0.663414657, 0.499999702, -0.766044796, 0.642787278, 7.3450633e-07, -0.321393907, -0.383021802, -0.866025567),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
312
Mesh = New("SpecialMesh",Naifu,"Mesh",{Scale = Vector3.new(0.5, 0.699999988, 0.5),VertexColor = Vector3.new(0.5, 0.5, 0.5),MeshId = "rbxassetid://54430772",TextureId = "rbxassetid://54430066",MeshType = Enum.MeshType.FileMesh,})
313
Weld = New("ManualWeld",Naifu,"Weld",{Part0 = Naifu,Part1 = LeftArm,C0 = CFrame.new(0, 0, 0, -0.556669891, -0.766044796, -0.321393907, -0.663414657, 0.642787278, -0.383021802, 0.499999702, 7.3450633e-07, -0.866025567),C1 = CFrame.new(-0.0408859253, -1.28767514, 0.650009155, -0.866025388, 0, -0.500000238, 0, 1, 0, 0.500000238, 0, -0.866025388),})
314
TEC9 = New("Part",chara,"TEC9",{BrickColor = BrickColor.new("Dark stone grey"),Transparency = 1,Transparency = 1,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000018, 1.20000005, 1.79999959),CFrame = CFrame.new(-56.3000031, 1.29999971, -46.6999931, -1, -1.00172471e-07, -1.61844298e-08, 5.16190539e-08, -8.19882651e-09, 1, -1.29974794e-07, 1, -4.67569983e-08),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
315
Mesh = New("SpecialMesh",TEC9,"Mesh",{Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012),MeshId = "rbxassetid://742046473",TextureId = "rbxassetid://742046691",MeshType = Enum.MeshType.FileMesh,})
316
Weld = New("ManualWeld",TEC9,"Weld",{Part0 = TEC9,Part1 = RightArm,C0 = CFrame.new(0, 0, 0, -1, 5.16190539e-08, -1.29974794e-07, -1.00172471e-07, -8.19882651e-09, 1, -1.61844298e-08, 1, -4.67569983e-08),C1 = CFrame.new(-0.0999984741, -1.70001817, -7.62939453e-06, -1, 0, 0, 0, 1, 0, 0, 0, -1),})
317
DBarrel = New("Part",chara,"DBarrel",{BrickColor = BrickColor.new("Dark stone grey"),Transparency = 1,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000018, 0.799999952, 2.09999967),CFrame = CFrame.new(-42.2655792, 3.62635231, -28.7166176, 0.99998486, 0.00129485771, -0.00535738515, -0.00132099993, 0.999987245, -0.0048789978, 0.00535099953, 0.00488600042, 0.999973774),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
318
Mesh = New("SpecialMesh",DBarrel,"Mesh",{Scale = Vector3.new(0.00700000022, 0.00700000022, 0.00700000022),MeshId = "rbxassetid://438826329",TextureId = "rbxassetid://438826340",MeshType = Enum.MeshType.FileMesh,})
319
Weld = New("ManualWeld",DBarrel,"Weld",{Part0 = DBarrel,Part1 = RightArm,C0 = CFrame.new(0, 0, 0, 0.99998486, -0.00132099993, 0.00535099953, 0.00129485771, 0.999987245, 0.00488600042, -0.00535738515, -0.0048789978, 0.999973774),C1 = CFrame.new(0.00952529907, -1.46699142, -0.100050688, -0.868691146, -0.00176300027, 0.495351046, -0.495353371, 0.00488599995, -0.868677914, -0.000888805604, -0.999986589, -0.00511773303),})
320
321
local att1 = Instance.new("Attachment",Naifu)
322
att1.Position = Vector3.new(0,.2,-.2)
323
local att2 = Instance.new("Attachment",Naifu)
324
att2.Position = Vector3.new(0,.1,1.5)
325
local tr1 = Instance.new("Trail",Naifu)
326
tr1.Color = ColorSequence.new(Color3.new(.5,.5,.5),Color3.new(1,1,1))
327
tr1.Transparency = NumberSequence.new(0,1)
328
tr1.Lifetime = .5
329
tr1.Enabled = false
330
tr1.Attachment0 = att1
331
tr1.Attachment1 = att2
332
333
if chara:FindFirstChild("FakeHeadM") then
334
local CorruptFace = New("Decal",chara.FakeHeadM.FakeHead,"Corrupt",{Texture = "rbxassetid://1000657824",})
335
chara.FakeHeadM.FakeHead.Normal:Destroy()
336
chara.FakeHeadM.FakeHead.Lood:Destroy()
337
chara.FakeHeadM.FakeHead.Rooped:Destroy()
338
chara.FaysG:Destroy()
339
chara.FakeHeadM.Ahoge:Destroy()
340
for i,v in pairs(chara:GetDescendants()) do
341
if v.Name == "SpecPart" or v.Name == "Ears1Part" then
342
v:Destroy()
343
elseif v.Name == "Ears2Part" then
344
v.Transparency = 0
345
end
346
end
347
end
348
for i, v in pairs(chara:children()) do
349
if v:IsA("Shirt") or v:IsA("Pants") then
350
v:Destroy()
351
elseif v.Name == "Chest" then
352
for a, b in pairs(v:children()) do
353
if b.Name ~= "Tail" then
354
b.Transparency = 1
355
end
356
end
357
end
358
end
359
local sh = Instance.new("Shirt",chara)
360
local pn = Instance.new("Pants",chara)
361
sh.ShirtTemplate = "rbxassetid://567462542"
362
pn.PantsTemplate = "rbxassetid://1521666087"
363
---------------------------
364
365
function rayCast(Position, Direction, Range, Ignore)
366
return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore) 
367
end 
368
369
function FindNearestTorso(Position, Distance, SinglePlayer)
370
if SinglePlayer then
371
return (SinglePlayer.Head.CFrame.p - Position).magnitude < Distance
372
end
373
local List = {}
374
for i, v in pairs(workspace:GetDescendants()) do
375
if v:IsA("Model") then
376
if v:findFirstChild("Head") then
377
if v ~= chara then
378
if (v.Head.Position - Position).magnitude <= Distance then
379
table.insert(List, v)
380
end 
381
end 
382
end 
383
end 
384
end
385
return List
386
end
387
388
EffectModel = Create("Model"){
389
Parent = chara,
390
Name = "Effects",
391
}
392
393
--Effect Functions--
394
Effects = {
395
396
Block = function(cf,partsize,meshstart,meshadd,matr,colour,spin,inverse,factor)
397
local p = Instance.new("Part",EffectModel)
398
p.BrickColor = BrickColor.new(colour)
399
p.Size = partsize
400
p.Anchored = true
401
p.CanCollide = false
402
p.Material = matr
403
p.CFrame = cf
404
if inverse == true then
405
p.Transparency = 1
406
else
407
p.Transparency = 0
408
end
409
local m = Instance.new("BlockMesh",p)
410
m.Scale = meshstart
411
coroutine.wrap(function()
412
for i=0,1,factor do
413
swait()
414
if inverse == true then
415
p.Transparency = 1-i
416
else
417
p.Transparency = i
418
end
419
m.Scale = m.Scale + meshadd
420
if spin == true then
421
p.CFrame = p.CFrame * CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
422
end
423
end
424
p:Destroy()
425
end)()
426
return p
427
end,
428
429
Sphere = function(cf,partsize,meshstart,meshadd,matr,colour,inverse,factor)
430
local p = Instance.new("Part",EffectModel)
431
p.BrickColor = BrickColor.new(colour)
432
p.Size = partsize
433
p.Anchored = true
434
p.CanCollide = false
435
p.Material = matr
436
p.CFrame = cf
437
if inverse == true then
438
p.Transparency = 1
439
else
440
p.Transparency = 0
441
end
442
local m = Instance.new("SpecialMesh",p)
443
m.MeshType = "Sphere"
444
m.Scale = meshstart
445
coroutine.wrap(function()
446
for i=0,1,factor do
447
swait()
448
if inverse == true then
449
p.Transparency = 1-i
450
else
451
p.Transparency = i
452
end
453
m.Scale = m.Scale + meshadd
454
end
455
p:Destroy()
456
end)()
457
return p
458
end,
459
460
Cylinder = function(cf,partsize,meshstart,meshadd,matr,colour,inverse,factor)
461
local p = Instance.new("Part",EffectModel)
462
p.BrickColor = BrickColor.new(colour)
463
p.Size = partsize
464
p.Anchored = true
465
p.CanCollide = false
466
p.Material = matr
467
p.CFrame = cf
468
if inverse == true then
469
p.Transparency = 1
470
else
471
p.Transparency = 0
472
end
473
local m = Instance.new("CylinderMesh",p)
474
m.Scale = meshstart
475
coroutine.wrap(function()
476
for i=0,1,factor do
477
swait()
478
if inverse == true then
479
p.Transparency = 1-i
480
else
481
p.Transparency = i
482
end
483
m.Scale = m.Scale + meshadd
484
end
485
p:Destroy()
486
end)()
487
return p
488
end,
489
490
Wave = function(cf,meshstart,meshadd,colour,spin,inverse,factor)
491
local p = Instance.new("Part",EffectModel)
492
p.BrickColor = BrickColor.new(colour)
493
p.Size = Vector3.new()
494
p.Anchored = true
495
p.CanCollide = false
496
p.CFrame = cf
497
if inverse == true then
498
p.Transparency = 1
499
else
500
p.Transparency = 0
501
end
502
local m = Instance.new("SpecialMesh",p)
503
m.MeshId = "rbxassetid://20329976"
504
m.Scale = meshstart
505
coroutine.wrap(function()
506
for i=0,1,factor do
507
swait()
508
if inverse == true then
509
p.Transparency = 1-i
510
else
511
p.Transparency = i
512
end
513
m.Scale = m.Scale + meshadd
514
p.CFrame = p.CFrame * CFrame.Angles(0,math.rad(spin),0)
515
end
516
p:Destroy()
517
end)()
518
return p
519
end,
520
521
Ring = function(cf,meshstart,meshadd,colour,inverse,factor)
522
local p = Instance.new("Part",EffectModel)
523
p.BrickColor = BrickColor.new(colour)
524
p.Size = Vector3.new()
525
p.Anchored = true
526
p.CanCollide = false
527
p.CFrame = cf
528
if inverse == true then
529
p.Transparency = 1
530
else
531
p.Transparency = 0
532
end
533
local m = Instance.new("SpecialMesh",p)
534
m.MeshId = "rbxassetid://3270017"
535
m.Scale = meshstart
536
coroutine.wrap(function()
537
for i=0,1,factor do
538
swait()
539
if inverse == true then
540
p.Transparency = 1-i
541
else
542
p.Transparency = i
543
end
544
m.Scale = m.Scale + meshadd
545
end
546
p:Destroy()
547
end)()
548
return p
549
end,
550
551
Meshed = function(cf,meshstart,meshadd,colour,meshid,textid,spin,inverse,factor)
552
local p = Instance.new("Part",EffectModel)
553
p.BrickColor = BrickColor.new(colour)
554
p.Size = Vector3.new()
555
p.Anchored = true
556
p.CanCollide = false
557
p.CFrame = cf
558
if inverse == true then
559
p.Transparency = 1
560
else
561
p.Transparency = 0
562
end
563
local m = Instance.new("SpecialMesh",p)
564
m.MeshId = meshid
565
m.TextureId = textid
566
m.Scale = meshstart
567
coroutine.wrap(function()
568
for i=0,1,factor do
569
swait()
570
if inverse == true then
571
p.Transparency = 1-i
572
else
573
p.Transparency = i
574
end
575
m.Scale = m.Scale + meshadd
576
p.CFrame = p.CFrame * CFrame.Angles(0,math.rad(spin),0)
577
end
578
p:Destroy()
579
end)()
580
return p
581
end,
582
583
Explode = function(cf,partsize,meshstart,meshadd,matr,colour,move,inverse,factor)
584
local p = Instance.new("Part",EffectModel)
585
p.BrickColor = BrickColor.new(colour)
586
p.Size = partsize
587
p.Anchored = true
588
p.CanCollide = false
589
p.Material = matr
590
p.CFrame = cf * CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
591
if inverse == true then
592
p.Transparency = 1
593
else
594
p.Transparency = 0
595
end
596
local m = Instance.new("SpecialMesh",p)
597
m.MeshType = "Sphere"
598
m.Scale = meshstart
599
coroutine.wrap(function()
600
for i=0,1,factor do
601
swait()
602
if inverse == true then
603
p.Transparency = 1-i
604
else
605
p.Transparency = i
606
end
607
m.Scale = m.Scale + meshadd
608
p.CFrame = p.CFrame * CFrame.new(0,move,0)
609
end
610
p:Destroy()
611
end)()
612
return p
613
end,
614
615
}
616
617
function chatfunc(text)
618
coroutine.wrap(function()
619
if chara:FindFirstChild("TalkingBillBoard")~= nil then
620
chara:FindFirstChild("TalkingBillBoard"):destroy()
621
end
622
local naeeym2 = Instance.new("BillboardGui",chara)
623
naeeym2.Size = UDim2.new(0,100,0,40)
624
naeeym2.StudsOffset = Vector3.new(0,3,0)
625
naeeym2.Adornee = chara.Head
626
naeeym2.Name = "BLABLABLA"
627
local tecks2 = Instance.new("TextLabel",naeeym2)
628
tecks2.BackgroundTransparency = 1
629
tecks2.BorderSizePixel = 0
630
tecks2.Text = ""
631
tecks2.Font = "Antique"
632
tecks2.FontSize = "Size24"
633
tecks2.TextStrokeTransparency = 0
634
tecks2.TextColor3 = Color3.new(0,0,0)
635
tecks2.TextStrokeColor3 = Color3.new(1,0,0)
636
tecks2.Size = UDim2.new(1,0,0.5,0)coroutine.wrap(function()
637
while tecks2 ~= nil do
638
swait()
639
tecks2.Position = UDim2.new(0,math.random(-3,3),0,math.random(-3,3))
640
end
641
end)()
642
for i = 1,string.len(text),1 do
643
tecks2.Text = string.sub(text,1,i)
644
swait()
645
end
646
swait(30)
647
for i = 1, 5 do
648
swait()
649
tecks2.Position = tecks2.Position - UDim2.new(0,0,.05,0)
650
tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.2
651
tecks2.TextTransparency = tecks2.TextTransparency + .2
652
end
653
naeeym2:Destroy()
654
end)()
655
end
656
657
function GetDudesTorso(c)
658
local torsy = (c:findFirstChild("Torso") or c:findFirstChild("UpperTorso"))
659
if torsy ~= nil then
660
return torsy
661
end
662
end
663
664
function BodyVel(part,faws)
665
local bodyvel = Instance.new("BodyVelocity",part)
666
local pep = 10000000
667
bodyvel.P = pep
668
bodyvel.MaxForce = Vector3.new(pep,pep,pep)
669
bodyvel.Velocity = faws
670
debby:AddItem(bodyvel,.2)
671
end
672
673
function Dmg(dude,dmg,env,faws,trip,efftyp,toim)
674
if dude and dude ~= chara and dude.Name ~= "CKbackup" and dude.Name ~= "Nebula_Zorua" and dude.Name ~= "Salvo_Starly" then
675
if dude:FindFirstChild("HITO") then return end
676
local debounce = Instance.new("BoolValue",dude)
677
debounce.Name = "HITO"
678
debby:AddItem(debounce,toim)
679
local hum = dude:FindFirstChildOfClass("Humanoid")
680
local dam = dmg+math.random(-env,env)
681
local teksu = "-"..dam
682
if hum then
683
local finhel = hum.Health - dam
684
if finhel <= 0 and dude:FindFirstChild("DEATHED")==nil then
685
Instance.new("BoolValue",dude).Name = "DEATHED"
686
local soaa = Instance.new("Sound",dude.Head)
687
local cho = math.random(1,5)
688
if cho == 1 then
689
soaa.SoundId = "rbxassetid://111896685"
690
elseif cho == 2 then
691
soaa.SoundId = "rbxassetid://535528169"
692
elseif cho == 3 then
693
soaa.SoundId = "rbxassetid://1080363252"
694
elseif cho == 4 then
695
soaa.SoundId = "rbxassetid://147758746"
696
elseif cho == 5 then
697
soaa.SoundId = "rbxassetid://626777433"
698
soaa.Volume = .2
699
soaa.TimePosition = 1
700
end
701
game:service'Debris':AddItem(soaa,6)
702
soaa:Play()
703
end
704
hum.Health = hum.Health - dam
705
end
706
coroutine.wrap(function()
707
local naeeym2 = Instance.new("BillboardGui",dude)
708
naeeym2.Size = UDim2.new(0,100,0,40)
709
naeeym2.StudsOffset = Vector3.new(0,3,0)
710
naeeym2.Adornee = dude:FindFirstChild("Head")
711
naeeym2.Name = "TalkingBillBoard"
712
local tecks2 = Instance.new("TextLabel",naeeym2)
713
tecks2.BackgroundTransparency = 1
714
tecks2.BorderSizePixel = 0
715
tecks2.Text = teksu
716
tecks2.Font = "Antique"
717
tecks2.TextSize = 24
718
tecks2.TextStrokeTransparency = 0
719
tecks2.TextColor3 = Color3.new(0,0,0)
720
tecks2.TextStrokeColor3 = Color3.new(1,0,0)
721
tecks2.Size = UDim2.new(1,0,0.5,0)
722
swait(10)
723
for i = 0,1,.05 do
724
swait()
725
tecks2.Position = tecks2.Position - UDim2.new(0,0,.005,0)
726
tecks2.TextStrokeTransparency = i
727
tecks2.TextTransparency = i
728
end
729
naeeym2:Destroy()
730
end)()
731
local torsy = GetDudesTorso(dude)
732
if torsy then
733
for i=1,dam/5 do
734
local blp = Instance.new("Part",EffectModel)
735
blp.Size = Vector3.new(.3,.3,.3)
736
blp.BrickColor = BrickColor.new("Crimson")
737
blp.CFrame = torsy.CFrame
738
blp.Velocity = torsy.CFrame.lookVector*5
739
coroutine.wrap(function()
740
swait(10)
741
blp.Orientation = Vector3.new(0,blp.Orientation.y,0)
742
for i=0,1,.1  do
743
swait()
744
blp.Transparency = i
745
blp.Size = blp.Size + Vector3.new(.02,-.02,.02)
746
end
747
blp:Destroy()
748
end)()
749
end
750
if efftyp == "Blunt" then
751
puncheff(torsy)
752
elseif efftyp == "Sharp" then
753
slasheff(torsy)
754
end
755
if faws ~= 0 then
756
BodyVel(torsy,faws)
757
end
758
if trip == true then
759
torsy.CFrame = torsy.CFrame * CFrame.Angles(math.rad(-90),0,0)
760
torsy.RotVelocity = Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
761
end
762
end
763
end
764
end
765
766
function MagnitudeDmg(par,magni,dmg,env,faws,trip,efftyp,toim)
767
for _, c in pairs(workspace:GetDescendants()) do
768
local hum = c:FindFirstChildOfClass("Humanoid")
769
if hum ~= nil and c:FindFirstChild("IsTeamMateOfCK")==nil and c.Name ~= "CKbackup" and c.Name ~= "Nebula_Zorua" and c.Name ~= "Salvo_Starly" then
770
local head = GetDudesTorso(c)
771
if head ~= nil then
772
local targ = head.Position - par.Position
773
local mag = targ.magnitude
774
if magni >= mag and c ~= chara then
775
Dmg(c,dmg,env,faws,trip,efftyp,toim)
776
end
777
end
778
end
779
end
780
end
781
782
function puncheff(par)
783
if par.Parent:FindFirstChild("DebounceHit")==nil then
784
so(386946017,par,math.random(80,120)/100,1)
785
Effects.Sphere(par.CFrame,Vector3.new(1,1,1),Vector3.new(1,1,1),Vector3.new(2,2,2),"Neon","White",false,.1)
786
end
787
end
788
789
function slasheff(par)
790
if par.Parent:FindFirstChild("DebounceHit")==nil then
791
local cho = math.random(1,3)
792
if cho == 1 then
793
so(444667824,par,1,1)
794
elseif cho == 2 then
795
so(444667844,par,1,1)
796
elseif cho == 3 then
797
so(444667859,par,1,1)
798
end
799
--function(cf,partsize,meshstart,meshadd,matr,colour,factor)
800
Effects.Sphere(par.CFrame*CFrame.Angles(math.random(0,360),math.random(0,360),math.random(0,360)),Vector3.new(.5,.5,.5),Vector3.new(1,0,1),Vector3.new(0,5,0),"Neon","Really red",false,.1)
801
end
802
end
803
804
local mus = Instance.new("Sound",Head)
805
mus.Name = "mus"
806
mus.SoundId = "rbxassetid://581195737"
807
mus.Looped = true
808
mus.Volume = 1
809
mus:Play()
810
811
coroutine.wrap(function()
812
chatfunc("I'm tired of all of this crap..")
813
swait(90)
814
chatfunc("Now the day of reckoning has begun..")
815
swait(90)
816
chatfunc("This shall be my finest hour..")
817
swait(90)
818
chatfunc("ICH BIN GOTT! BERZERKER!")
819
end)()
820
821
function smek()
822
attack = true
823
Humanoid.WalkSpeed = 16
824
for i=0,1,.1 do
825
swait()
826
PlayAnimationFromTable({		
827
CFrame.new(0.0506498702, -5.11459177e-07, -0.0829713419, 0.76604414, 0, 0.642788053, -2.68192082e-07, 1.00000834, 3.19618522e-07, -0.642793417, -4.17232513e-07, 0.766050518),
828
CFrame.new(0.0446723551, 1.46553934, 0.0211830139, 0.735023618, 0.242944986, -0.633023083, -0.171009988, 0.969846427, 0.173647657, 0.656122029, -0.0193818808, 0.754406095),
829
CFrame.new(1.40946591, -0.0135071278, 0, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012),
830
CFrame.new(-1.55299187, 0.416839302, -0.457236975, 0.68952775, 0.492403448, -0.53112185, -0.633021951, 0.766044736, -0.11161866, 0.35190171, 0.413175911, 0.839911342),
831
CFrame.new(0.499983132, -2.00001597, -9.13441181e-06, 0.76604414, 0, -0.642788053, 0, 1, 0, 0.642788053, 0, 0.76604414),
832
CFrame.new(-0.500005186, -2.00001597, -1.22189522e-06, 0.98480773, 0, 0.173648447, 0, 1, 0, -0.173648447, 0, 0.98480773),
833
}, .3, false)
834
end
835
Humanoid.WalkSpeed = 2
836
tr1.Enabled = true
837
so(536642316,Naifu,1,1)
838
for i=0,1.4,.2 do
839
swait()
840
PlayAnimationFromTable({		
841
CFrame.new(0.0327370502, 1.24810251e-09, 0.00299140904, 0.64278698, 0, -0.766044974, 3.19616191e-07, 1, 2.68189382e-07, 0.766044974, -4.17229018e-07, 0.64278698),
842
CFrame.new(-0.0331632644, 1.46557713, -0.11364907, 0.656121135, -0.0193833038, 0.754413188, -0.171011418, 0.969854534, 0.173649102, -0.735024333, -0.24294585, 0.633027315),
843
CFrame.new(1.24921072, -0.104290992, 0.29409039, 0.93969059, 0.26200676, 0.21985054, -0.342026025, 0.719844162, 0.604022086, -2.68220901e-07, -0.642788291, 0.766043901),
844
CFrame.new(-0.663761616, 0.985711455, -0.487553686, 0.383021712, -0.64278698, -0.663414836, -0.866025984, 0, -0.499998987, 0.321392834, 0.766044974, -0.556670249),
845
CFrame.new(0.500005841, -2.00003386, -4.52250242e-06, 0.984807551, 0, -0.173649341, 0, 1, 0, 0.173649341, 0, 0.984807551),
846
CFrame.new(-0.499993563, -2.00003386, -1.44541264e-06, 0.64278698, 0, 0.766044974, 0, 1, 0, -0.766044974, 0, 0.64278698),
847
}, .5, false)
848
MagnitudeDmg(Naifu,3,40,3,RootPart.CFrame.lookVector*5,false,"Sharp",.5)
849
end
850
swait(5)
851
Humanoid.WalkSpeed = 8
852
tr1.Enabled = false
853
attack = false
854
end
855
856
zhold = true
857
function shoot()
858
attack = true
859
so(169799883,TEC9,1,1)
860
for i=0,1,.1 do
861
swait()
862
PlayAnimationFromTable({		
863
CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
864
CFrame.new(0.0838357508, 1.42719412, -0.166348219, 0.857789159, 0.297403604, -0.419224113, -0.141315028, 0.920631945, 0.363959879, 0.49419412, -0.252958179, 0.83173573),
865
CFrame.new(1.22406256, -0.130654663, 0.277106255, 0.941511214, 0.33170712, 0.0593906641, -0.33170709, 0.881204426, 0.336822212, 0.0593910143, -0.336822152, 0.939693391),
866
CFrame.new(-1.43159902, 0, 0.187939197, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
867
CFrame.new(0.499998897, -1.99999988, -1.49011612e-06, 0.939692736, 0, -0.342019886, 0, 1, 0, 0.342019916, 0, 0.939692736),
868
CFrame.new(-0.500001848, -1.99999988, 1.62422657e-06, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
869
}, .3, false)
870
end
871
Humanoid.WalkSpeed = 2
872
local ref = Instance.new("Part",chara)
873
ref.Size = Vector3.new(0,0,0)
874
ref.Anchored = true
875
ref.CanCollide = false
876
ref.Transparency = 1
877
TEC9.Transparency = 0
878
for i=0,1,.1 do
879
swait()
880
PlayAnimationFromTable({		
881
CFrame.new(-0.0438226089, 0, -0.0217384323, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
882
CFrame.new(0.0674266815, 1.48262143, -0.0571227223, 0.939692736, 0.0593910702, -0.33682391, 0, 0.984807849, 0.173647985, 0.342019886, -0.163175747, 0.925416768),
883
CFrame.new(1.62663007, 0.722141325, -0.273156077, 0.883022428, -0.342019916, 0.321393609, 0.342019916, 0, -0.939692736, 0.321393609, 0.939692736, 0.116977602),
884
CFrame.new(-1.34998989, 0, 0.259806901, 0.866024911, 0, 0.500000954, 0, 1, 0, -0.500000954, 0, 0.866024852),
885
CFrame.new(0.499997795, -1.99999917, -1.51991844e-06, 0.866025686, 0, -0.499999642, 0, 1, 0, 0.499999642, 0, 0.866025686),
886
CFrame.new(-0.500000119, -1.99999917, 1.50501728e-06, 0.939692438, 0, 0.342020929, 0, 1, 0, -0.342020959, 0, 0.939692438),
887
}, .3, false)
888
end
889
swait(5)
890
local shots = 20
891
repeat
892
so(745308042,TEC9,1,1)
893
ref.CFrame = Mouse.Hit
894
MagnitudeDmg(ref,2,12,2,RootPart.CFrame.lookVector*3,false,"Shot",.1)
895
local hitpt = Instance.new("Part",EffectModel)
896
hitpt.Size = Vector3.new(0,0,.3)
897
hitpt.CFrame = TEC9.CFrame * CFrame.new(0,.465,.1)-- * CFrame.Angles(math.rad(90),0,0)
898
hitpt.Velocity = RootPart.CFrame.rightVector*10+Vector3.new(0,5,0)
899
local hitm = Instance.new("SpecialMesh",hitpt)
900
hitm.MeshId = "rbxassetid://94295100"
901
hitm.TextureId = "rbxassetid://94287792"
902
hitm.Scale = Vector3.new(3,3,3.5)
903
coroutine.wrap(function()
904
swait(30)
905
for i = 0,1,.1 do
906
swait()
907
hitpt.Transparency = i
908
end
909
hitpt:Destroy()
910
end)()
911
Effects.Block(TEC9.CFrame*CFrame.new(-.05,.465,-.9),Vector3.new(1,1,1),Vector3.new(),Vector3.new(.1,.1,.1),"Neon","Bright yellow",true,false,.1)
912
shots = shots - 1
913
for i=0,1 do
914
swait()
915
PlayAnimationFromTable({		
916
CFrame.new(-0.0438226089, 0, -0.0217384323, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
917
CFrame.new(0.0674266815, 1.48262143, -0.0571227223, 0.939692736, 0.0593910702, -0.33682391, 0, 0.984807849, 0.173647985, 0.342019886, -0.163175747, 0.925416768),
918
CFrame.new(1.62663007, 0.722141325, -0.273156077, 0.883022428, -0.342019916, 0.321393609, 0.342019916, 0, -0.939692736, 0.321393609, 0.939692736, 0.116977602)*CFrame.Angles(math.rad(math.random(-5,5)),math.rad(math.random(-5,5)),math.rad(math.random(-5,5))),
919
CFrame.new(-1.34998989, 0, 0.259806901, 0.866024911, 0, 0.500000954, 0, 1, 0, -0.500000954, 0, 0.866024852),
920
CFrame.new(0.499997795, -1.99999917, -1.51991844e-06, 0.866025686, 0, -0.499999642, 0, 1, 0, 0.499999642, 0, 0.866025686),
921
CFrame.new(-0.500000119, -1.99999917, 1.50501728e-06, 0.939692438, 0, 0.342020929, 0, 1, 0, -0.342020959, 0, 0.939692438),
922
}, .3, false)
923
end
924
until zhold == false or shots == 0
925
swait(5)
926
ref:Destroy()
927
for i=0,1,.25 do
928
swait()
929
PlayAnimationFromTable({		
930
CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
931
CFrame.new(0, 1.44842434, -0.192443371, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736),
932
CFrame.new(1.39502811, 0.908103704, 0.515749812, -0.213331953, -0.84539932, -0.489683062, 0.875778735, 0.056671422, -0.479374528, 0.433013916, -0.531119943, 0.728292942),
933
CFrame.new(-1.5091548, 0.323206276, -0.384231716, 0.750000238, 0.433013409, -0.499999136, -0.500000179, 0.866025388, 6.10661004e-07, 0.433012158, 0.249999225, 0.866025925),
934
CFrame.new(0.50000149, -1.99999857, -2.11596489e-06, 0.984807849, 0, -0.173647985, 0, 1, 0, 0.173647985, 0, 0.984807849),
935
CFrame.new(-0.500000834, -1.99999857, 1.63912773e-06, 0.984807849, 0, 0.173647985, 0, 1, 0, -0.173647985, 0, 0.984807849),
936
}, .4, false)
937
end
938
so(1159825801,TEC9,1,1)
939
swait(15)
940
so(211134014,TEC9,1,1)
941
for i=0,1,.1 do
942
swait()
943
PlayAnimationFromTable({		
944
CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
945
CFrame.new(0.0838357508, 1.42719412, -0.166348219, 0.857789159, 0.297403604, -0.419224113, -0.141315028, 0.920631945, 0.363959879, 0.49419412, -0.252958179, 0.83173573),
946
CFrame.new(1.22406256, -0.130654663, 0.277106255, 0.941511214, 0.33170712, 0.0593906641, -0.33170709, 0.881204426, 0.336822212, 0.0593910143, -0.336822152, 0.939693391),
947
CFrame.new(-1.43159902, 0, 0.187939197, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
948
CFrame.new(0.499998897, -1.99999988, -1.49011612e-06, 0.939692736, 0, -0.342019886, 0, 1, 0, 0.342019916, 0, 0.939692736),
949
CFrame.new(-0.500001848, -1.99999988, 1.62422657e-06, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
950
}, .3, false)
951
end
952
TEC9.Transparency = 1
953
Humanoid.WalkSpeed = 8
954
attack = false
955
end
956
957
function dbshoot()
958
attack = true
959
so(169799883,DBarrel,1,1)
960
for i=0,1,.1 do
961
swait()
962
PlayAnimationFromTable({		
963
CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
964
CFrame.new(0.0838357508, 1.42719412, -0.166348219, 0.857789159, 0.297403604, -0.419224113, -0.141315028, 0.920631945, 0.363959879, 0.49419412, -0.252958179, 0.83173573),
965
CFrame.new(1.22406256, -0.130654663, 0.277106255, 0.941511214, 0.33170712, 0.0593906641, -0.33170709, 0.881204426, 0.336822212, 0.0593910143, -0.336822152, 0.939693391),
966
CFrame.new(-1.43159902, 0, 0.187939197, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
967
CFrame.new(0.499998897, -1.99999988, -1.49011612e-06, 0.939692736, 0, -0.342019886, 0, 1, 0, 0.342019916, 0, 0.939692736),
968
CFrame.new(-0.500001848, -1.99999988, 1.62422657e-06, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
969
}, .3, false)
970
end
971
Humanoid.WalkSpeed = 2
972
DBarrel.Transparency = 0
973
for i=0,1,.1 do
974
swait()
975
PlayAnimationFromTable({		
976
CFrame.new(0, 0.0149096567, 0.133909225, 1, 0, 0, 0, 0.984807849, -0.173647985, 0, 0.173647985, 0.984807849),
977
CFrame.new(0, 1.43158329, -0.187937319, 1, 0, 0, 0, 0.939692855, 0.342019796, 0, -0.342019796, 0.939692855),
978
CFrame.new(1.0840646, 0.399937928, -0.718070745, 0.868691146, 0.495353371, 0.000888805604, -0.0877529308, 0.15565595, -0.983905911, -0.487519473, 0.854632378, 0.17868565),
979
CFrame.new(-1.35562694, -0.0255649146, 0.396688521, 0.939692378, -0.116977789, 0.321394831, -2.60770321e-07, 0.939692855, 0.342019856, -0.342021167, -0.321393549, 0.883021951),
980
CFrame.new(0.499995321, -2.00755072, 0.218008161, 0.939692736, 0, -0.342019886, 0.0593910702, 0.984807849, 0.163175747, 0.33682391, -0.173647985, 0.925416768),
981
CFrame.new(-0.499996126, -2.00755, 0.218011439, 0.939692736, 0, 0.342019886, -0.0593910702, 0.984807849, 0.163175747, -0.33682391, -0.173647985, 0.925416768),
982
}, .3, false)
983
end
984
swait(5)
985
so(132455829,DBarrel,1,1)
986
local ref = Instance.new("Part",chara)
987
ref.Size = Vector3.new(0,0,0)
988
ref.Anchored = true
989
ref.CanCollide = false
990
ref.Transparency = 1
991
ref.CFrame = RootPart.CFrame*CFrame.new(0,0,-6)
992
MagnitudeDmg(ref,4,100,0,RootPart.CFrame.lookVector*12,true,"Shot",.1)
993
Effects.Block(DBarrel.CFrame*CFrame.new(.1,.3,1.1),Vector3.new(1,1,1),Vector3.new(),Vector3.new(.1,.1,.1),"Neon","Bright yellow",true,false,.05)
994
Effects.Block(DBarrel.CFrame*CFrame.new(-.1,.3,1.1),Vector3.new(1,1,1),Vector3.new(),Vector3.new(.1,.1,.1),"Neon","Bright yellow",true,false,.05)
995
ref:Destroy()
996
for i=0,1,.1 do
997
swait()
998
PlayAnimationFromTable({		
999
CFrame.new(0, 0.0149102025, 0.133909985, 1, 0, 0, 0, 0.984812796, -0.173648849, 0, 0.173648849, 0.984812796),
1000
CFrame.new(0, 1.43158948, 0.0120660895, 1, 0, 0, 0, 1.00000262, -1.1920929e-07, 0, 1.1920929e-07, 1.00000262),
1001
CFrame.new(1.20370889, 0.765974879, -0.570772648, 0.868689418, 0.319091678, -0.378892303, -0.0877506882, -0.653664529, -0.751683295, -0.48752436, 0.686227262, -0.539830863),
1002
CFrame.new(-1.49794042, 0.21531868, 0.355185598, 0.923031092, 0.211469814, 0.321394384, -0.321394086, 0.883024752, 0.342021078, -0.211472049, -0.418990374, 0.883024335),
1003
CFrame.new(0.499998927, -2.00757003, 0.218012124, 0.939692736, 0, -0.342019886, 0.0593913682, 0.984812796, 0.163176581, 0.336825609, -0.173648849, 0.925421476),
1004
CFrame.new(-0.500004649, -2.00756979, 0.218013197, 0.939692736, 0, 0.342019886, -0.0593913682, 0.984812796, 0.163176581, -0.336825609, -0.173648849, 0.925421476),
1005
}, .3, false)
1006
end
1007
swait(10)
1008
for i=0,1,.25 do
1009
swait()
1010
PlayAnimationFromTable({		
1011
CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
1012
CFrame.new(0, 1.44842434, -0.192443371, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736),
1013
CFrame.new(1.39502811, 0.908103704, 0.515749812, -0.213331953, -0.84539932, -0.489683062, 0.875778735, 0.056671422, -0.479374528, 0.433013916, -0.531119943, 0.728292942),
1014
CFrame.new(-1.5091548, 0.323206276, -0.384231716, 0.750000238, 0.433013409, -0.499999136, -0.500000179, 0.866025388, 6.10661004e-07, 0.433012158, 0.249999225, 0.866025925),
1015
CFrame.new(0.50000149, -1.99999857, -2.11596489e-06, 0.984807849, 0, -0.173647985, 0, 1, 0, 0.173647985, 0, 0.984807849),
1016
CFrame.new(-0.500000834, -1.99999857, 1.63912773e-06, 0.984807849, 0, 0.173647985, 0, 1, 0, -0.173647985, 0, 0.984807849),
1017
}, .4, false)
1018
end
1019
for i=1,2 do
1020
so(1159825801,DBarrel,1,1)
1021
local hitpt = Instance.new("Part",EffectModel)
1022
hitpt.Size = Vector3.new(0,0,.3)
1023
hitpt.CFrame = TEC9.CFrame * CFrame.Angles(math.rad(90),0,0)
1024
hitpt.Velocity = RootPart.CFrame.rightVector*10+Vector3.new(0,5,0)
1025
local hitm = Instance.new("SpecialMesh",hitpt)
1026
hitm.MeshId = "rbxassetid://94248124"
1027
hitm.TextureId = "rbxassetid://94219470"
1028
hitm.Scale = Vector3.new(1.2,1.2,1.2)
1029
coroutine.wrap(function()
1030
swait(30)
1031
for i = 0,1,.1 do
1032
swait()
1033
hitpt.Transparency = i
1034
end
1035
hitpt:Destroy()
1036
end)()
1037
swait()
1038
end
1039
swait(15)
1040
so(211134014,DBarrel,1,1)
1041
for i=0,1,.1 do
1042
swait()
1043
PlayAnimationFromTable({		
1044
CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
1045
CFrame.new(0.0838357508, 1.42719412, -0.166348219, 0.857789159, 0.297403604, -0.419224113, -0.141315028, 0.920631945, 0.363959879, 0.49419412, -0.252958179, 0.83173573),
1046
CFrame.new(1.22406256, -0.130654663, 0.277106255, 0.941511214, 0.33170712, 0.0593906641, -0.33170709, 0.881204426, 0.336822212, 0.0593910143, -0.336822152, 0.939693391),
1047
CFrame.new(-1.43159902, 0, 0.187939197, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
1048
CFrame.new(0.499998897, -1.99999988, -1.49011612e-06, 0.939692736, 0, -0.342019886, 0, 1, 0, 0.342019916, 0, 0.939692736),
1049
CFrame.new(-0.500001848, -1.99999988, 1.62422657e-06, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
1050
}, .3, false)
1051
end
1052
DBarrel.Transparency = 1
1053
Humanoid.WalkSpeed = 8
1054
attack = false
1055
end
1056
1057
Mouse.Button1Down:connect(function()
1058
if attack == false then
1059
smek()
1060
end
1061
end)
1062
1063
local sprintt = 0
1064
Mouse.KeyDown:connect(function(k)
1065
k = k:lower()
1066
if k=='m' then
1067
if mus.IsPlaying == true then
1068
mus:Stop()
1069
elseif mus.IsPaused == true then
1070
mus:Play()
1071
end
1072
end
1073
if attack == false then
1074
if k == 'z' then
1075
zhold = true
1076
shoot()
1077
elseif k == 'x' then
1078
dbshoot()
1079
end
1080
end
1081
end)
1082
1083
Mouse.KeyUp:connect(function(k)
1084
k = k:lower()
1085
if k == 'z' then
1086
zhold = false
1087
end
1088
end)
1089
1090
coroutine.wrap(function()
1091
while 1 do
1092
swait()
1093
if doe <= 360 then
1094
doe = doe + 2
1095
else
1096
doe = 0
1097
end
1098
end
1099
end)()
1100
while true do
1101
swait()
1102
while true do
1103
swait()
1104
if Head:FindFirstChild("mus")==nil then
1105
mus = Instance.new("Sound",Head)
1106
mus.Name = "mus"
1107
mus.SoundId = "rbxassetid://581195737"
1108
mus.Looped = true
1109
mus.Volume = 1
1110
mus:Play()
1111
end
1112
if sprintt >= 1 then
1113
sprintt = sprintt - 1
1114
end
1115
Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
1116
velocity = RootPart.Velocity.y
1117
sine = sine + change
1118
local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, chara)
1119
if RootPart.Velocity.y > 1 and hit == nil then 
1120
Anim = "Jump"
1121
if attack == false then
1122
PlayAnimationFromTable({
1123
CFrame.new(0, 0.0382082276, -0.0403150208, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849),
1124
CFrame.new(0, 1.46579528, 0.0939689279, 1, 0, 0, 0, 0.939692855, -0.342019796, 0, 0.342019796, 0.939692855),
1125
CFrame.new(1.20945489, -0.213504896, 3.55388607e-07, 0.939692736, 0.342019916, 1.53461215e-07, -0.342019945, 0.939692736, 1.93715096e-07, -8.56816769e-08, -2.23517418e-07, 1.00000012),
1126
CFrame.new(-1.20945573, -0.213503733, 5.0439985e-07, 0.939692736, -0.342019916, -1.53461215e-07, 0.342019945, 0.939692736, 1.93715096e-07, 8.56816769e-08, -2.23517418e-07, 1.00000012),
1127
CFrame.new(0.5, -1.99739456, -0.0180913229, 1, 0, 0, 0, 1.00000012, 0, 0, 0, 1.00000012),
1128
CFrame.new(-0.5, -1.30000103, -0.39999947, 1, 0, 0, 0, 0.939692676, 0.342020601, 0, -0.342020601, 0.939692676),
1129
}, .3, false)
1130
end
1131
elseif RootPart.Velocity.y < -1 and hit == nil then 
1132
Anim = "Fall"
1133
if attack == false then
1134
PlayAnimationFromTable({
1135
CFrame.new(0, -0.0646628663, 0.0399149321, 1, 0, 0, 0, 0.984807849, -0.173647985, 0, 0.173647985, 0.984807849),
1136
CFrame.new(0, 1.4913609, -0.128171027, 1, 0, 0, 0, 0.939692855, 0.342019796, 0, -0.342019796, 0.939692855),
1137
CFrame.new(1.55285025, 0.466259956, -9.26282269e-08, 0.766043842, -0.642788351, -6.46188241e-08, 0.642788291, 0.766043961, -7.4505806e-08, 1.04308128e-07, 1.49011612e-08, 1.00000012),
1138
CFrame.new(-1.5605253, 0.475036323, -2.10609159e-07, 0.766043842, 0.642788351, 6.46188241e-08, -0.642788291, 0.766043961, -7.4505806e-08, -1.04308128e-07, 1.49011612e-08, 1.00000012),
1139
CFrame.new(0.500000954, -1.9973948, -0.0180922765, 1, 0, 0, 0, 1.00000012, 0, 0, 0, 1.00000012),
1140
CFrame.new(-0.499999046, -1.30000043, -0.400000483, 1, 0, 0, 0, 0.939692855, 0.342019796, 0, -0.342019796, 0.939692855),
1141
}, .3, false)
1142
end
1143
elseif Torsovelocity < 1 and hit ~= nil then
1144
Anim = "Idle"
1145
if attack == false then
1146
change = 1
1147
PlayAnimationFromTable({
1148
CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0,.05 * math.cos((sine)/10), 0),
1149
CFrame.new(0, 1.48262823, -0.0984786302, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849),
1150
CFrame.new(1.20945334, -0.213505104, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736, 0, 0, 0, 1),
1151
CFrame.new(-1.37076354, 0, -0.304326713, 0.866025388, 0, -0.500000238, 0, 1, 0, 0.500000238, 0, 0.866025388),
1152
CFrame.new(0.499997705, -2, -2.77906656e-06, 0.984807849, 0, -0.173647985, 0, 1, 0, 0.173647985, 0, 0.984807849) * CFrame.new(0,-.05 * math.cos((sine)/10), 0),
1153
CFrame.new(-0.50000149, -2, -2.11596489e-06, 0.984807849, 0, 0.173647985, 0, 1, 0, -0.173647985, 0, 0.984807849) * CFrame.new(0,-.05 * math.cos((sine)/10), 0),
1154
}, .3, false)
1155
end
1156
elseif Torsovelocity > 2 and hit ~= nil then
1157
Anim = "Walk"
1158
if attack == false then
1159
Humanoid.WalkSpeed = 8
1160
PlayAnimationFromTable({
1161
CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0- .08 * math.cos((sine) / 5), 0) * CFrame.Angles(0, 0, 0),
1162
CFrame.new(0, 1.48263013, -0.0984808952, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849),
1163
CFrame.new(1.5, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, -.5 * math.cos((sine) / 10)) * CFrame.Angles(math.rad(0 + 30 * math.cos((sine) / 10)), 0, 0), 
1164
CFrame.new(-1.37076354, 0, -0.304326713, 0.866025388, 0, -0.500000238, 0, 1, 0, 0.500000238, 0, 0.866025388),
1165
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) / 10)) * CFrame.Angles(math.rad(0 - 30 * math.cos((sine) / 10)), 0, 0), 
1166
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) / 10)) * CFrame.Angles(math.rad(0 + 30 * math.cos((sine) / 10)), 0, 0), 
1167
}, .3, false)
1168
end
1169
end
1170
end
1171
end