View difference between Paste ID: TjRUTq0K and PyMjdpRQ
SHOW: | | - or go back to the newest paste.
1
--[[
2
==================================]}
3
//{Script: Memuto          
4
//{User: Solavenge               
5
==================================]}
6
//{Controls:              
7
// F - Toggle Memes
8
==================================]}
9
--]]
10
11
Player=game:GetService("Players").LocalPlayer
12
Character=Player.Character 
13
PlayerGui=Player.PlayerGui 
14
Backpack=Player.Backpack 
15
Torso=Character.Torso 
16
Head=Character.Head 
17
Humanoid=Character.Humanoid
18
m=Instance.new('Model',Character)
19
LeftArm=Character["Left Arm"] 
20
LeftLeg=Character["Left Leg"] 
21
RightArm=Character["Right Arm"] 
22
RightLeg=Character["Right Leg"] 
23
LS=Torso["Left Shoulder"] 
24
LH=Torso["Left Hip"] 
25
RS=Torso["Right Shoulder"] 
26
RH=Torso["Right Hip"] 
27
Neck=Torso.Neck
28
it=Instance.new
29
attacktype=1
30
vt=Vector3.new
31
cf=CFrame.new
32
euler=CFrame.fromEulerAnglesXYZ
33
angles=CFrame.Angles
34
necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
35
necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
36
LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
37
LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
38
RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
39
RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
40
RootPart=Character.HumanoidRootPart
41
RootJoint=RootPart.RootJoint
42
RootCF=euler(-1.57,0,3.14)
43
attack = false 
44
attackdebounce = false 
45
deb=false
46
equipped=true
47
hand=false
48
MMouse=nil
49
combo=0
50
mana=0
51
cam=workspace.CurrentCamera
52
RocketTarget=nil
53
Targetting=false
54
trispeed=.2
55
attackmode='none'
56
local idle=0
57
local Anim="Idle"
58
local Effects={}
59
local gun=false
60
local shoot=false
61
local issprinting=false
62
local memeing=false
63
player=nil 
64
mouse=Player:GetMouse()
65
--save shoulders 
66
RSH, LSH=nil, nil 
67
--welds 
68
RW, LW=Instance.new("Weld"), Instance.new("Weld") 
69
RW.Name="Right Shoulder" LW.Name="Left Shoulder"
70
LH=Torso["Left Hip"]
71
RH=Torso["Right Hip"]
72
TorsoColor=Torso.BrickColor
73
function NoOutline(Part)
74
Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
75
end
76
player=Player 
77
ch=Character
78
RSH=ch.Torso["Right Shoulder"] 
79
LSH=ch.Torso["Left Shoulder"] 
80
-- 
81
RSH.Parent=nil 
82
LSH.Parent=nil 
83
-- 
84
RW.Name="Right Shoulder"
85
RW.Part0=ch.Torso 
86
RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) 
87
RW.C1=cf(0, 0.5, 0) 
88
RW.Part1=ch["Right Arm"] 
89
RW.Parent=ch.Torso 
90
-- 
91
LW.Name="Left Shoulder"
92
LW.Part0=ch.Torso 
93
LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) 
94
LW.C1=cf(0, 0.5, 0) 
95
LW.Part1=ch["Left Arm"] 
96
LW.Parent=ch.Torso 
97
98
if Humanoid:findFirstChild("Animate") then
99
  Humanoid:findFirstChild("Animate"):Destroy()
100
elseif Character:findFirstChild("Animate") then
101
  Character:findFirstChild("Animate"):Destroy()
102
end
103
104
105
local WEEB = Instance.new("Sound",Torso)
106
WEEB.Volume=0
107
WEEB.Pitch=0
108
WEEB.SoundId="http://www.roblox.com/asset/?id=186860903"
109
WEEB.Looped=true
110
wait() 
111
WEEB:play() 
112
113
114
local Stats=Instance.new("BoolValue")
115
Stats.Name="Stats"
116
Stats.Parent=Character
117
local Atk=Instance.new("NumberValue")
118
Atk.Name="Damage"
119
Atk.Parent=Stats
120
Atk.Value=1
121
local Def=Instance.new("NumberValue")
122
Def.Name="Defense"
123
Def.Parent=Stats
124
Def.Value=1
125
local Speed=Instance.new("NumberValue")
126
Speed.Name="Speed"
127
Speed.Parent=Stats
128
Speed.Value=1
129
local Mvmt=Instance.new("NumberValue")
130
Mvmt.Name="Movement"
131
Mvmt.Parent=Stats
132
Mvmt.Value=1
133
134
135
local donum=0
136
137
function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
138
local fp=it("Part")
139
fp.formFactor=formfactor 
140
fp.Parent=parent
141
fp.Reflectance=reflectance
142
fp.Transparency=transparency
143
fp.CanCollide=false 
144
fp.Locked=true
145
fp.BrickColor=brickcolor
146
fp.Name=name
147
fp.Size=size
148
fp.Position=Torso.Position 
149
NoOutline(fp)
150
fp.Material="SmoothPlastic"
151
fp:BreakJoints()
152
return fp 
153
end 
154
155
function part2(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
156
	local fp = Instance.new("Part")
157
		fp.formFactor = formfactor
158
		fp.Parent = parent
159
		fp.Reflectance = reflectance
160
		fp.Transparency = transparency
161
		fp.CanCollide = false
162
		fp.Locked = true
163
		fp.BrickColor = BrickColor.new(tostring(brickcolor))
164
		fp.Name = name
165
		fp.Size = size
166
		fp.Position = Character.Torso.Position
167
		fp.Material = material
168
	
169
	NoOutline(fp)
170
	return fp
171
end
172
 
173
function mesh(Mesh,part,meshtype,meshid,offset,scale)
174
local mesh=it(Mesh) 
175
mesh.Parent=part
176
if Mesh=="SpecialMesh" then
177
mesh.MeshType=meshtype
178
mesh.MeshId=meshid
179
end
180
mesh.Offset=offset
181
mesh.Scale=scale
182
return mesh
183
end
184
 
185
function weld(parent,part0,part1,c0)
186
local weld=it("Weld") 
187
weld.Parent=parent
188
weld.Part0=part0 
189
weld.Part1=part1 
190
weld.C0=c0
191
return weld
192
end
193
194
function weld2(parent, part0, part1, c0, c1)
195
	local Weld = Instance.new("Weld")
196
		Weld.Parent = parent
197
		Weld.Part0 = part0
198
		Weld.Part1 = part1
199
		Weld.C0 = c0
200
		Weld.C1 = c1
201
	
202
	return Weld
203
end
204
 
205
local Color1=Torso.BrickColor
206
207
local bodvel=Instance.new("BodyVelocity")
208
local bg=Instance.new("BodyGyro")
209
210
ArtificialHB = Instance.new("BindableEvent", script)
211
ArtificialHB.Name = "Heartbeat"
212
213
script:WaitForChild("Heartbeat")
214
215
frame = 1 / 60 
216
tf = 0
217
allowframeloss = true
218
tossremainder = false
219
lastframe = tick()
220
script.Heartbeat:Fire()
221
222
game:GetService("RunService").Heartbeat:connect(function(s, p)
223
    tf = tf + s
224
    if tf >= frame then
225
        if allowframeloss then
226
            script.Heartbeat:Fire()
227
            lastframe = tick()
228
        else
229
            for i = 1, math.floor(tf / frame) do
230
                script.Heartbeat:Fire()
231
            end
232
            lastframe = tick()
233
        end
234
        if tossremainder then
235
            tf = 0
236
        else
237
            tf = tf - frame * math.floor(tf / frame)
238
        end
239
    end
240
end)
241
242
function swait(num)
243
    if num == 0 or num == nil then
244
        ArtificialHB.Event:wait()
245
    else
246
        for i = 0, num do
247
            ArtificialHB.Event:wait()
248
        end
249
    end
250
end
251
 
252
 
253
so = function(id,par,vol,pit) 
254
coroutine.resume(coroutine.create(function()
255
local sou = Instance.new("Sound",par or workspace)
256
sou.Volume=vol
257
sou.Pitch=pit or 1
258
sou.SoundId=id
259
swait() 
260
sou:play() 
261
game:GetService("Debris"):AddItem(sou,6)
262
end))
263
end
264
 
265
function clerp(a,b,t) 
266
local qa = {QuaternionFromCFrame(a)}
267
local qb = {QuaternionFromCFrame(b)} 
268
local ax, ay, az = a.x, a.y, a.z 
269
local bx, by, bz = b.x, b.y, b.z
270
local _t = 1-t
271
return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) 
272
end 
273
 
274
function QuaternionFromCFrame(cf) 
275
local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() 
276
local trace = m00 + m11 + m22 
277
if trace > 0 then 
278
local s = math.sqrt(1 + trace) 
279
local recip = 0.5/s 
280
return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 
281
else 
282
local i = 0 
283
if m11 > m00 then
284
i = 1
285
end
286
if m22 > (i == 0 and m00 or m11) then 
287
i = 2 
288
end 
289
if i == 0 then 
290
local s = math.sqrt(m00-m11-m22+1) 
291
local recip = 0.5/s 
292
return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip 
293
elseif i == 1 then 
294
local s = math.sqrt(m11-m22-m00+1) 
295
local recip = 0.5/s 
296
return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip 
297
elseif i == 2 then 
298
local s = math.sqrt(m22-m00-m11+1) 
299
local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip 
300
end 
301
end 
302
end
303
 
304
function QuaternionToCFrame(px, py, pz, x, y, z, w) 
305
local xs, ys, zs = x + x, y + y, z + z 
306
local wx, wy, wz = w*xs, w*ys, w*zs 
307
local xx = x*xs 
308
local xy = x*ys 
309
local xz = x*zs 
310
local yy = y*ys 
311
local yz = y*zs 
312
local zz = z*zs 
313
return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) 
314
end
315
 
316
function QuaternionSlerp(a, b, t) 
317
local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] 
318
local startInterp, finishInterp; 
319
if cosTheta >= 0.0001 then 
320
if (1 - cosTheta) > 0.0001 then 
321
local theta = math.acos(cosTheta) 
322
local invSinTheta = 1/math.sin(theta) 
323
startInterp = math.sin((1-t)*theta)*invSinTheta 
324
finishInterp = math.sin(t*theta)*invSinTheta  
325
else 
326
startInterp = 1-t 
327
finishInterp = t 
328
end 
329
else 
330
if (1+cosTheta) > 0.0001 then 
331
local theta = math.acos(-cosTheta) 
332
local invSinTheta = 1/math.sin(theta) 
333
startInterp = math.sin((t-1)*theta)*invSinTheta 
334
finishInterp = math.sin(t*theta)*invSinTheta 
335
else 
336
startInterp = t-1 
337
finishInterp = t 
338
end 
339
end 
340
return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp 
341
end
342
343
function rayCast(Pos, Dir, Max, Ignore)  -- Origin Position , Direction, MaxDistance , IgnoreDescendants
344
return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) 
345
end 
346
347
Damagefunc = function(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) --bm1
348
	if hit.Parent == nil then
349
		return
350
	end
351
	local h = hit.Parent:FindFirstChild("Humanoid")
352
	for _, v in pairs(hit.Parent:children()) do
353
		if v:IsA("Humanoid") then
354
			h = v
355
		end
356
	end
357
	if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
358
		if hit.Parent:findFirstChild("DebounceHit") ~= nil then
359
			if hit.Parent.DebounceHit.Value == true then
360
				return
361
			end
362
		end
363
		if h.MaxHealth >= math.huge then
364
			hit:BreakJoints()
365
		end
366
        --[[                if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
367
                        return
368
                end]]
369
--                        hs(hit,1.2) 
370
		local c = Instance.new("ObjectValue")
371
			c.Name = "creator"
372
			c.Value = game:service("Players").LocalPlayer
373
			c.Parent = h
374
		
375
		game:GetService("Debris"):AddItem(c, .5)
376
		if HitSound ~= nil and HitPitch ~= nil then
377
			so(HitSound, hit, 1, HitPitch) 
378
		end
379
		local Damage = math.random(minim, maxim)
380
--                h:TakeDamage(Damage)
381
		local blocked = false
382
		local block = hit.Parent:findFirstChild("Block")
383
		if block ~= nil then
384
			if block.className == "IntValue" then
385
				if block.Value > 0 then
386
					blocked = true
387
					block.Value = block.Value - 1
388
					print(block.Value)
389
				end
390
			end
391
		end
392
		if blocked == false then
393
--                h:TakeDamage(Damage)
394
			h.Health = h.Health - Damage
395
			if Damage ~= 0 then
396
			ShowDamage2((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Institutional white").Color)
397
			end
398
		else
399
			h.Health = h.Health - (Damage / 2)
400
			if Damage ~=0 then
401
			ShowDamage2((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Institutional white").Color)
402
			end
403
		end
404
		if Type == "Knockdown" then
405
			local hum = hit.Parent.Humanoid
406
			hum.PlatformStand = true
407
			coroutine.resume(coroutine.create(function(HHumanoid)
408
				swait(1)
409
				HHumanoid.PlatformStand = false
410
			end), hum)
411
			local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
412
			local bodvol = Instance.new("BodyVelocity")
413
				bodvol.velocity = angle * knockback
414
				bodvol.P = 5000
415
				bodvol.maxForce = Vector3.new(8e+003, 8e+003, 8e+003)
416
				bodvol.Parent = hit
417
			
418
			local rl = Instance.new("BodyAngularVelocity")
419
				rl.P = 3000
420
				rl.maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000
421
				rl.angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
422
				rl.Parent = hit
423
			
424
			game:GetService("Debris"):AddItem(bodvol, .5)
425
			game:GetService("Debris"):AddItem(rl, .5)
426
		elseif Type == "Plat" then
427
			local hum = hit.Parent.Humanoid
428
			hum.PlatformStand = true
429
			coroutine.resume(coroutine.create(function(HHumanoid)
430
				swait(2)
431
				HHumanoid.PlatformStand = false
432
			end), hum)
433
434
			local rl = Instance.new("BodyAngularVelocity")
435
				rl.P = 3000
436
				rl.maxTorque = Vector3.new(100, 100, 100) * 500
437
				rl.angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
438
				rl.Parent = hit
439
				
440
			game:GetService("Debris"):AddItem(rl, .5)
441
		elseif Type == "Normal" then
442
			local vp = Instance.new("BodyVelocity")
443
				vp.P = 500
444
				vp.maxForce = Vector3.new(math.huge, 0, math.huge)
445
				vp.velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
446
			
447
			if knockback > 0 then
448
				vp.Parent = hit.Parent.Torso
449
			end
450
			game:GetService("Debris"):AddItem(vp, .5)
451
		elseif Type == "Up" then
452
			local bodyVelocity = Instance.new("BodyVelocity")
453
				bodyVelocity.velocity = vt(0, 20, 0)
454
				bodyVelocity.P = 5000
455
				bodyVelocity.maxForce = Vector3.new(8e+003, 8e+003, 8e+003)
456
				bodyVelocity.Parent = hit
457
			
458
			game:GetService("Debris"):AddItem(bodyVelocity, .5)
459
		elseif Type == "Snare" then
460
			local bp = Instance.new("BodyPosition")
461
				bp.P = 2000
462
				bp.D = 100
463
				bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
464
				bp.position = hit.Parent.Torso.Position
465
				bp.Parent = hit.Parent.Torso
466
			game:GetService("Debris"):AddItem(bp, 1)
467
468
		elseif Type == "Freeze" then
469
			local BodPos = Instance.new("BodyPosition")
470
				BodPos.P = 50000
471
				BodPos.D = 1000
472
				BodPos.maxForce = Vector3.new(math.huge, math.huge, math.huge)
473
				BodPos.position = hit.Parent.Torso.Position
474
				BodPos.Parent = hit.Parent.Torso
475
			
476
			local BodGy = Instance.new("BodyGyro") 
477
				BodGy.maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge 
478
				BodGy.P = 20e+003
479
				BodGy.Parent = hit.Parent.Torso
480
				BodGy.cframe = hit.Parent.Torso.CFrame
481
			
482
			hit.Parent.Torso.Anchored = true
483
			coroutine.resume(coroutine.create(function(Part) 
484
				swait(1.5)
485
				Part.Anchored = false
486
			end), hit.Parent.Torso)
487
			game:GetService("Debris"):AddItem(BodPos, 3)
488
			game:GetService("Debris"):AddItem(BodGy, 3)
489
		
490
		
491
		        elseif Type=="Target" then
492
                if Targetting==false then
493
                ZTarget=hit.Parent.Torso
494
                coroutine.resume(coroutine.create(function(Part) 
495
                so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)  
496
                swait(5)
497
                so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) 
498
                end),ZTarget)
499
                TargHum=ZTarget.Parent:findFirstChild("Humanoid")
500
                targetgui=Instance.new("BillboardGui")
501
                targetgui.Parent=ZTarget
502
                targetgui.Size=UDim2.new(10,100,10,100)
503
                targ=Instance.new("ImageLabel")
504
                targ.Parent=targetgui
505
                targ.BackgroundTransparency=1
506
                targ.Image="rbxassetid://4834067"
507
                targ.Size=UDim2.new(1,0,1,0)
508
                cam.CameraType="Scriptable"
509
                cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
510
                dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
511
                workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
512
                Targetting=true
513
                RocketTarget=ZTarget
514
                for i=1,Property do
515
                if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
516
                swait()
517
                end
518
                cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
519
                dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
520
                cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
521
                end
522
                Targetting=false
523
                RocketTarget=nil
524
                targetgui.Parent=nil
525
                cam.CameraType="Custom"
526
                end	
527
		end		
528
		
529
		local debounce = Instance.new("BoolValue")
530
		debounce.Name = "DebounceHit"
531
		debounce.Parent = hit.Parent
532
		debounce.Value = true
533
		game:GetService("Debris"):AddItem(debounce, Delay)
534
		c = Instance.new("ObjectValue")
535
		c.Name = "creator"
536
		c.Value = Player
537
		c.Parent = h
538
		game:GetService("Debris"):AddItem(c, .5)
539
	end
540
end
541
542
function ShowDamage2(Pos, Text, Time, Color)
543
	local Rate = (1 / 30)
544
	local Pos = (Pos or Vector3.new(0, 0, 0))
545
	local Text = (Text or "")
546
	local Time = (Time or 2)
547
	local Color = (Color or Color3.new(1, 0, 0))
548
	local EffectPart = part2("Custom", workspace, "Neon", 0, 1, BrickColor.new(Color), "Effect", vt(0, 0, 0))
549
	EffectPart.Anchored = true
550
	local BillboardGui = Instance.new("BillboardGui")
551
		BillboardGui.Size = UDim2.new(3, 0, 3, 0)
552
		BillboardGui.Adornee = EffectPart
553
		BillboardGui.Parent = EffectPart
554
	
555
	local TextLabel = Instance.new("TextLabel")
556
		TextLabel.BackgroundTransparency = 1
557
		TextLabel.Size = UDim2.new(1, 0, 1, 0)
558
		TextLabel.Text = Text
559
		TextLabel.TextColor3 = Color
560
		TextLabel.TextScaled = true
561
		TextLabel.Font = Enum.Font.ArialBold
562
		TextLabel.Parent = BillboardGui
563
	
564
	game.Debris:AddItem(EffectPart, (Time + 0.1))
565
	EffectPart.Parent = game:GetService("Workspace")
566
	delay(0, function()
567
		local Frames = (Time / Rate)
568
		for Frame = 1, Frames do
569
			wait(Rate)
570
			local Percent = (Frame / Frames)
571
			EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
572
			TextLabel.TextTransparency = Percent
573
		end
574
		if EffectPart and EffectPart.Parent then
575
			EffectPart:Destroy()
576
		end
577
	end)
578
end
579
580
function BlastEffect(brickcolor, cframe, x1, y1, z1, x2, y2, z2)
581
	local prt = part2(3, workspace, "Neon", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
582
	prt.Anchored = true
583
	prt.CFrame = cframe
584
	local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1))
585
	coroutine.resume(coroutine.create(function() 
586
		for i = 0, 1, 0.05 do
587
			wait()
588
			prt.Transparency = i
589
			msh.Scale = msh.Scale + vt(x2, y2, z2)
590
		end
591
		prt.Parent = nil
592
	end))
593
end
594
595
function weld(parent, part0, part1, c0, c1)
596
	local Weld = Instance.new("Weld")
597
		Weld.Parent = parent
598
		Weld.Part0 = part0
599
		Weld.Part1 = part1
600
		Weld.C0 = c0
601
		Weld.C1 = c1
602
	
603
	return Weld
604
end
605
606
function MagniDamage(Hit, Part, magni, mindam, maxdam, knock, Type)
607
	for _, c in pairs(workspace:children()) do
608
		local hum = c:findFirstChild("Humanoid")
609
		if hum ~= nil then
610
			local head = c:findFirstChild("Torso")
611
			if head ~= nil then
612
				local targ = head.Position - Part.Position
613
				local mag = targ.magnitude
614
				if mag <= magni and c.Name ~= Player.Name then 
615
					Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, .2, 1, 3)
616
				end
617
			end
618
		end
619
	end
620
end
621
622
function MagicCircle(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
623
	local prt = part2(3, workspace, "Neon", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
624
	prt.Anchored = true
625
	prt.CFrame = cframe
626
	local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
627
	game:GetService("Debris"):AddItem(prt, 2)
628
	coroutine.resume(coroutine.create(function(Part, Mesh) 
629
		for i = 0, 1, delay do
630
			swait()
631
			Part.CFrame = Part.CFrame
632
			Part.Transparency = i
633
			Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
634
		end
635
		Part.Parent = nil
636
	end), prt, msh)
637
end
638
639
function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
640
	local prt=part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt())
641
	prt.Anchored=true
642
	prt.CFrame=cframe
643
	local msh = mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
644
	game:GetService("Debris"):AddItem(prt,2)
645
	coroutine.resume(coroutine.create(function(Part,Mesh) 
646
		for i=0,1,delay do
647
			swait()
648
			Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
649
			Part.Transparency=i
650
			Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
651
		end
652
		Part.Parent=nil
653
	end),prt,msh)
654
end 
655
656
657
	user=game:service'Players'.localPlayer
658
	char=user.Character
659
	mouse=user:GetMouse()
660
	
661
662
local function weldBetween(a, b, name)
663
    local weld = Instance.new("ManualWeld")
664
    weld.Part0 = a
665
    weld.Part1 = b
666
    weld.C0 = CFrame.new()
667
    weld.C1 = b.CFrame:inverse() * a.CFrame
668
    weld.Parent = a
669
	weld.Name=name or 'weldb1'
670
	weld.Parent=m
671
    return weld;
672
end
673
674
675
player=game.Players.localPlayer
676
char=player.Character
677
Effects={}
678
vt=Vector3.new
679
cf=CFrame.new
680
euler=CFrame.fromEulerAnglesXYZ
681
m=Instance.new("Model",char)
682
683
mouse.Button1Down:connect(function()
684
print("NEIN")
685
end)
686
687
local mdel = false
688
689
mouse.KeyDown:connect(function(k)
690
	k=k:lower()
691
	if k=='f' then
692
		if attack==false then
693
			ToggleMemes()
694
		end
695
	end
696
end)
697
698
function ToggleMemes()
699
	if memeing == true and mdel == false then
700
		memeing = false
701
		issprinting=false
702
		Humanoid.WalkSpeed = 16
703
		mdel = true
704
		for i = 1,0,-0.1 do
705
			wait(0.05)
706
			WEEB.Volume = i
707
		end
708
		WEEB.Pitch = 0
709
		mdel = false
710
	elseif memeing == false and mdel == false then
711
		memeing = true
712
		issprinting=true
713
		Humanoid.WalkSpeed=35
714
		WEEB.Pitch = 1
715
		mdel = true
716
		for i = 0,1,.1 do
717
			wait(0.05)
718
			WEEB.Volume = i
719
		end
720
		mdel = false
721
	end
722
end
723
724
local function CFrameFromTopBack(at, top, back)
725
local right = top:Cross(back)
726
return CFrame.new(at.x, at.y, at.z,
727
right.x, top.x, back.x,
728
right.y, top.y, back.y,
729
right.z, top.z, back.z)
730
end
731
732
function Triangle(a, b, c)
733
local edg1 = (c-a):Dot((b-a).unit)
734
local edg2 = (a-b):Dot((c-b).unit)
735
local edg3 = (b-c):Dot((a-c).unit)
736
if edg1 <= (b-a).magnitude and edg1 >= 0 then
737
a, b, c = a, b, c
738
elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
739
a, b, c = b, c, a
740
elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
741
a, b, c = c, a, b
742
else
743
assert(false, "unreachable")
744
end
745
 
746
local len1 = (c-a):Dot((b-a).unit)
747
local len2 = (b-a).magnitude - len1
748
local width = (a + (b-a).unit*len1 - c).magnitude
749
 
750
local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
751
 
752
local list = {}
753
 
754
if len1 > 0.01 then
755
local w1 = Instance.new('WedgePart', m)
756
game:GetService("Debris"):AddItem(w1,5)
757
w1.Material = "SmoothPlastic"
758
w1.FormFactor = 'Custom'
759
w1.BrickColor = TorsoColor
760
w1.Transparency = 0
761
w1.Reflectance = 0
762
w1.Material = "SmoothPlastic"
763
w1.CanCollide = false
764
NoOutline(w1)
765
local sz = Vector3.new(0.2, width, len1)
766
w1.Size = sz
767
local sp = Instance.new("SpecialMesh",w1)
768
sp.MeshType = "Wedge"
769
sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
770
w1:BreakJoints()
771
w1.Anchored = true
772
w1.Parent = workspace
773
w1.Transparency = 0.7
774
table.insert(Effects,{w1,"Disappear",.01})
775
w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
776
table.insert(list,w1)
777
end
778
 
779
if len2 > 0.01 then
780
local w2 = Instance.new('WedgePart', m)
781
game:GetService("Debris"):AddItem(w2,5)
782
w2.Material = "SmoothPlastic"
783
w2.FormFactor = 'Custom'
784
w2.BrickColor = TorsoColor
785
w2.Transparency = 0
786
w2.Reflectance = 0
787
w2.Material = "SmoothPlastic"
788
w2.CanCollide = false
789
NoOutline(w2)
790
local sz = Vector3.new(0.2, width, len2)
791
w2.Size = sz
792
local sp = Instance.new("SpecialMesh",w2)
793
sp.MeshType = "Wedge"
794
sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
795
w2:BreakJoints()
796
w2.Anchored = true
797
w2.Parent = workspace
798
w2.Transparency = 0.7
799
table.insert(Effects,{w2,"Disappear",.01})
800
w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
801
table.insert(list,w2)
802
end
803
return unpack(list)
804
end
805
806
function NoOutline(Part)
807
Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
808
end
809
810
local sine = 0
811
local change = 1
812
local val = 0
813
814
if #Effects>0 then
815
--table.insert(Effects,{prt,"Block1",delay})
816
for e=1,#Effects do
817
if Effects[e]~=nil then
818
--for j=1,#Effects[e] do
819
local Thing=Effects[e]
820
if Thing~=nil then
821
local Part=Thing[1]
822
local Mode=Thing[2]
823
local Delay=Thing[3]
824
local IncX=Thing[4]
825
local IncY=Thing[5]
826
local IncZ=Thing[6]
827
if Thing[1].Transparency<=1 then
828
if Thing[2]=="Block1" then
829
Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
830
Mesh=Thing[1].Mesh
831
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
832
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
833
elseif Thing[2]=="Cylinder" then
834
Mesh=Thing[1].Mesh
835
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
836
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
837
elseif Thing[2]=="Blood" then
838
Mesh=Thing[1].Mesh
839
Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
840
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
841
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
842
elseif Thing[2]=="Elec" then
843
Mesh=Thing[1].Mesh
844
Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
845
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
846
elseif Thing[2]=="Disappear" then
847
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
848
end
849
else
850
Part.Parent=nil
851
table.remove(Effects,e)
852
end
853
end
854
--end
855
end
856
end
857
end
858
859
cn = CFrame.new
860
local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
861
local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
862
local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
863
local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
864
865
local mananum=0
866
while true do
867
swait()
868
sine = sine + change
869
local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude 
870
local velderp=RootPart.Velocity.y
871
hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
872
if equipped==true or equipped==false then
873
if attack==false then
874
idle=idle+1
875
else
876
idle=0
877
end
878
if idle>=500 then
879
if attack==false then
880
--Sheath()
881
end
882
end
883
if RootPart.Velocity.y > 1 and hitfloor==nil then 
884
Anim="Jump"
885
if attack==false then
886
Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.3)
887
Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
888
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
889
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,0.5),.3)
890
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
891
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-0.5),.3)
892
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
893
RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.3)
894
LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.3)
895
end
896
elseif RootPart.Velocity.y < -1 and hitfloor==nil then 
897
Anim="Fall"
898
if attack==false then
899
Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3)
900
Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
901
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
902
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0.3,0,0.2),.3)
903
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
904
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0.3,0,-0.2),.3)
905
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
906
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.3)
907
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.3)
908
end
909
elseif torvel<1 and hitfloor~=nil then
910
Anim="Idle"
911
if attack==false then
912
RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .3)
913
Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .3)
914
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(5 + 3 * math.cos(sine / 25))), 0.3)
915
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5 - 3 * math.cos(sine / 25))), 0.3)
916
RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 2 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .3)
917
LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 2 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .3)
918
end
919
elseif torvel>2 and torvel<22 and hitfloor~=nil then
920
Anim="Walk"
921
if attack==false then
922
RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 5)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 10))), .2)
923
Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(-5 * math.cos(sine / 10)) + RootPart.RotVelocity.Y / 15), .2)
924
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10 * math.cos(sine / 13)), math.rad(0), math.rad(4 * math.cos(sine / 13))), .2)
925
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10 * math.cos(sine / 13)), math.rad(0), math.rad(4 * math.cos(sine / 13))), .2)
926
RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 7))), .3)
927
LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 7))), .3)
928
end
929
elseif torvel>=22 and issprinting==true and hitfloor~=nil then
930
Anim="Run"
931
if attack==false then
932
RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0.5, -0.05 + .1 * 2.5 * math.cos(sine / 2)) * angles(math.rad(50), math.rad(2) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 2))), .2)
933
Torso.Neck.C0 = clerp(Torso.Neck.C0, cn(0, 1.1, -0.2, -1, -0, -0, 0, 0, 1, 0, 1, 0) * angles(math.rad(-50), math.rad(0), math.rad(-5 * math.cos(sine / 10)) + RootPart.RotVelocity.Y / 15), .2)
934
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.4) * angles(math.rad(75 * math.cos(6 / 2)), math.rad(-5), math.rad(25 * math.cos(sine / 3))), .2)
935
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0.4) * angles(math.rad(75 * math.cos(6 / 2)), math.rad(5), math.rad(25 * math.cos(sine / 3))), .2)
936
RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(55 * math.cos(sine / 3))), .3)
937
LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(55 * math.cos(sine / 3))), .3)
938
end
939
end
940
end
941
end