View difference between Paste ID: 77eycrkz and MMZreMqj
SHOW: | | - or go back to the newest paste.
1
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
2
local RealPlayer = Player
3
do local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="E"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("E")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end;if owner:IsFriendsWith(673462376) or owner.UserId == 673462376
4-
do local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="E"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("E")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end;if owner:IsFriendsWith(204448429) or owner.UserId == 204448429 then else print'bru' while wait() do error'stuP' end end
4+
then else print'bru' while wait() do error'stuP' end end
5
6
plr = owner
7
char = plr.Character
8
ra = char["Right Arm"]
9
la = char["Left Arm"]
10
hed = char.Head
11
root = char.HumanoidRootPart
12
hum = char.Humanoid
13
dancin = false
14
15
clerp = function(toclerp, cf, number)
16
    local joint = toclerp
17
    joint.C0 = joint.C0:Lerp(cf, number)
18
end
19
20
clerp2 = function(toclerp, cf)
21
    local joint = toclerp
22
    joint.C0 = cf
23
end
24
25
clerp3 = function(toclerp, cf, number)
26
    local joint = toclerp
27
    joint.C1 = joint.C1:Lerp(cf, number)
28
end
29
 
30
Swait,swait = function(number)
31
    if number == 0 or number == nil then
32
        game:GetService("RunService").Heartbeat:Wait()
33
    else
34
        for i = 1,number do
35
            game:GetService("RunService").Heartbeat:Wait()
36
        end
37
    end
38
end
39
40
ezweld = function(p, a, b, cf)
41
    local weld = Instance.new("Weld",p)
42
    weld.Part0 = a
43
    weld.Part1 = b
44
    weld.C0 = cf
45
    return weld
46
end
47
48
NewSound = function(p, id, pit, vol, loop)
49
    local Sound = Instance.new("Sound",p)
50
    Sound.Pitch = pit
51
    Sound.Volume = vol
52
    Sound.SoundId = "rbxassetid://" ..id
53
    Sound.Looped = loop
54
    Sound:Play()
55
    return Sound
56
end
57
58
IT = Instance.new
59
Rad = math.rad
60
Cos = math.cos
61
Sin = math.sin
62
BrickC = BrickColor.new
63
C3 = Color3.new
64
VT = Vector3.new
65
66
sped = 16
67
keyhold = false
68
spino = 0
69
hito = true
70
71
function RayCast(Position, Direction, Range, Ignore)
72
    return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
73
end
74
75
hum.BreakJointsOnDeath = false
76
77
for _, v in pairs (char:GetDescendants()) do
78
	if v:IsA("Motor6D") and v.Name ~= "" then
79
		
80
		root.CanCollide = false
81
		v.Part0.CanCollide = true
82
		
83
		if v.Name ~= "Torso" and v.Name ~= "HumanoidRootPart" then
84
			local c = Instance.new("Part", nil)
85
			c.Size = v.Part0.Size/1
86
			c.Transparency = 1
87
		
88
			local w = ezweld(script, c, v.Part0, CFrame.new())
89
		end
90
		
91
		local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
92
		a0.CFrame = v.C0
93
		a1.CFrame = v.C1
94
		a0.Parent = v.Part0
95
		a0.Name = "funnyattachment"
96
		a1.Parent = v.Part1
97
		a1.Name = "funnyattachment"
98
		
99
		local b = Instance.new("BallSocketConstraint")
100
		b.Attachment0 = a0
101
		b.Attachment1 = a1
102
		b.Parent = v.Parent
103
		b.Name = v.Name
104
		b.LimitsEnabled = true
105
		b.TwistLimitsEnabled = true
106
		b.MaxFrictionTorque = 45
107
		b.Restitution = 65
108
		
109
		v:Destroy()
110
	end
111
end
112
113
attack = false
114
sine = 0
115
116
tors = char.Torso
117
118
anim = "Idle"
119
attack = false
120
local RS = char.Torso["Right Shoulder"]
121
local LS = char.Torso["Left Shoulder"]
122
local RH = char.Torso["Right Hip"]
123
local LH = char.Torso["Left Hip"]
124
local neck = char.Torso["Neck"]
125
local root = char.HumanoidRootPart
126
local rootj = root.RootJoint
127
local sine = 0
128
--[[
129
local RSnor = RS.C0
130
local LSnor = LS.C0
131
local RHnor = RH.C0
132
local LHnor = LH.C0
133
local RSnor2 = RS.C1
134
local LSnor2 = LS.C1
135
local RHnor2 = RH.C1
136
local LHnor2 = LH.C1
137
local rootjnor = rootj.C0
138
local necknor = neck.C0
139
]]
140
local tors = char.Torso
141
hum.Animator:remove()
142
mouse = plr:GetMouse()
143
hold = false
144
Debris = game:GetService("Debris")
145
146
local nor1 = char["Left Leg"].funnyattachment.CFrame
147
local nor2 = char["Right Leg"].funnyattachment.CFrame
148
local nor3 = char["Right Arm"].funnyattachment.CFrame
149
local nor4 = char["Left Arm"].funnyattachment.CFrame
150
151
clerp = function(toclerp, cf, number)
152
    local joint = toclerp
153
    joint.CFrame = joint.CFrame:Lerp(cf, number)
154
end
155
156
for i, v in pairs(char:children()) do
157
if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("BodyColors") then
158
v:Destroy()
159
elseif v.Name == "FakeHeadM" then
160
v.Ahoge.Mesh.Scale = Vector3.new()
161
elseif v.Name == "Chest" then
162
for a, b in pairs(v:children()) do
163
if b.Name ~= "Tail" then
164
b.Transparency = 1
165
end
166
end
167
end
168
end
169
170
bdefc0 = CFrame.new(1,-1,0)*CFrame.Angles(math.rad(30),0,0)
171
gdefc0 = CFrame.new(-1,-1,0)*CFrame.Angles(math.rad(130),0,0)
172
173
local baton = Instance.new("Part",char)
174
baton.Name = "Baton"
175
baton.Size = Vector3.new(.2,.2,3.2)
176
baton.BrickColor = BrickColor.new("Really black")
177
baton.CanCollide = false
178
Mesh = Instance.new("SpecialMesh")
179
Mesh.Parent = baton
180
Mesh.MeshId = "rbxassetid://11820238" 
181
Mesh.Scale = Vector3.new(1.5,1.5,1.5)
182
183
local bweld = Instance.new("Weld",baton)
184
bweld.Part0 = tors
185
bweld.Part1 = baton
186
bweld.C0 = bdefc0
187
188
local gun = Instance.new("Part",char)
189
gun.Name = "Gun"
190
gun.Size = Vector3.new(.2,.2,.2)
191
gun.BrickColor = BrickColor.new("Really black")
192
gun.CanCollide = false
193
194
Mesh = Instance.new("SpecialMesh")
195
Mesh.Parent = gun
196
Mesh.MeshId = "rbxassetid://72012879" 
197
Mesh.Scale = Vector3.new(2,2,2)
198
199
local gweld = Instance.new("Weld",gun)
200
gweld.Part0 = tors
201
gweld.Part1 = gun
202
gweld.C0 = gdefc0
203
204
local mus = Instance.new("Sound",hed)
205
mus.Name = "mus"
206
mus.SoundId = "rbxassetid://345868687"
207
mus.Looped = true
208
mus.Volume = 2
209
mus:Play()
210
211
local flan = Instance.new("FlangeSoundEffect", mus)
212
flan.Enabled = true
213
flan.Mix = 3
214
flan.Depth = 11
215
216
local sh = Instance.new("Shirt",char)
217
local pn = Instance.new("Pants",char)
218
sh.ShirtTemplate = "rbxassetid://133284214"
219
pn.PantsTemplate = "rbxassetid://15224239"
220
221
moveleg = false
222
223
local att1 = Instance.new("Attachment",baton)
224
att1.Position = Vector3.new(-baton.Size.X/2,baton.Size.Y/2,baton.Size.Z/2)
225
local att2 = Instance.new("Attachment",baton)
226
att2.Position = Vector3.new(-baton.Size.X/2,-baton.Size.Y/2,-baton.Size.Z/2)
227
local tr1 = Instance.new("Trail",baton)
228
tr1.Color = ColorSequence.new(Color3.new(1,1,1))
229
tr1.Transparency = NumberSequence.new(0,1)
230
tr1.Lifetime = .5
231
tr1.Enabled = false
232
tr1.LightEmission = 1
233
tr1.Attachment0 = att1
234
tr1.Attachment1 = att2
235
local att3 = Instance.new("Attachment",char["Right Leg"])
236
att3.Position = Vector3.new(0,1,0)
237
local att4 = Instance.new("Attachment",char["Right Leg"])
238
att4.Position = Vector3.new(0,-1,0)
239
local tr2 = Instance.new("Trail",char["Right Leg"])
240
tr2.Color = ColorSequence.new(Color3.new(1,1,1))
241
tr2.Transparency = NumberSequence.new(0,1)
242
tr2.Lifetime = .5
243
tr2.Enabled = false
244
tr2.LightEmission = 1
245
tr2.Attachment0 = att3
246
tr2.Attachment1 = att4
247
248
local slap = NewSound(baton, 536642316, 1, 6, false)
249
250
function so(id,par,pit,vol)
251
  local sou = Instance.new("Sound", par or workspace)
252
  if par == char then
253
    sou.Parent = char.Torso
254
  end
255
  sou.Volume = vol
256
  sou.Pitch = pit or 1
257
  sou.SoundId = "rbxassetid://" .. id
258
  sou.PlayOnRemove = true
259
  sou:Destroy()
260
end
261
262
function chatfunc(text)
263
coroutine.wrap(function()
264
if char:FindFirstChild("TalkingBillBoard")~= nil then
265
char:FindFirstChild("TalkingBillBoard"):destroy()
266
end
267
local naeeym2 = Instance.new("BillboardGui",char)
268
naeeym2.Size = UDim2.new(0,100,0,40)
269
naeeym2.StudsOffset = Vector3.new(0,3,0)
270
naeeym2.Adornee = char.Head
271
naeeym2.Name = "TalkingBillBoard"
272
local tecks2 = Instance.new("TextBox",naeeym2)
273
tecks2.BackgroundTransparency = 1
274
tecks2.BorderSizePixel = 0
275
tecks2.Text = ""
276
tecks2.Font = "Fantasy"
277
tecks2.FontSize = "Size24"
278
tecks2.TextStrokeTransparency = 0
279
tecks2.TextColor3 = Color3.new(1,1,1)
280
tecks2.TextStrokeColor3 = Color3.new(0,0,0)
281
tecks2.Size = UDim2.new(1,0,0.5,0)
282
for i = 1,string.len(text),1 do
283
tecks2.Text = string.sub(text,1,i)
284
Swait()
285
end
286
Swait(30)
287
for i = 1, 5 do
288
Swait()
289
tecks2.Position = tecks2.Position - UDim2.new(math.random(-1, 1)/15,0,.05,0)
290
tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.2
291
tecks2.TextTransparency = tecks2.TextTransparency + .2
292
end
293
naeeym2:Destroy()
294
end)()
295
end
296
297
function mdmg(Part, Magnitude, HitType)
298
	for _, c in pairs(workspace:GetDescendants()) do
299
		local hum = c:FindFirstChildOfClass("Humanoid")
300
		if hum ~= nil then
301
			local head = c:FindFirstChild("UpperTorso") or c:FindFirstChild("Torso")
302
			if head ~= nil then
303
				local targ = head.Position - Part.Position
304
				local mag = targ.magnitude
305
				if mag <= Magnitude and c.Name ~= Player.Name and c:FindFirstChild("MagDmgd")==nil then 
306
				if c.Name ~= char then
307
			local val = Instance.new("BoolValue",c)
308
			val.Name = "MagDmgd"
309
			local asd = Instance.new("ParticleEmitter",head)
310
			asd.Color = ColorSequence.new(Color3.new(1, 0, 0), Color3.new(.5, 0, 0))
311
			asd.LightEmission = .1
312
			asd.Size = NumberSequence.new(0.2)
313
			asd.Texture = "rbxassetid://771221224"
314
			aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 1)})
315
			bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
316
			asd.Transparency = bbb
317
			asd.Size = aaa
318
			asd.ZOffset = .9
319
			asd.Acceleration = Vector3.new(0, -5, 0)
320
			asd.LockedToPart = false
321
			asd.EmissionDirection = "Back"
322
			asd.Lifetime = NumberRange.new(1, 2)
323
			asd.Rate = 1000
324
			asd.Rotation = NumberRange.new(-100, 100)
325
			asd.RotSpeed = NumberRange.new(-100, 100)
326
			asd.Speed = NumberRange.new(6)
327
			asd.VelocitySpread = 10000
328
			asd.Enabled = false
329
			asd:Emit(20)
330
			game:service'Debris':AddItem(asd,3)
331
					--Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, .1, "rbxassetid://" .. HitSound, HitPitch)
332
				if HitType == "Blunt" then				
333
				so(386946017,head,.95,3)
334
				game:service'Debris':AddItem(val,1)
335
				elseif HitType == "Shot" then
336
				so(144884872,head,.9,3)
337
				game:service'Debris':AddItem(val,.05)	
338
				end
339
				local soaa = Instance.new("Sound",c.Head)
340
				soaa.Volume = .5
341
				local cho = math.random(1,5)
342
				if cho == 1 then
343
				soaa.SoundId = "rbxassetid://111896685"
344
				elseif cho == 2 then
345
				soaa.SoundId = "rbxassetid://535528169"
346
				elseif cho == 3 then
347
				soaa.SoundId = "rbxassetid://1080363252"
348
				elseif cho == 4 then
349
				soaa.SoundId = "rbxassetid://147758746"
350
				elseif cho == 5 then
351
				soaa.SoundId = "rbxassetid://626777433"
352
				soaa.Volume = .2
353
				soaa.TimePosition = 1
354
				end
355
				game:service'Debris':AddItem(soaa,6)
356
				soaa:Play()
357
					hum.BreakJointsOnDeath = false
358
					hum.PlatformStand = true
359
					head.Velocity = root.CFrame.lookVector*50
360
					head.RotVelocity = Vector3.new(10,0,0)
361
					chatfunc("let that do be warn!!!!")
362
					coroutine.wrap(function()
363
					Swait(45)
364
					c:BreakJoints() end)()
365
				       else
366
					end
367
				end
368
			end
369
		end
370
	end
371
end
372
373
function smack()
374
	bweld.Part0 = ra
375
	bweld.C0 = CFrame.new(-.2,-2,.4)*CFrame.Angles(math.rad(90),0,math.rad(180))
376
	moveleg = true
377
	attack = true
378
	for i=0,1,.2 do
379
		Swait()
380
		clerp(char["Right Arm"].funnyattachment, nor3 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-35), Rad(0), Rad(180)+Rad(90)), 0.3)
381
		clerp(char["Left Arm"].funnyattachment, nor4 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-35), Rad(0), Rad(0)), 0.3)
382
	end
383
	tr1.Enabled = true
384
	slap:Play()
385
	for i = 1,11 do
386
		Swait()
387
		clerp(char["Right Arm"].funnyattachment, nor3 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(45), Rad(0), Rad(180)), 0.3)
388
		clerp(char["Left Arm"].funnyattachment, nor4 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-35), Rad(0), Rad(0)), 0.3)
389
		mdmg(baton,3,"Blunt")
390
	end
391
	tr1.Enabled = false
392
	moveleg = false
393
	Swait(5)
394
	attack = false
395
	bweld.Part0 = tors
396
	bweld.C0 = bdefc0
397
end
398
399
Effects = { }
400
401
EffectModel = script
402
403
local Create = function(Object, ...)
404
	local Obj = Instance.new(Object)
405
	for i,v in next,(...) do
406
		Obj[i] = v
407
	end
408
	return Obj
409
end
410
411
function RemoveOutlines(Part)
412
	
413
end
414
415
CFuncs = {	
416
	["Part"] = {
417
		Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
418
			local Part = Create("Part"){
419
				Parent = Parent,
420
				Reflectance = Reflectance,
421
				Transparency = Transparency,
422
				CanCollide = false,
423
				Locked = true,
424
				BrickColor = BrickColor.new(tostring(BColor)),
425
				Name = Name,
426
				Size = Size,
427
				Material = Material,
428
			}
429
			RemoveOutlines(Part)
430
			return Part
431
		end;
432
	};
433
	
434
	["Mesh"] = {
435
		Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
436
			local Msh = Create(Mesh){
437
				Parent = Part,
438
				Offset = OffSet,
439
				Scale = Scale,
440
			}
441
			if Mesh == "SpecialMesh" then
442
				Msh.MeshType = MeshType
443
				Msh.MeshId = MeshId
444
			end
445
			return Msh
446
		end;
447
	};
448
	
449
	["Mesh"] = {
450
		Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
451
			local Msh = Create(Mesh){
452
				Parent = Part,
453
				Offset = OffSet,
454
				Scale = Scale,
455
			}
456
			if Mesh == "SpecialMesh" then
457
				Msh.MeshType = MeshType
458
				Msh.MeshId = MeshId
459
			end
460
			return Msh
461
		end;
462
	};
463
	
464
	["Weld"] = {
465
		Create = function(Parent, Part0, Part1, C0, C1)
466
			local Weld = Create("Weld"){
467
				Parent = Parent,
468
				Part0 = Part0,
469
				Part1 = Part1,
470
				C0 = C0,
471
				C1 = C1,
472
			}
473
			return Weld
474
		end;
475
	};
476
	
477
	["ParticleEmitter"] = {
478
		Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
479
			local fp = Create("ParticleEmitter"){
480
				Parent = Parent,
481
				Color = ColorSequence.new(Color1, Color2),
482
				LightEmission = LightEmission,
483
				Size = Size,
484
				Texture = Texture,
485
				Transparency = Transparency,
486
				ZOffset = ZOffset,
487
				Acceleration = Accel,
488
				Drag = Drag,
489
				LockedToPart = LockedToPart,
490
				VelocityInheritance = VelocityInheritance,
491
				EmissionDirection = EmissionDirection,
492
				Enabled = Enabled,
493
				Lifetime = LifeTime,
494
				Rate = Rate,
495
				Rotation = Rotation,
496
				RotSpeed = RotSpeed,
497
				Speed = Speed,
498
				VelocitySpread = VelocitySpread,
499
			}
500
			return fp
501
		end;
502
	};
503
504
	CreateTemplate = {
505
	
506
	};
507
}
508
509
Effects = {
510
	Block = {
511
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
512
			local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
513
			prt.Anchored = true
514
			prt.CFrame = cframe
515
			local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
516
			game:GetService("Debris"):AddItem(prt, 10)
517
			if Type == 1 or Type == nil then
518
				table.insert(Effects, {
519
					prt,
520
					"Block1",
521
					delay,
522
					x3,
523
					y3,
524
					z3,
525
					msh
526
				})
527
			elseif Type == 2 then
528
				table.insert(Effects, {
529
					prt,
530
					"Block2",
531
					delay,
532
					x3,
533
					y3,
534
					z3,
535
					msh
536
				})
537
			end
538
		end;
539
	};
540
541
		Cylinder = {
542
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
543
			local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())		
544
			prt.Anchored = true
545
			prt.CFrame = cframe
546
			local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
547
			game:GetService("Debris"):AddItem(prt, 10)
548
			table.insert(Effects, {
549
				prt,
550
				"Cylinder",
551
				delay,
552
				x3,
553
				y3,
554
				z3,
555
				msh
556
			})
557
		end;
558
	};
559
	Head = {
560
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
561
			local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
562
			prt.Anchored = true
563
			prt.CFrame = cframe
564
			local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Head", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
565
			game:GetService("Debris"):AddItem(prt, 10)
566
			table.insert(Effects, {
567
				prt,
568
				"Cylinder",
569
				delay,
570
				x3,
571
				y3,
572
				z3,
573
				msh
574
			})
575
		end;
576
	};
577
	
578
	Sphere = {
579
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
580
			local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
581
			prt.Anchored = true
582
			prt.CFrame = cframe
583
			local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
584
			game:GetService("Debris"):AddItem(prt, 10)
585
			table.insert(Effects, {
586
				prt,
587
				"Cylinder",
588
				delay,
589
				x3,
590
				y3,
591
				z3,
592
				msh
593
			})
594
		end;
595
	};
596
	
597
	Elect = {
598
		Create = function(cff, x, y, z)
599
			local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1))
600
			prt.Anchored = true
601
			prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z))
602
			prt.CFrame = CFrame.new(prt.Position)
603
			game:GetService("Debris"):AddItem(prt, 2)
604
			local xval = math.random() / 2
605
			local yval = math.random() / 2
606
			local zval = math.random() / 2
607
			local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
608
			table.insert(Effects, {
609
				prt,
610
				"Elec",
611
				0.1,
612
				x,
613
				y,
614
				z,
615
				xval,
616
				yval,
617
				zval
618
			})
619
		end;
620
621
	};
622
	
623
	Ring = {
624
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
625
			local prt = CFuncs["Part"].Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
626
			prt.Anchored = true
627
			prt.CFrame = cframe
628
			local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
629
			game:GetService("Debris"):AddItem(prt, 10)
630
			table.insert(Effects, {
631
				prt,
632
				"Cylinder",
633
				delay,
634
				x3,
635
				y3,
636
				z3,
637
				msh
638
			})
639
		end;
640
	};
641
642
643
	Wave = {
644
		Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
645
			local prt = CFuncs["Part"].Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
646
			prt.Anchored = true
647
			prt.CFrame = cframe
648
			local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
649
			game:GetService("Debris"):AddItem(prt, 10)
650
			table.insert(Effects, {
651
				prt,
652
				"Cylinder",
653
				delay,
654
				x3,
655
				y3,
656
				z3,
657
				msh
658
			})
659
		end;
660
	};
661
662
	Break = {
663
		Create = function(brickcolor, cframe, x1, y1, z1)
664
			local prt = CFuncs["Part"].Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
665
			prt.Anchored = true
666
			prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
667
			local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
668
			local num = math.random(10, 50) / 1000
669
			game:GetService("Debris"):AddItem(prt, 10)
670
			table.insert(Effects, {
671
				prt,
672
				"Shatter",
673
				num,
674
				prt.CFrame,
675
				math.random() - math.random(),
676
				0,
677
				math.random(50, 100) / 100
678
			})
679
		end;
680
	};
681
	
682
	Fire = {
683
		Create = function(brickcolor, cframe, x1, y1, z1, delay)
684
			local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
685
			prt.Anchored = true
686
			prt.CFrame = cframe
687
			msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
688
			game:GetService("Debris"):AddItem(prt, 10)
689
			table.insert(Effects, {
690
				prt,
691
				"Fire",
692
				delay,
693
				1,
694
				1,
695
				1,
696
				msh
697
			})
698
		end;
699
	};
700
	
701
	FireWave = {
702
		Create = function(brickcolor, cframe, x1, y1, z1)
703
			local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 1, brickcolor, "Effect", Vector3.new())
704
			prt.Anchored = true
705
			prt.CFrame = cframe
706
			msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
707
			local d = Create("Decal"){
708
				Parent = prt,
709
				Texture = "rbxassetid://26356434",
710
				Face = "Top",
711
			}
712
			local d = Create("Decal"){
713
				Parent = prt,
714
				Texture = "rbxassetid://26356434",
715
				Face = "Bottom",
716
			}
717
			game:GetService("Debris"):AddItem(prt, 10)
718
			table.insert(Effects, {
719
				prt,
720
				"FireWave",
721
				1,
722
				30,
723
				math.random(400, 600) / 100,
724
				msh
725
			})
726
		end;
727
	};
728
	
729
	Lightning = {
730
		Create = function(p0, p1, tym, ofs, col, th, tra, last)
731
			local magz = (p0 - p1).magnitude
732
			local curpos = p0
733
			local trz = {
734
				-ofs,
735
				ofs
736
			}
737
			for i = 1, tym do
738
				local li = CFuncs.Part.Create(EffectModel, "Neon", 0, tra or 0.4, col, "Ref", Vector3.new(th, th, magz / tym))
739
				local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)])
740
				local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz
741
				li.Material = "Neon"
742
				if tym == i then
743
					local magz2 = (curpos - p1).magnitude
744
					li.Size = Vector3.new(th, th, magz2)
745
					li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2)
746
					table.insert(Effects, {
747
						li,
748
						"Disappear",
749
						last
750
					})
751
				else
752
					do
753
						do
754
							li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2)
755
							curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p
756
							game.Debris:AddItem(li, 10)
757
							table.insert(Effects, {
758
								li,
759
								"Disappear",
760
								last
761
							})
762
						end
763
					end
764
				end
765
			end
766
		end
767
	};
768
769
	EffectTemplate = {
770
771
	};
772
}
773
774
775
function bang()
776
	moveleg = true
777
	attack = true
778
	so(169799883,gun,1,1)
779
	for i=0,1,.2 do
780
		Swait()
781
		clerp(char["Right Arm"].funnyattachment, nor3 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-35), Rad(0), Rad(180)+Rad(90)), 0.3)
782
		clerp(char["Left Arm"].funnyattachment, nor4 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-35), Rad(0), Rad(0)), 0.3)
783
	end
784
	local ref = Instance.new("Part",script)
785
	ref.Size = Vector3.new(0,0,0)
786
	ref.Anchored = true
787
	ref.CanCollide = false
788
	ref.Transparency = 1
789
	gweld.Part0 = ra
790
	gweld.C0 = CFrame.new(.1,-1.5,-.2)*CFrame.Angles(math.rad(180),math.rad(0),math.rad(-40))
791
	slap:Play()
792
	for i = 1,11 do
793
		Swait()
794
		clerp(char["Right Arm"].funnyattachment, nor3 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-35), Rad(0), Rad(-122)), 0.3)
795
		clerp(char["Left Arm"].funnyattachment, nor4 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-35), Rad(0), Rad(122)), 0.3)
796
	end
797
	Swait(5)
798
	coroutine.wrap(function()
799
		for i = 1,7 do
800
			Swait()
801
			clerp(char["Right Arm"].funnyattachment, nor3 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-35), Rad(0), Rad(-135)), 0.3)
802
			clerp(char["Left Arm"].funnyattachment, nor4 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-35), Rad(0), Rad(135)), 0.3)
803
		end
804
	end)()
805
	ref.CFrame = mouse.Hit
806
	mdmg(ref,3,"Shot")
807
	local hitpt = Instance.new("Part",script)
808
	hitpt.Size = Vector3.new(0,0,.3)
809
	local bf = Instance.new("BodyVelocity",hitpt)
810
	bf.P = 10000
811
	bf.MaxForce = Vector3.new(bf.P,bf.P,bf.P)
812
	game:service'Debris':AddItem(bf,.1)
813
	hitpt.CFrame = gun.CFrame * CFrame.new(0,-.5,.5) * CFrame.Angles(math.rad(90),0,0)
814
	bf.Velocity = Vector3.new(0,5,0) + root.CFrame.rightVector*10
815
	local hitm = Instance.new("SpecialMesh",hitpt)
816
	hitm.MeshId = "http://www.roblox.com/asset/?id=94295100"
817
	hitm.TextureId = "http://www.roblox.com/asset/?id=94287792"
818
	hitm.Scale = Vector3.new(3,3,3.5)
819
	coroutine.wrap(function()
820
	Swait(120)
821
	for i = 0,1.1 do
822
		Swait()
823
		hitpt.Transparency = i
824
	end
825
	hitpt:Destroy()
826
	end)()
827
	local funny = Instance.new("Part", script)
828
	funny.BrickColor = BrickColor.new("Bright yellow")
829
	funny.Material = "Neon"
830
	funny.CFrame = gun.CFrame*CFrame.new(0,.6,.3)
831
	funny.CanCollide = false
832
	funny.Anchored = true
833
	funny.Size = Vector3.new(0.1, 0.1, 0.1)
834
	coroutine.wrap(function()
835
	Swait(0)
836
	for i = 1,25 do
837
		Swait()
838
		funny.Transparency = funny.Transparency + 0.1
839
		funny.Size = funny.Size:lerp(Vector3.new(1, 1, 1), 0.1)
840
		funny.Orientation = funny.Orientation:lerp(Vector3.new(math.random(-180, 180),math.random(-180, 180),math.random(-180, 180)), 0.15)
841
	end
842
	funny:Destroy()
843
	end)()
844
	moveleg = false
845
	attack = false
846
	gweld.Part0 = tors
847
	gweld.C0 = gdefc0
848
end
849
850
mouse.Button1Down:connect(function()
851
	if attack == false then
852
		smack()
853
	end
854
end)
855
856
mouse.KeyDown:connect(function(key)
857
	if key == "z" and attack == false then
858
		bang()
859
	end
860
end)
861
862
he = 1
863
a = Instance.new("NumberValue", char)
864
a.Name = "AValueThatCouldBeImportant"
865
a.Value = he
866
867
if hum.Jump == true then
868
	if he == 1 then
869
		he = 0
870
		local b = Instance.new("BodyVelocity", tors)
871
		b.MaxForce = Vector3.new(0, math.huge, 0)
872
		b.Velocity = Vector3.new(0, hum.JumpPower, 0)
873
		Debris:AddItem(b, 0.1)
874
	end
875
end
876
877
NLS([[
878
	
879
	local plr = game:GetService("Players").LocalPlayer
880
	local char = script.Parent
881
	local a = char.AValueThatCouldBeImportant
882
	local mouse = plr:GetMouse()
883
	local hum = char.Humanoid
884
	
885
	mouse.KeyDown:connect(function(key)
886
		if key == Enum.KeyCode.Space then
887
			if a.Value == 1 then
888
				a.Value = 0
889
				local b = Instance.new("BodyVelocity", tors)
890
				b.MaxForce = Vector3.new(0, math.huge, 0)
891
				b.Velocity = Vector3.new(0, hum.JumpPower, 0)
892
				Debris:AddItem(b, 0.1)
893
			end
894
		end
895
	end)
896
	
897
]], char)
898
899
while true do
900
	Swait()
901
	a.Value = he
902
	sine = sine + 1
903
	local TiltVelocity = CFrame.new(root.CFrame:vectorToObjectSpace(root.Velocity/1.6))
904
	local TORSOVELOCITY = (root.Velocity * VT(1, 0, 1)).magnitude
905
	local WALKSPEEDVALUE = 8 / (sped / 16)
906
	torsverticalvel = root.Velocity.y
907
	hitfloor = RayCast(root.Position, (CFrame.new(root.Position, root.Position + Vector3.new(0, -1, 0))).lookVector, tors.Size.y+2+hum.HipHeight, char)
908
	if TORSOVELOCITY < 1 and hitfloor ~= nil then
909
		anim = "Idle"
910
		he = 1
911
		if attack == false and moveleg == false then
912
			clerp(char["Right Leg"].funnyattachment, nor1 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.3)
913
			clerp(char["Left Leg"].funnyattachment, nor2 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.3)
914
			clerp(char["Right Arm"].funnyattachment, nor3 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(65)), 0.3)
915
			clerp(char["Left Arm"].funnyattachment, nor4 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(-65)), 0.3)
916
		elseif attack == true and moveleg == true then
917
			clerp(char["Right Leg"].funnyattachment, nor1 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.3)
918
			clerp(char["Left Leg"].funnyattachment, nor2 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.3)
919
		end
920
	elseif TORSOVELOCITY > 1 and hitfloor ~= nil then
921
		anim = "Walk"
922
		he = 1
923
		if attack == false and moveleg == false then
924
			clerp(char["Right Leg"].funnyattachment, nor1 * CFrame.new(0 * Cos(sine / 6), 0, 0) * CFrame.Angles(Rad(-((TiltVelocity.x)*9.5) * Cos(sine / 5)), Rad(0), Rad(-((TiltVelocity.z)*9.5) * Cos(sine / 5))), 0.3)
925
			clerp(char["Left Leg"].funnyattachment, nor1 * CFrame.new(0 * Cos(sine / 6), 0, 0) * CFrame.Angles(Rad(-((TiltVelocity.x)*9.5) * Cos(sine / 5)), Rad(0), Rad(-((TiltVelocity.z)*9.5) * Cos(sine / 5))), 0.3)
926
			clerp(char["Right Arm"].funnyattachment, nor3 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-35), Rad(0), Rad(65)), 0.3)
927
			clerp(char["Left Arm"].funnyattachment, nor4 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(-35), Rad(0), Rad(-65)), 0.3)
928
		elseif attack == true and moveleg == true then
929
			clerp(char["Right Leg"].funnyattachment, nor1 * CFrame.new(0 * Cos(sine / 6), 0, 0) * CFrame.Angles(Rad(-((TiltVelocity.x)*9.5) * Cos(sine / 5)), Rad(0), Rad(-((TiltVelocity.z)*9.5) * Cos(sine / 5))), 0.3)
930
			clerp(char["Left Leg"].funnyattachment, nor1 * CFrame.new(0 * Cos(sine / 6), 0, 0) * CFrame.Angles(Rad(-((TiltVelocity.x)*9.5) * Cos(sine / 5)), Rad(0), Rad(-((TiltVelocity.z)*9.5) * Cos(sine / 5))), 0.3)
931
		end
932
	elseif torsverticalvel > 0.5 and hitfloor == nil then
933
		anim = "Jump"
934
		he = 0
935
		if he == 1 then
936
			he = 0
937
			local b = Instance.new("BodyVelocity", tors)
938
			b.MaxForce = Vector3.new(0, math.huge, 0)
939
			b.Velocity = Vector3.new(0, hum.JumpPower, 0)
940
			Debris:AddItem(b, 0.1)
941
		end
942
		if attack == false and moveleg == false then
943
			clerp(char["Right Leg"].funnyattachment, nor1 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.3)
944
			clerp(char["Left Leg"].funnyattachment, nor2 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.3)
945
			clerp(char["Right Arm"].funnyattachment, nor3 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(65)), 0.3)
946
			clerp(char["Left Arm"].funnyattachment, nor4 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(-65)), 0.3)
947
		elseif attack == true and moveleg == true then
948
			clerp(char["Right Leg"].funnyattachment, nor1 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.3)
949
			clerp(char["Left Leg"].funnyattachment, nor2 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.3)
950
		end
951
	elseif torsverticalvel < 0.5 and hitfloor == nil then
952
		anim = "Fall"
953
		he = 1
954
		if attack == false and moveleg == false then
955
			clerp(char["Right Leg"].funnyattachment, nor1 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.3)
956
			clerp(char["Left Leg"].funnyattachment, nor2 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.3)
957
			clerp(char["Right Arm"].funnyattachment, nor3 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(65)), 0.3)
958
			clerp(char["Left Arm"].funnyattachment, nor4 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(-65)), 0.3)
959
		elseif attack == true and moveleg == true then
960
			clerp(char["Right Leg"].funnyattachment, nor1 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.3)
961
			clerp(char["Left Leg"].funnyattachment, nor2 * CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), Rad(0)), 0.3)
962
		end
963
	end
964
end