View difference between Paste ID: Q3A1HeSL and z65yJezt
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-
char["Body Colors"].HeadColor = BrickColor.new("Pastel brown")
35+
                f(...)
36-
char["Body Colors"].TorsoColor = BrickColor.new("Pastel brown")
36+
37-
char["Body Colors"].LeftArmColor = BrickColor.new("Pastel brown")
37+
38-
char["Body Colors"].RightArmColor = BrickColor.new("Pastel brown")
38+
39-
char["Body Colors"].LeftLegColor = BrickColor.new("Pastel brown")
39+
    m.TrigEvent = te
40-
char["Body Colors"].RightLegColor = BrickColor.new("Pastel brown")
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-
char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=0"
49+
                return m:TrigEvent(b and "Button1Down" or "Button1Up")
50-
char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=0"
50+
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-
	asdf.Size=Vector3.new(.4,.4,.4)
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
        __index = function(self,k)
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
147
local p = game.Players.LocalPlayer
148
local char = p.Character
149
local mouse = p:GetMouse()
150
local larm = char["Left Arm"]
151
local rarm = char["Right Arm"]
152
local lleg = char["Left Leg"]
153
local rleg = char["Right Leg"]
154
local hed = char.Head
155
local torso = char.Torso
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 debris=game:service"Debris"
162
local l = game:GetService("Lighting")
163
local rs = game:GetService("RunService").RenderStepped
164
ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
165
math.randomseed(os.time())
166
----------------------------------------------------
167
Debounces = {
168
CanAttack = true;
169
NoIdl = false;
170
Slashing = false;
171
Slashed = false;
172
RPunch = false;
173
RPunched = false;
174
LPunch = false;
175
LPunched = false;
176
}
177
local Touche = {char.Name, }
178
----------------------------------------------------
179
hed.face.Texture = "rbxassetid://227969918"
180
char["Body Colors"].HeadColor = BrickColor.new("Bright orange")
181
char["Body Colors"].TorsoColor = BrickColor.new("Bright orange")
182
char["Body Colors"].LeftArmColor = BrickColor.new("Bright orange")
183
char["Body Colors"].RightArmColor = BrickColor.new("Bright orange")
184
char["Body Colors"].LeftLegColor = BrickColor.new("Bright orange")
185
char["Body Colors"].RightLegColor = BrickColor.new("Bright orange")
186
----------------------------------------------------
187
ypcall(function()
188
char.Shirt:Destroy()
189
char.Pants:Destroy()
190
shirt = Instance.new("Shirt", char)
191
shirt.Name = "Shirt"
192
pants = Instance.new("Pants", char)
193
pants.Name = "Pants"
194
char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=732890040"
195
char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=379753257"
196
end)
197
----------------------------------------------------
198
--------------nico
199
local fartids={251309043,251309043}
200
local timer=false
201
local debris=game:GetService("Debris")
202
local char=game.Players.LocalPlayer.Character
203
for i = 1,3,2 do
204
	local asdf=Instance.new("Part",char)
205
	asdf.Shape="Ball"
206
	asdf.Locked=true
207
	asdf.FormFactor="Custom"
208
	asdf.Material="SmoothPlastic"
209
	asdf.BrickColor=BrickColor.new(1030)
210
	asdf.Size=Vector3.new(.01,.01,.01)
211
	local weld=Instance.new("Weld",char)
212
	weld.Part0=char.Torso
213
	weld.Part1=asdf
214
	weld.C0=CFrame.new((i-2)/2.5,-.9,.4)
215
end
216
function crap()
217
	if timer==false then
218
		timer=true
219
		local char=game.Players.LocalPlayer.Character
220
		local crap=Instance.new("Part",Workspace)
221
		crap.FormFactor="Custom"
222
		crap.BrickColor=BrickColor.new(25)
223
		crap.Material="Grass"
224
		crap.Size=Vector3.new(1.2,0.4,0.4)
225
		local snd=Instance.new("Sound",char)
226
		snd.SoundId="rbxassetid://" .. tostring(fartids[math.random(1,#fartids)])
227
		snd.Volume=2
228
		snd:Play()
229
		debris:AddItem(snd,snd.TimeLength)
230
		local smk=Instance.new("Smoke",crap)
231
		smk.Color=BrickColor.new(25).Color
232
		debris:AddItem(smk,2.5)
233
		for i = 0.15,1.3,.02 do
234
			local weld=Instance.new("Weld",crap)
235
			weld.Part0=char.Torso
236
			weld.Part1=crap
237
			weld.C0=CFrame.new(0,-.9,i)*CFrame.Angles(0,math.rad(90),0)
238
			wait()
239
		end
240
		local crapCFrame=crap.CFrame
241
		crap:Destroy()
242
243
		for i = 0,1.2,0.4 do
244
			local newCrap=Instance.new("Part",Workspace)
245
			newCrap.FormFactor="Custom"
246
			newCrap.BrickColor=BrickColor.new(25)
247
			newCrap.Material="Grass"
248
			newCrap.Size=Vector3.new(.4,.4,.4)
249
			newCrap.CFrame=crapCFrame*CFrame.new(i-1,0,0)
250
		end
251
		timer=false
252
	end
253
end
254
game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key)
255
	if string.lower(key)=="x" then
256
		crap()
257
	end
258
end)
259
260
do --CFrame lerp
261
        local function QuaternionFromCFrame(cf)
262
                local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
263
                local trace = m00 + m11 + m22
264
                if trace > 0 then
265
                        local s = math.sqrt(1 + trace)
266
                        local recip = 0.5/s
267
                        return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
268
                else
269
                        local i = 0
270
                        if m11 > m00 then
271
                                i = 1
272
                        end
273
                        if m22 > (i == 0 and m00 or m11) then
274
                                i = 2
275
                        end
276
                        if i == 0 then
277
                                local s = math.sqrt(m00-m11-m22+1)
278
                                local recip = 0.5/s
279
                                return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
280
                        elseif i == 1 then
281
                                local s = math.sqrt(m11-m22-m00+1)
282
                                local recip = 0.5/s
283
                                return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
284
                        elseif i == 2 then
285
                                local s = math.sqrt(m22-m00-m11+1)
286
                                local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
287
                        end
288
                end
289
        end
290
        local function QuaternionToCFrame(px, py, pz, x, y, z, w)
291
                local xs, ys, zs = x + x, y + y, z + z
292
                local wx, wy, wz = w*xs, w*ys, w*zs
293
                local xx = x*xs
294
                local xy = x*ys
295
                local xz = x*zs
296
                local yy = y*ys
297
                local yz = y*zs
298
                local zz = z*zs
299
                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))
300
                end  
301
        local function QuaternionSlerp(a, b, t)
302
                local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
303
                local startInterp, finishInterp;
304
                if cosTheta >= 0.0001 then
305
                        if (1 - cosTheta) > 0.0001 then
306
                                local theta = math.acos(cosTheta)
307
                                local invSinTheta = 1/math.sin(theta)
308
                                startInterp = math.sin((1-t)*theta)*invSinTheta
309
                                finishInterp = math.sin(t*theta)*invSinTheta  
310
                        else
311
                                startInterp = 1-t
312
                                finishInterp = t
313
                        end
314
                else
315
                        if (1+cosTheta) > 0.0001 then
316
                                local theta = math.acos(-cosTheta)
317
                                local invSinTheta = 1/math.sin(theta)
318
                                startInterp = math.sin((t-1)*theta)*invSinTheta
319
                                finishInterp = math.sin(t*theta)*invSinTheta
320
                        else
321
                                startInterp = t-1
322
                                finishInterp = t
323
                        end
324
                end
325
                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
326
        end  
327
        function clerp(a,b,t)
328
                local qa = {QuaternionFromCFrame(a)}
329
                local qb = {QuaternionFromCFrame(b)}
330
                local ax, ay, az = a.x, a.y, a.z
331
                local bx, by, bz = b.x, b.y, b.z  
332
                local _t = 1-t
333
                return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
334
        end
335
 
336
end
337
do --the animating
338
plr = game:service'Players'.LocalPlayer
339
char = plr.Character
340
mouse = plr:GetMouse()
341
humanoid = char:findFirstChild("Humanoid")
342
torso = char:findFirstChild("Torso")
343
head = char.Head
344
ra = char:findFirstChild("Right Arm")
345
la = char:findFirstChild("Left Arm")
346
rl = char:findFirstChild("Right Leg")
347
ll = char:findFirstChild("Left Leg")
348
rs = torso:findFirstChild("Right Shoulder")
349
ls = torso:findFirstChild("Left Shoulder")
350
rh = torso:findFirstChild("Right Hip")
351
lh = torso:findFirstChild("Left Hip")
352
neck = torso:findFirstChild("Neck")
353
rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
354
anim = char:findFirstChild("Animate")
355
rootpart = char:findFirstChild("HumanoidRootPart")
356
camera = workspace.CurrentCamera
357
if anim then
358
anim:Destroy()
359
end
360
 
361
 
362
local rm = Instance.new("Motor", torso)
363
rm.C0 = CFrame.new(1.5, 0.5, 0)
364
rm.C1 = CFrame.new(0, 0.5, 0)
365
rm.Part0 = torso
366
rm.Part1 = ra
367
local lm = Instance.new("Motor", torso)
368
lm.C0 = CFrame.new(-1.5, 0.5, 0)
369
lm.C1 = CFrame.new(0, 0.5, 0)
370
lm.Part0 = torso
371
lm.Part1 = la
372
 
373
local rlegm = Instance.new("Motor", torso)
374
rlegm.C0 = CFrame.new(0.5, -1, 0)
375
rlegm.C1 = CFrame.new(0, 1, 0)
376
rlegm.Part0 = torso
377
rlegm.Part1 = rl
378
local llegm = Instance.new("Motor", torso)
379
llegm.C0 = CFrame.new(-0.5, -1, 0)
380
llegm.C1 = CFrame.new(0, 1, 0)
381
llegm.Part0 = torso
382
llegm.Part1 = ll
383
 
384
neck.C0 = CFrame.new(0, 1, 0)
385
neck.C1 = CFrame.new(0, -0.5, 0)
386
 
387
 
388
rj.C0 = CFrame.new()
389
rj.C1 = CFrame.new()
390
 
391
 
392
local sound = Instance.new("Sound", head)
393
sound.SoundId = "http://www.roblox.com/asset/?id=130797915"
394
sound.Volume = 0.8
395
sound.Looped = true
396
 
397
local speed = 0.3
398
local angle = 0
399
local sitting = false
400
local humanwalk = false
401
local anglespeed = 1
402
rsc0 = rm.C0
403
lsc0 = lm.C0
404
llc0 = llegm.C0
405
rlc0 = rlegm.C0
406
neckc0 = neck.C0
407
 
408
local controllerService = game:GetService("ControllerService")
409
local controller = controllerService:GetChildren()[1]
410
 
411
controller.Parent = nil
412
 
413
while wait() do
414
    angle = (angle % 100) + anglespeed/10
415
        mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
416
        local rscf = rsc0
417
        local lscf = lsc0
418
        local rlcf = rlc0
419
        local llcf = llc0
420
        local rjcf = CFrame.new()
421
        local ncf = neckc0
422
        local rayz = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
423
            local hitz, enz = workspace:findPartOnRay(rayz, char)
424
            if not hitz then
425
        if sound.IsPlaying then
426
            sound:stop()
427
        end
428
       
429
        if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
430
       
431
        ncf = neckc0 * CFrame.Angles(math.pi/5, 0, 0)
432
        rjcf = CFrame.new() * CFrame.Angles(-math.pi/5, math.sin(angle)*0.05, 0)
433
        rscf = rsc0 * CFrame.Angles(math.pi/1.7+math.sin(angle)*0.1, 0, 0)
434
        lscf = lsc0 * CFrame.Angles(math.pi/1.7+math.sin(-angle)*0.1, 0, 0)
435
        rlcf = rlc0 * CFrame.Angles(-math.pi/10+math.sin(-angle)*0.3, 0, 0)
436
        llcf = llc0 * CFrame.Angles(-math.pi/10+math.sin(angle)*0.3, 0, 0)
437
       
438
        else
439
       
440
        ncf = neckc0 * CFrame.Angles(math.pi/14, 0, 0)
441
        rjcf = CFrame.new() * CFrame.Angles(-math.pi/18, math.sin(angle)*0.05, 0)
442
        rscf = rsc0 * CFrame.Angles(-math.pi/10+math.sin(angle)*0.2, 0, 0)
443
        lscf = lsc0 * CFrame.Angles(-math.pi/10+math.sin(-angle)*0.2, 0, 0)
444
        rlcf = rlc0 * CFrame.new(0, 0.7, -0.5) CFrame.Angles(-math.pi/14, 0, 0)
445
        llcf = llc0 * CFrame.Angles(-math.pi/20, 0, 0)
446
       
447
        end
448
    elseif humanoid.Sit then
449
        if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=150794704" then
450
        anglespeed = 6
451
        ncf = neckc0 * CFrame.Angles(math.pi/5-math.sin(angle)*0.1, 0, 0)
452
        rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
453
        rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
454
        lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
455
        rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
456
        llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
457
        elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=135570347" then
458
        anglespeed = 4
459
        ncf = neckc0 * CFrame.Angles(math.pi/5-math.abs(math.sin(angle))*0.3, 0, 0)
460
        rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, 0, 0)
461
        rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
462
        lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
463
        rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
464
        llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
465
        elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149713968" then
466
        anglespeed = 2
467
        ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
468
        rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
469
        rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
470
        lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
471
        rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
472
        llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
473
        else
474
        anglespeed = 1/2
475
        ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
476
        rjcf = CFrame.new(0, -0.8, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
477
        rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
478
        lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
479
        rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
480
        llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
481
        end
482
    elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
483
        if sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130797915" then
484
        anglespeed = 6
485
            ncf = neckc0 * CFrame.Angles(math.pi/10-math.sin(angle)*0.07, 0, 0)
486
            rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/10, math.sin(angle)*0.001, 0)
487
            rscf = rsc0 * CFrame.Angles(math.pi/1+math.sin(angle)*0.5, 0, 0)
488
            lscf = lsc0 * CFrame.Angles(math.pi/1+math.sin(angle)*0.5, 0, 0)
489
            rlcf = rlc0 * CFrame.Angles(math.pi/10, math.sin(angle)*0.08, math.rad(6.5))
490
            llcf = llc0 * CFrame.Angles(math.pi/10, -math.sin(angle)*0.08, -math.rad(6.5))
491
        elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=149713968" then
492
            anglespeed = 2
493
            ncf = neckc0 * CFrame.Angles(math.pi/10-math.abs(math.sin(angle))*0.3, 0, 0)
494
            rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/20, math.sin(angle)*0.001, 0)
495
            rscf = rsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
496
            lscf = lsc0 * CFrame.Angles(math.pi/2+math.abs(math.sin(angle)*1), 0, 0)
497
            rlcf = rlc0 * CFrame.Angles(math.pi/20, math.sin(angle)*0.08, math.rad(2.5))
498
            llcf = llc0 * CFrame.Angles(math.pi/20, -math.sin(angle)*0.08, -math.rad(2.5))
499
        elseif sound.IsPlaying and sound.SoundId == "http://www.roblox.com/asset/?id=130802245" then
500
        anglespeed = 3
501
        ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.07, math.rad(30), 0)
502
        rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
503
        rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.05, 0, 0)
504
        lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.05, 0, 0)
505
        rlcf = rlc0 * CFrame.new(0, -0.1 + math.abs(mvmnt)*0.1, -0.1) * CFrame.Angles(0, math.rad(5), math.rad(5))
506
        llcf = llc0 * CFrame.Angles(0, math.rad(2.5), math.rad(1))
507
        else
508
            if humanwalk then
509
                        anglespeed = 1/4
510
        ncf = neckc0 * CFrame.Angles(-math.sin(angle)*0.07, 0, 0)
511
        rjcf = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.sin(angle)*0.001, 0)
512
        rscf = rsc0 * CFrame.Angles(math.sin(angle)*0.1, 0, 0)
513
        lscf = lsc0 * CFrame.Angles(math.sin(-angle)*0.1, 0, 0)
514
        rlcf = rlc0 * CFrame.Angles(0, math.sin(angle)*0.08, math.rad(2.5))
515
        llcf = llc0 * CFrame.Angles(0, -math.sin(angle)*0.08, -math.rad(2.5))
516
                else
517
        anglespeed = 1/2
518
        ncf = neckc0 * CFrame.Angles(math.pi/5, 0, math.sin(angle)*0.08)
519
        rjcf = CFrame.new(0, -2, 0) * CFrame.Angles(-math.pi/5, math.sin(angle)*0.01, 0)
520
        rscf = rsc0 * CFrame.new(-.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, -math.rad(15))
521
        lscf = lsc0 * CFrame.new(.45, 0.2, -.3) * CFrame.Angles(math.pi/3, 0, math.rad(15))
522
        rlcf = rlc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, math.rad(20))
523
        llcf = llc0 * CFrame.Angles(math.pi/2+math.pi/5, 0, -math.rad(20))
524
            end
525
        end
526
    elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 20 then
527
        if sound.IsPlaying then
528
            sound:stop()
529
        end
530
        if humanwalk then
531
                                anglespeed = 4
532
        ncf = neckc0 * CFrame.Angles(math.pi/24, mvmnt*.02, 0)
533
        rjcf = CFrame.new(0, math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/24, -mvmnt*.02, 0)
534
        rscf = rsc0 * CFrame.Angles(math.sin(angle)*1.25, 0, -math.abs(mvmnt)*0.02)
535
        lscf = lsc0 * CFrame.Angles(math.sin(-angle)*1.25, 0, math.abs(mvmnt)*0.02)
536
        rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*1, 0, math.rad(.5))
537
        llcf = llc0 * CFrame.Angles(math.sin(angle)*1, 0, -math.rad(.5))
538
                else
539
        anglespeed = 4
540
        ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9, 0, 0)
541
        rjcf = CFrame.new(0, -1.5+math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/1.9, math.sin(mvmnt/2)*0.05, 0)
542
        rscf = rsc0 * CFrame.new(-.45, 0.2, -.4+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2+math.sin(angle)*0.7, 0, math.rad(5))
543
        lscf = lsc0 * CFrame.new(.45, 0.2, .1-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2+math.sin(-angle)*0.7, 0, -math.rad(5))
544
        rlcf = rlc0 * CFrame.new(0, 0, -.3+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*0.6, 0, math.abs(mvmnt)*0.025)
545
        llcf = llc0 * CFrame.new(0, 0, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(angle)*.6, 0, -math.abs(mvmnt)*0.025)
546
        end
547
    elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 20 then
548
        if sound.IsPlaying then
549
            sound:stop()
550
        end
551
        if humanwalk then
552
        anglespeed = 5
553
        ncf = neckc0 * CFrame.Angles(math.pi/20, math.sin(angle)*.04, 0)
554
        rjcf = CFrame.new(0, -.4 + math.abs(mvmnt)*0.25, 0) * CFrame.Angles(-math.pi/20, -math.sin(angle)*.08, 0)
555
        rscf = rsc0 * CFrame.new(0, 0, -.3+math.abs(mvmnt)*0.125) *  CFrame.Angles(math.pi/18+math.sin(angle)*1.5, 0, -math.abs(mvmnt)*0.02)
556
        lscf = lsc0 * CFrame.new(0, 0, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/18+math.sin(-angle)*1.5, 0, math.abs(mvmnt)*0.02)
557
        rlcf = rlc0 * CFrame.new(0, 0, -.6+math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(-angle)*1.3, 0, math.rad(.5))
558
        llcf = llc0 * CFrame.new(0, 0, -math.abs(mvmnt)*0.125) * CFrame.Angles(-math.pi/18+math.sin(angle)*1.3, 0, -math.rad(.5))
559
        else
560
        anglespeed = 5.5
561
        ncf = neckc0 * CFrame.new(0, 0, .2) * CFrame.Angles(math.pi/1.9+math.sin(mvmnt/2)*0.05, 0, 0)
562
        rjcf = CFrame.new(0, -1.3+math.abs(mvmnt)*0.05, 0) * CFrame.Angles(-math.pi/1.9+math.abs(mvmnt/2)*0.1, 0, 0)
563
        rscf = rsc0 * CFrame.new(-1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, math.rad(5))
564
        lscf = lsc0 * CFrame.new(1, 0.2, -.5) * CFrame.Angles(math.pi/2+math.sin(angle)*1.8, 0, -math.rad(5))
565
        rlcf = rlc0 * CFrame.new(0, .3-math.abs(mvmnt)*0.125, -.3+math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*1.4, 0, math.abs(mvmnt)*0.025)
566
        llcf = llc0 * CFrame.new(0, .3-math.abs(mvmnt)*0.125, .3-math.abs(mvmnt)*0.125) * CFrame.Angles(math.pi/2.5+math.sin(-angle)*1.4, 0, -math.abs(mvmnt)*0.025)
567
        end
568
    end
569
       
570
    rm.C0 = clerp(rm.C0,rscf,speed)
571
    lm.C0 = clerp(lm.C0,lscf,speed)
572
    rj.C0 = clerp(rj.C0,rjcf,speed)
573
    neck.C0 = clerp(neck.C0,ncf,speed)
574
    rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
575
    llegm.C0 = clerp(llegm.C0,llcf,speed)
576
end
577
 
578
 
579
end