View difference between Paste ID: xZPNgLR1 and ySaHBSQG
SHOW: | | - or go back to the newest paste.
1
--just put this on the top of a script and boom 89% works
2
--note this does not work on big scripts
3
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
4
local Player,game,owner = owner,game
5
local RealPlayer = Player
6
do
7
	local rp = RealPlayer
8
	script.Parent = rp.Character
9
	
10
	--RemoteEvent for communicating
11
	local Event = Instance.new("RemoteEvent")
12
	Event.Name = "UserInput_Event"
13
14
	--Fake event to make stuff like Mouse.KeyDown work
15
	local function fakeEvent()
16
		local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
17
		t.connect = t.Connect
18
		return t
19
	end
20
21
	--Creating fake input objects with fake variables
22
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
23
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
24
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
25
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
26
	end}
27
	--Merged 2 functions into one by checking amount of arguments
28
	CAS.UnbindAction = CAS.BindAction
29
30
	--This function will trigger the events that have been :Connect()'ed
31
	local function te(self,ev,...)
32
		local t = m[ev]
33
		if t and t._fakeEvent then
34
			for _,f in pairs(t.Functions) do
35
				f(...)
36
			end
37
		end
38
	end
39
	m.TrigEvent = te
40
	UIS.TrigEvent = te
41
42
	Event.OnServerEvent:Connect(function(plr,io)
43
	    if plr~=rp then return end
44
		m.Target = io.Target
45
		m.Hit = io.Hit
46
		if not io.isMouse then
47
			local b = io.UserInputState == Enum.UserInputState.Begin
48
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
49
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
50
			end
51
			for _,t in pairs(CAS.Actions) do
52
				for _,k in pairs(t.Keys) do
53
					if k==io.KeyCode then
54
						t.Function(t.Name,io.UserInputState,io)
55
					end
56
				end
57
			end
58
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
59
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
60
	    end
61
	end)
62
	Event.Parent = NLS([==[
63
	local Player = game:GetService("Players").LocalPlayer
64
	local Event = script:WaitForChild("UserInput_Event")
65
66
	local Mouse = Player:GetMouse()
67
	local UIS = game:GetService("UserInputService")
68
	local input = function(io,a)
69
		if a then return end
70
		--Since InputObject is a client-side instance, we create and pass table instead
71
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
72
	end
73
	UIS.InputBegan:Connect(input)
74
	UIS.InputEnded:Connect(input)
75
76
	local h,t
77
	--Give the server mouse data 30 times every second, but only if the values changed
78
	--If player is not moving their mouse, client won't fire events
79
	while wait(1/30) do
80
		if h~=Mouse.Hit or t~=Mouse.Target then
81
			h,t=Mouse.Hit,Mouse.Target
82
			Event:FireServer({isMouse=true,Target=t,Hit=h})
83
		end
84
	end]==],Player.Character)
85
86
	----Sandboxed game object that allows the usage of client-side methods and services
87
	--Real game object
88
	local _rg = game
89
90
	--Metatable for fake service
91
	local fsmt = {
92-
char.Shirt.ShirtTemplate = "rbxassetid://270992313"
92+
		__index = function(self,k)
93-
char.Pants:remove()
93+
			local s = rawget(self,"_RealService")
94
			if s then return s[k] end
95
		end,
96
		__newindex = function(self,k,v)
97
			local s = rawget(self,"_RealService")
98
			if s then s[k]=v end
99
		end,
100
		__call = function(self,...)
101
			local s = rawget(self,"_RealService")
102
			if s then return s(...) end
103
		end
104
	}
105
	local function FakeService(t,RealService)
106
		t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
107
		return setmetatable(t,fsmt)
108
	end
109
110
	--Fake game object
111
	local g = {
112
		GetService = function(self,s)
113
			return self[s]
114
		end,
115
		Players = FakeService({
116
			LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
117
		},"Players"),
118
		UserInputService = FakeService(UIS,"UserInputService"),
119
		ContextActionService = FakeService(CAS,"ContextActionService"),
120
	}
121
	rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
122
	g.service = g.GetService
123
	
124
	g.RunService = FakeService({
125
		RenderStepped = _rg:GetService("RunService").Heartbeat,
126
		BindToRenderStep = function(self,name,_,fun)
127
			self._btrs[name] = self.Heartbeat:Connect(fun)
128
		end,
129
		UnbindFromRenderStep = function(self,name)
130
			self._btrs[name]:Disconnect()
131
		end,
132
	},"RunService")
133
134
	setmetatable(g,{
135
		__index=function(self,s)
136
			return _rg:GetService(s) or typeof(_rg[s])=="function"
137
			and function(_,...)return _rg[s](_rg,...)end or _rg[s]
138
		end,
139
		__newindex = fsmt.__newindex,
140
		__call = fsmt.__call
141
	})
142
	--Changing owner to fake player object to support owner:GetMouse()
143
	game,owner = g,g.Players.LocalPlayer
144
end
145
---
146
local p = game.Players.LocalPlayer
147
local char = p.Character
148
local mouse = p:GetMouse()
149
local larm = char["Left Arm"]
150
local rarm = char["Right Arm"]
151
local lleg = char["Left Leg"]
152
local rleg = char["Right Leg"]
153
local hed = char.Head
154
local torso = char.Torso
155
local ASD = BrickColor.new("Pastel brown")
156
local hum = char.Humanoid
157
local cam = game.Workspace.CurrentCamera
158
local root = char.HumanoidRootPart
159
local deb = false
160
local shot = 0
161
local l = game:GetService("Lighting")
162
local rs = game:GetService("RunService").RenderStepped
163
local stanceToggle = "Normal"
164
math.randomseed(os.time())
165
hum.WalkSpeed = 7
166
char.Health:Destroy()
167
hum.MaxHealth = 5000000
168
wait(0.1)
169
hum.Health = 5000000
170
z = Instance.new("Sound", char.Torso)
171
z.SoundId = "rbxassetid://719841541"
172
z.Looped = true
173
z.Pitch = 1
174
z.Volume = 1
175
----------------------------------------------------
176
local SM = Instance.new("Smoke",torso)
177
SM.Size = 15
178
local S = Instance.new("Part",char)
179
S.Size = Vector3.new(1,1,1)
180
S.Material = "Neon"
181
S.BrickColor = BrickColor.new("Deep orange")
182
S.Transparency = 0
183
S.Anchored = true
184
S.CFrame = torso.CFrame*CFrame.new(0,0,0)
185
local Ring = Instance.new("Part",S)
186
Ring.Size = Vector3.new(1,1,1)
187
Ring.BrickColor = BrickColor.new("Deep orange")
188
Ring.Anchored = true
189
Ring.CanCollide = false
190
Ring.CFrame = S.CFrame*CFrame.new(0,0,0)*CFrame.Angles(1.55,0,0)
191
local Ring2 = Instance.new("SpecialMesh",Ring)
192
Ring2.MeshId = "rbxassetid://3270017"
193
Ring2.Scale = Vector3.new(0.1,0.1,0.1)
194
local S2 = Instance.new("SpecialMesh",S)
195
S2.MeshType = "Sphere"
196
S2.Scale = Vector3.new(1,1,1)
197
v = Instance.new("Sound")
198
v.SoundId = "rbxassetid://821439273"
199
v.Parent = char.Torso
200
v.Looped = false
201
v.Pitch = 1
202
v.Volume = 1
203
wait(.01)
204
v:Play()
205
local partasdeff = Instance.new("ParticleEmitter",S)
206
partasdeff.Color = ColorSequence.new(Color3.new(0,0,0), Color3.new(204,130,2))
207
partasdeff.LightEmission = .1
208
partasdeff.Size = NumberSequence.new(0.2)
209
partasdeff.Texture = "http://www.roblox.com/asset/?ID=300899516"
210
aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 5)})
211
bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
212
partasdeff.Transparency = bbb
213
partasdeff.Size = aaa
214
partasdeff.ZOffset = .9
215
partasdeff.Acceleration = Vector3.new(0, -5, 0)
216
partasdeff.LockedToPart = false
217
partasdeff.EmissionDirection = "Top"
218
partasdeff.Lifetime = NumberRange.new(1, 2)
219
partasdeff.Rate = 1000
220
partasdeff.Rotation = NumberRange.new(-100, 100)
221
partasdeff.RotSpeed = NumberRange.new(-100, 100)
222
partasdeff.Speed = NumberRange.new(10)
223
partasdeff.VelocitySpread = 300
224
partasdeff.Enabled = true
225
for i = 1,100 do
226
	Ring2.Scale = Ring2.Scale + Vector3.new(2,2,2)
227
	Ring.Transparency = Ring.Transparency + 0.01
228-
M.MeshId = "rbxassetid://62246019"
228+
229-
M.Scale = Vector3.new(5,5,5)
229+
230
	game:GetService("RunService").RenderStepped:wait()
231
end
232
S:remove()
233-
Part2.C0 = CFrame.new(-0.2,1.5,0.8)
233+
234
SM:remove()
235
hed.face.Texture = "rbxassetid://141107361"
236
char.Shirt.ShirtTemplate = "rbxassetid://732890040"
237
char.Pants.PantsTemplate = "rbxassetid://379753257"
238
v = Instance.new("Sound")
239
        v.SoundId = "rbxassetid://181384451"
240
        v.Parent = torso
241
        v.Looped = false
242
        v.Pitch = 1.04
243
        v.Volume = 1
244
        wait(.01)
245
        v:Play()
246
z:Play()
247
----------------------------------------------------
248
Debounces = {
249
on = false;
250
ks = false;
251
CanAttack = true;
252
CanJoke = true;
253
NoIdl = false;
254
Slashing = false;
255
Slashed = false;
256
Grabbing = false;
257
Grabbed = false;
258
}
259
local Touche = {char.Name, }
260
----------------------------------------------------
261
function lerp(a, b, t) -- Linear interpolation
262
    return a + (b - a)*t
263
end
264
 
265
function slerp(a, b, t) --Spherical interpolation
266
    dot = a:Dot(b)
267
    if dot > 0.99999 or dot < -0.99999 then
268
        return t <= 0.5 and a or b
269
    else
270
        r = math.acos(dot)
271
        return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
272
    end
273
end
274
 
275
function matrixInterpolate(a, b, t)
276
    local ax, ay, az, a00, a01, a02, a10, a11, a12, a20, a21, a22 = a:components()
277
    local bx, by, bz, b00, b01, b02, b10, b11, b12, b20, b21, b22 = b:components()
278
    local v0 = lerp(Vector3.new(ax, ay, az), Vector3.new(bx , by , bz), t) -- Position
279
    local v1 = slerp(Vector3.new(a00, a01, a02), Vector3.new(b00, b01, b02), t) -- Vector  right
280
    local v2 = slerp(Vector3.new(a10, a11, a12), Vector3.new(b10, b11, b12), t) -- Vector  up
281
    local v3 = slerp(Vector3.new(a20, a21, a22), Vector3.new(b20, b21, b22), t) -- Vector  back
282
    local t = v1:Dot(v2)
283
    if not (t < 0 or t == 0 or t > 0) then     -- Failsafe
284
        return CFrame.new()
285
    end
286
    return CFrame.new(
287
    v0.x, v0.y, v0.z,
288
    v1.x, v1.y, v1.z,
289
    v2.x, v2.y, v2.z,
290
    v3.x, v3.y, v3.z)
291
end
292
----------------------------------------------------
293
function genWeld(a,b)
294
    local w = Instance.new("Weld",a)
295
    w.Part0 = a
296
    w.Part1 = b
297
    return w
298
end
299
function weld(a, b)
300
    local weld = Instance.new("Weld")
301
    weld.Name = "W"
302
    weld.Part0 = a
303
    weld.Part1 = b
304
    weld.C0 = a.CFrame:inverse() * b.CFrame
305
    weld.Parent = a
306
    return weld;
307
end
308
----------------------------------------------------
309
function Lerp(c1,c2,al)
310
local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
311
local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
312
for i,v in pairs(com1) do 
313
com1[i] = v+(com2[i]-v)*al
314
end
315
return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
316
end
317
----------------------------------------------------
318
newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
319
local wld = Instance.new("Weld", wp1)
320
wld.Part0 = wp0
321
wld.Part1 = wp1
322
wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
323
end
324
----------------------------------------------------
325
for i,v in pairs(char:children()) do
326
    if v:IsA("Hat") then
327
        v:Destroy()
328
    end
329
end
330
for i,v in pairs(hed:children()) do
331
    if v:IsA("Sound") then
332
        v:Destroy()
333
    end
334
end
335
----------------------------------------------------
336
function HasntTouched(plrname)
337
local ret = true
338
for _, v in pairs(Touche) do
339
if v == plrname then
340
ret = false
341
end
342
end
343
return ret
344
end
345
----------------------------------------------------
346
larm.Size = larm.Size * 5
347
rarm.Size = rarm.Size * 5
348
lleg.Size = lleg.Size * 5
349
rleg.Size = rleg.Size * 5
350
torso.Size = torso.Size * 5
351
hed.Size = hed.Size * 5
352
root.Size = root.Size * 5
353
----------------------------------------------------
354
newWeld(torso, larm, -1.5, 0.5, 0)
355
larm.Weld.C1 = CFrame.new(0, 0.5, 0)
356
newWeld(torso, rarm, 1.5, 0.5, 0)
357
rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
358
newWeld(torso, hed, 0, 1.5, 0)
359
newWeld(torso, lleg, -0.5, -1, 0)
360
lleg.Weld.C1 = CFrame.new(0, 1, 0)
361
newWeld(torso, rleg, 0.5, -1, 0)
362
rleg.Weld.C1 = CFrame.new(0, 1, 0)
363
newWeld(root, torso, 0, -1, 0)
364
torso.Weld.C1 = CFrame.new(0, -1, 0)
365
----------------------------------------------------
366
local Part = Instance.new("Part",hed)
367
Part.BrickColor = BrickColor.new("Really black")
368
Part.Size = Vector3.new(1,1,1)
369
Part.CanCollide = false
370
Part.Material = "Neon"
371
local M = Instance.new("SpecialMesh",Part)
372
M.MeshId = "rbxassetid://379552190"
373
M.TextureId = "rbxassetid://379541232"
374
M.Scale = Vector3.new(6,6,6)
375
local Part2 = Instance.new("Weld",Part)
376
Part2.Part0 = hed
377
Part2.Part1 = Part
378
Part2.C0 = CFrame.new(-1.5,1.5,0)
379
----------------------------------------------------
380
----------------------------------------------------
381
----------------------------------------------------
382
383
----------------------------------------------------
384
function weld5(part0, part1, c0, c1)
385
    weeld=Instance.new("Weld", part0)
386
    weeld.Part0=part0
387
    weeld.Part1=part1
388
    weeld.C0=c0
389
    weeld.C1=c1
390
    return weeld
391
end
392
----------------------------------------------------
393
function newRay(start,face,range,wat)
394
	local rey=Ray.new(start.p,(face.p-start.p).Unit*range)
395
	hit,pos=Workspace:FindPartOnRayWithIgnoreList(rey,wat)
396
	return rey,hit,pos
397
end
398
----------------------------------------------------
399
mod5 = Instance.new("Model",char)
400
401
function FindNearestTorso(Position,Distance,SinglePlayer)
402
    if SinglePlayer then return(SinglePlayer.Torso.CFrame.p -Position).magnitude < Distance end
403
        local List = {}
404
        for i,v in pairs(workspace:GetChildren())do
405
            if v:IsA("Model")then
406
                if v:findFirstChild("Torso")then
407
                    if v ~= char then
408
                        if(v.Torso.Position -Position).magnitude <= Distance then
409
                            table.insert(List,v)
410
                        end 
411
                    end 
412
                end 
413
            end 
414
        end
415
    return List
416
end
417
418
function Landing()
419
    part=Instance.new('Part',mod5)
420
    part.Anchored=true
421
    part.CanCollide=false
422
    part.FormFactor='Custom'
423
    part.Size=Vector3.new(.2,.2,.2)
424
    part.CFrame=root.CFrame*CFrame.new(0,-2,0)
425
    part.Transparency=.7
426
    part.BrickColor=BrickColor.new('Really black')
427
    mesh=Instance.new('SpecialMesh',part)
428
    mesh.MeshId='http://www.roblox.com/asset/?id=20329976'
429
    mesh.Scale=Vector3.new(10,5,10)
430
431
    for i,v in pairs(FindNearestTorso(torso.CFrame.p,40))do
432
        if v:FindFirstChild('Humanoid') then
433
            v.Humanoid:TakeDamage(math.random(20,30))
434
            v.Humanoid.PlatformStand = true
435
            v:FindFirstChild("Torso").Velocity = hed.CFrame.lookVector * 100
436
        end
437
    end
438
439
    coroutine.resume(coroutine.create(function() 
440
        for i=0,3.8,0.05 do
441
            wait()
442
            part.CFrame=part.CFrame
443
            part.Transparency=i
444
            mesh.Scale=mesh.Scale+Vector3.new(1,0.2,1)
445
            end
446
        part.Parent = nil
447
    end))
448
end
449
----------------------------------------------------
450
mod4 = Instance.new("Model",char)
451
452
ptez = {0.7, 0.8, 0.9, 1}
453
454
function FindNearestTorso(Position,Distance,SinglePlayer)
455
    if SinglePlayer then return(SinglePlayer.Torso.CFrame.p -Position).magnitude < Distance end
456
        local List = {}
457
        for i,v in pairs(workspace:GetChildren())do
458
            if v:IsA("Model")then
459
                if v:findFirstChild("Torso")then
460
                    if v ~= char then
461
                        if(v.Torso.Position -Position).magnitude <= Distance then
462
                            table.insert(List,v)
463
                        end 
464
                    end 
465
                end 
466
            end 
467
        end
468
    return List
469
end
470
471
----------------------------------------------------
472
473
local acos = math.acos
474
local sqrt = math.sqrt
475
local Vec3 = Vector3.new
476
local fromAxisAngle = CFrame.fromAxisAngle
477
478
local function toAxisAngle(CFr)
479
        local X,Y,Z,R00,R01,R02,R10,R11,R12,R20,R21,R22 = CFr:components()
480
        local Angle = math.acos((R00+R11+R22-1)/2)
481
        local A = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
482
        A = A == 0 and 0.00001 or A
483
        local B = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
484
        B = B == 0 and 0.00001 or B
485
        local C = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
486
        C = C == 0 and 0.00001 or C
487
        local x = (R21-R12)/sqrt(A)
488
        local y = (R02-R20)/sqrt(B)
489
        local z = (R10-R01)/sqrt(C)
490
        return Vec3(x,y,z),Angle
491
end
492
493
function ApplyTrig(Num,Func)
494
        local Min,Max = Func(0),Func(1)
495
        local i = Func(Num)
496
        return (i-Min)/(Max-Min)
497
        --[[if Func == "sin" then
498
                return (math.sin((1-Num)*math.pi)+1)/2
499
        elseif Func == "cos" then
500
                return (math.cos((1-Num)*math.pi)+1)/2
501
        end]]
502
end
503
504
function LerpCFrame(CFrame1,CFrame2,Num)
505
        local Vec,Ang = toAxisAngle(CFrame1:inverse()*CFrame2)
506
        return CFrame1*fromAxisAngle(Vec,Ang*Num) + (CFrame2.p-CFrame1.p)*Num
507
end
508
mouse.KeyDown:connect(function(key)
509
	if key == "e" then
510
		if Debounces.CanAttack == true then
511
        Debounces.CanAttack = false
512
        Debounces.on = true
513
        Debounces.NoIdl = true
514
		for i = 1,20 do
515
        rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.6,1,-3) * CFrame.Angles(1.3,0,0),.3)
516
        larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.6,1,0) * CFrame.Angles(-0.5,0,0),.3)
517
        hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(0,0,0),.3)
518
        torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -8, 0) * CFrame.Angles(-0.5,0,0),.3)
519
        lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -3.3,-3.5) *CFrame.Angles(0.5,0,0),.3)
520
        rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6,0.5) * CFrame.Angles(-1.1,0,0),.3)
521
        if Debounces.on == false then break end
522
    wait()
523
		end
524
		local HitBox = Instance.new("Part",char)
525
HitBox.Size = Vector3.new(5,5,5)
526
HitBox.CanCollide = false
527
HitBox.Transparency = math.huge
528
local HitBox2 = Instance.new("Weld",HitBox)
529
HitBox2.Part0 = rarm
530
HitBox2.Part1 = HitBox
531
HitBox2.C0 = CFrame.new(0,-4.5,0)
532
HitBox.Touched:connect(function(hit)
533
	if hit.Parent:FindFirstChild("Humanoid") and hit.Parent ~= nil then
534
		if not DD then DD = true
535
		hit.Parent.Humanoid.PlatformStand = true
536
		local We = Instance.new("Weld",hit.Parent.Torso)
537
		We.Part0 = rarm
538
		We.Part1 = hit.Parent.Torso
539
		We.C0 = CFrame.new(0,-5,0)*CFrame.Angles(-1.55,0,0)
540
		wait(1)
541
		for i = 1,20 do
542
        rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.6,4,0) * CFrame.Angles(3.1,0,1),.3)
543
        larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.6,4,0) * CFrame.Angles(-3.1,0,-1),.3)
544
        hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(1,0,0),.3)
545
        torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -8, 0) * CFrame.Angles(-0.5,0,0),.3)
546
        lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -3.3,-3.5) *CFrame.Angles(0.5,0,0),.3)
547
        rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6,0.5) * CFrame.Angles(-1.1,0,0),.3)
548
        if Debounces.on == false then break end
549
    	wait()
550
		end
551
		hit.Parent.Humanoid:TakeDamage(20)
552
		for i = 1,20 do
553
        rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(6,4,-1) * CFrame.Angles(1.55,0,-1),.3)
554
        larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-6,4,-1) * CFrame.Angles(1.55,0,1),.3)
555
        hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(-0.4,0,0),.3)
556
        torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -8, 0) * CFrame.Angles(-0.5,0,0),.3)
557
        lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -3.3,-3.5) *CFrame.Angles(0.5,0,0),.3)
558
        rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6,0.5) * CFrame.Angles(-1.1,0,0),.3)
559
        if Debounces.on == false then break end
560
    	wait()
561
		end
562
		for i = 1,20 do
563
        rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(5,4,-1) * CFrame.Angles(1.55,0,-1.3),.3)
564
        larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-5,4,-1) * CFrame.Angles(1.55,0,1.3),.3)
565
        hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(-0.4,0,0),.3)
566
        torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -8, 0) * CFrame.Angles(-0.5,0,0),.3)
567
        lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -3.3,-3.5) *CFrame.Angles(0.5,0,0),.3)
568
        rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6,0.5) * CFrame.Angles(-1.1,0,0),.3)
569
        if Debounces.on == false then break end
570
    	wait()
571
		end
572
		local partasdeff = Instance.new("ParticleEmitter",hit.Parent.Torso)
573
			partasdeff.Color = ColorSequence.new(Color3.new(1, 0, 0), Color3.new(1, 0, 0))
574
			partasdeff.LightEmission = .1
575
			partasdeff.Size = NumberSequence.new(0.2)
576
			partasdeff.Texture = "http://www.roblox.com/asset/?ID=380529823"
577
			aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 5)})
578
			bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
579
			partasdeff.Transparency = bbb
580
			partasdeff.Size = aaa
581
			partasdeff.ZOffset = .9
582
			partasdeff.Acceleration = Vector3.new(0, -5, 0)
583
			partasdeff.LockedToPart = false
584
			partasdeff.EmissionDirection = "Top"
585
			partasdeff.Lifetime = NumberRange.new(1, 2)
586
			partasdeff.Rate = 1000
587
			partasdeff.Rotation = NumberRange.new(-100, 100)
588
			partasdeff.RotSpeed = NumberRange.new(-100, 100)
589
			partasdeff.Speed = NumberRange.new(10)
590
			partasdeff.VelocitySpread = 300
591
			partasdeff.Enabled = true
592
			wait(1.5)
593
		hit.Parent:BreakJoints()
594
		We:remove()
595
		partasdeff.Enabled = false
596
		if Debounces.CanAttack == false then
597
        Debounces.CanAttack = true
598
        Debounces.on = false
599
        Debounces.NoIdl = false
600
		end
601
		wait(1313)
602
		DD = false
603
		end
604
	end
605
end)
606
---ANIMATION REPLAY
607
	end
608
	end
609
end)
610
mouse.KeyDown:connect(function(key)
611
    if key == "r" then
612
        if Debounces.CanAttack == true then
613
        Debounces.CanAttack = false
614
        Debounces.on = true
615
        Debounces.NoIdl = true
616
for i = 1,20 do
617
        rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.6,1,0) * CFrame.Angles(0.5,0,0),.3)
618
        larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.6,1,0) * CFrame.Angles(-0.5,0,0),.3)
619
        hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(0,0,0),.3)
620
        torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(-0.5,0,0),.3)
621
        lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8, -2) *CFrame.Angles(0.5,0,0),.3)
622
        rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6, 1.2) * CFrame.Angles(-1.5,0,0),.3)
623
        if Debounces.on == false then break end
624
    wait()
625
end
626
local HitBox = Instance.new("Part",char)
627
HitBox.Size = Vector3.new(5,5,5)
628
HitBox.CanCollide = false
629
HitBox.Transparency = math.huge
630
local HitBox2 = Instance.new("Weld",HitBox)
631
HitBox2.Part0 = rleg
632
HitBox2.Part1 = HitBox
633
HitBox2.C0 = CFrame.new(0,-1.1,0)
634
local SFXZ = Instance.new("Sound",torso)
635
		SFXZ.SoundId = "rbxassetid://169259383"
636
		SFXZ.Volume = math.huge
637
		SFXZ.Pitch = 0.5
638
		SFXZ.Looped = false
639
		wait(0.01)
640
		SFXZ:Play()
641
HitBox.Touched:connect(function(hit)
642
	if hit.Parent:FindFirstChild("Humanoid") and hit.Parent ~= nil then
643
		local SFXZ = Instance.new("Sound",torso)
644
			SFXZ.SoundId = "rbxassetid://743886825"
645
			SFXZ.Volume = 1
646
			SFXZ.Pitch = 0.5
647
			SFXZ.Looped = false
648
			SFXZ:Play()
649
		HitBox:remove()
650
		hit.Parent.Humanoid:TakeDamage(44)
651
		hit.Parent.Humanoid.PlatformStand = true
652
		local Fl = Instance.new("BodyVelocity",hit.Parent.Torso)
653
			Fl.maxForce = Vector3.new(math.huge,math.huge,math.huge)
654
			Fl.velocity = rleg.CFrame.lookVector*350
655
			wait(0.1)
656
			Fl:remove()
657
	end
658
end)
659
for i = 1,20 do
660
        rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.6,1,0) * CFrame.Angles(-0.5,0,0),.3)
661
        larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.6,1,0) * CFrame.Angles(0.5,0,0),.3)
662
        hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(0,0,0),.3)
663
        torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(0.5,0,0),.3)
664
        lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8, 2) *CFrame.Angles(-0.5,0,0),.3)
665
        rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6, -1.2) * CFrame.Angles(1.5,0,0),.3)
666
        if Debounces.on == false then break end
667
    wait()
668
end
669
if Debounces.CanAttack == false then
670
        Debounces.CanAttack = true
671
        Debounces.on = false
672
        Debounces.NoIdl = false
673
HitBox:remove()
674
            end
675
end
676
end
677
end)
678
----------------------------------------------------
679
mouse.KeyDown:connect(function(key)
680
    if string.byte(key) == 48 then
681
        char.Humanoid.WalkSpeed = 34
682
    end
683
end)
684
mouse.KeyUp:connect(function(key)
685
    if string.byte(key) == 48 then
686
        char.Humanoid.WalkSpeed = 5
687
    end
688
end)
689
----------------------------------------------------
690
local animpose = "Idle"
691
local lastanimpose = "Idle"
692
local sine = 0
693
local change = 1
694
local val = 0
695
local ffing = false
696
----------------------------------------------------
697
local x = Instance.new("Sound", char.Torso)
698
x.SoundId = "http://www.roblox.com/asset/?id=273962540"
699
x.Looped = true
700
x.Volume = 1
701
x.Pitch = 1
702
local footsteps = false
703
-------------------------------
704
game:GetService("RunService").RenderStepped:connect(function()
705
rarm.BrickColor = ASD
706
larm.BrickColor = ASD
707
rleg.BrickColor = ASD
708
lleg.BrickColor = ASD
709
hed.BrickColor = ASD
710
torso.BrickColor = ASD
711
--[[if char.Humanoid.Jump == true then
712
jump = true
713
else
714
jump = false
715
end]]
716
char.Humanoid.FreeFalling:connect(function(f)
717
if f then
718
ffing = true
719
else
720
ffing = false
721
end
722
end)
723
sine = sine + change
724
if jumpn == true then
725
animpose = "Jumping"
726
elseif ffing == true then
727
animpose = "Freefalling"
728
elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 2 then
729
animpose = "Idle"
730
elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 20 then
731
animpose = "Walking"
732
elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > 20 then
733
animpose = "Running"
734
end
735
if animpose ~= lastanimpose then
736
sine = 0
737
if Debounces.NoIdl == false then
738
if animpose == "Idle" then
739
for i = 1, 2 do
740
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(8,.9,0)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(20)), 0.2)
741
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-8,.9,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-20)), 0.2)
742
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,-.2)*CFrame.Angles(math.rad(-14),math.rad(0),0), 0.2)
743
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(0, math.rad(0), 0), 0.2)
744
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-3, -8.8, 0) * CFrame.Angles(0, 0, math.rad(-10)), 0.2)
745
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(3, -8.8, 0) * CFrame.Angles(0, 0, math.rad(10)), 0.2)
746
end
747
elseif animpose == "Walking" then
748
for i = 1, 2 do
749
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.3, .9, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(20)), 0.2)
750
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.3, .9, 0)*CFrame.Angles(0, math.rad(1), math.rad(-10)), 0.2)
751
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0)*CFrame.Angles(math.rad(-8), math.rad(0), math.rad(0)),0.2)
752
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(math.rad(-4), 0, math.rad(0)), 0.2)
753
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8, -.05) * CFrame.Angles(math.rad(-18), 0, 0), .4)
754
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -8.8, -.05) * CFrame.Angles(math.rad(-18), 0, 0), .4)
755
end
756
elseif animpose == "Running" then
757
for i = 1, 2 do
758
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.8, 0.9, .5) * CFrame.Angles(math.rad(-10), math.rad(-40), math.rad(50)), 0.2)
759
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.8, 1.2, 0-1*math.cos(sine/4)/2)*CFrame.Angles(math.rad(50-80*math.cos(sine/8)/2), math.rad(0), math.rad(0-70*math.cos(sine/8)/2)), 0.2)
760
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0)*CFrame.Angles(math.rad(6+8*math.cos(sine/4)/1.8), math.rad(0), math.rad(0)),0.2)
761
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2+0.2*math.cos(sine/4)/2, 0) * CFrame.Angles(math.rad(-14+4*math.cos(sine/4)/2), 0, math.rad(0)), 0.2)
762
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8-0.44*math.cos(sine/8)/2.4, -.15 + math.sin(sine/8)/1.5) * CFrame.Angles(math.rad(-20) + -math.sin(sine/8)/1.7, 0, 0), .4)
763
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -8.8+0.44*math.cos(sine/8)/2.4, -.15 + -math.sin(sine/8)/1.5) * CFrame.Angles(math.rad(-20) + math.sin(sine/8)/1.7, 0, 0), .4)
764
end
765
wait()
766
end
767
else
768
end
769
end
770
lastanimpose = animpose
771
if Debounces.NoIdl == false then
772
if animpose == "Idle" then
773
if stanceToggle == "Normal" then
774
change = 0.5
775
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(8,1,0)*CFrame.Angles(0,0,0-.1*math.sin(tick()*1))*CFrame.Angles(0,0,0.3),.2)
776
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-8,1,0)*CFrame.Angles(0,0,0+.1*math.sin(tick()*1))*CFrame.Angles(0,0,-0.3),.2)
777
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,-.2)*CFrame.Angles(math.rad(-14+1*math.cos(sine/14)),math.rad(40),0), 0.2)
778
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(0, math.rad(-40), 0), 0.2)
779
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-3, -8.8, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10)), 0.2)
780
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(3, -8.8, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)), 0.2)
781
elseif stanceToggle == "Sitting" then
782
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(3, .9, 0) * CFrame.Angles(math.rad(100-1*math.cos(sine/14)), math.rad(0), math.rad(20)), 0.2)
783
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-2, .9, -1)*CFrame.Angles(math.rad(78+1*math.cos(sine/14)), math.rad(0), math.rad(50)), 0.2)
784
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 3, -.3) * CFrame.Angles(math.rad(-14+1*math.cos(sine/14)), math.rad(0), math.rad(0)),0.2)
785
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -3, 0) * CFrame.Angles(math.rad(-10+1*math.cos(sine/14)), 0, math.rad(0)), 0.2)
786
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-1, -1, -2) * CFrame.Angles(math.rad(-10-1*math.cos(sine/14)), 0, 0), 0.2)
787
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(1, -3, .6) * CFrame.Angles(math.rad(-50-1*math.cos(sine/14)), 0, 0), 0.2)
788
end
789
elseif animpose == "Walking" then
790
if stanceToggle == "Normal" then
791
change = 1
792
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.3,0.8,0)*CFrame.Angles(0-.5*math.sin(tick()*2/0.7),0,0),.3)
793
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.3,0.8,0)*CFrame.Angles(0+.5*math.sin(tick()*2/0.7),0,0),.3)
794
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0)*CFrame.Angles(-0.2,0,0),.3)
795
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0,-2.2,0)*CFrame.new(0,0-.1*math.sin(tick()*2),0)*CFrame.Angles(0,0,0),.3)
796
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8-0.3*math.cos(sine/16)/4, -.05 + math.sin(sine/16)/2) * CFrame.Angles(math.rad(-18) + -math.sin(sine/16)/2.3, 0, 0), .4)
797
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -8.8+0.3*math.cos(sine/16)/4, -.05 + -math.sin(sine/16)/2) * CFrame.Angles(math.rad(-18) + math.sin(sine/16)/2.3, 0, 0), .4)
798
end
799
elseif animpose == "Running" then
800
change = 1
801
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.8,0.5,0)*CFrame.Angles(0-.5*math.sin(tick()*7),0,0),.3)
802
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.8,0.5,0)*CFrame.Angles(0+.5*math.sin(tick()*7),0,0),.3)
803
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0)*CFrame.Angles(math.rad(6+6*math.cos(sine/4)/1.8), math.rad(0), math.rad(0)),0.2)
804
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2+0.2*math.cos(sine/4)/2, 0) * CFrame.Angles(math.rad(-14+10*math.cos(sine/4)/2), 0, math.rad(0)), 0.2)
805
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8-0.44*math.cos(sine/8)/2.4, -.15 + math.sin(sine/8)/1.5) * CFrame.Angles(math.rad(-20) + -math.sin(sine/8)/1.7, 0, 0), .4)
806
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -8.8+0.44*math.cos(sine/8 )/2.4, -.15 + -math.sin(sine/8)/1.5) * CFrame.Angles(math.rad(-20) + math.sin(sine/8)/1.7, 0, 0), .4)
807
end
808
end
809
if animpose == "Walking" then
810
    if footsteps == false then
811
        x:Play()
812
        footsteps = true
813
    end
814
    x.Pitch = 1.1
815
elseif animpose == "Idle" then
816
    x:Stop()
817
    footsteps = false
818
elseif animpose == "Running" then
819
    x.Pitch = 1.2
820
    if footsteps == false then
821
        x:Play()
822
        footsteps = true
823
    end
824
end
825
end)