View difference between Paste ID: yC4Wd7aE and uknpx1B5
SHOW: | | - or go back to the newest paste.
1
-- This script has been converted to FE by iPxter
2
3
4
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6
do
7
	print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
8
	script.Parent = Player.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,Connect=function(self,f)self.Function=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 and t.Function then
34
			t.Function(...)
35
		end
36
	end
37
	m.TrigEvent = te
38
	UIS.TrigEvent = te
39
40
	Event.OnServerEvent:Connect(function(plr,io)
41
	    if plr~=Player then return end
42
		if io.isMouse then
43
			m.Target = io.Target
44
			m.Hit = io.Hit
45
		else
46
			local b = io.UserInputState == Enum.UserInputState.Begin
47
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
48
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
49
			end
50
			for _,t in pairs(CAS.Actions) do
51
				for _,k in pairs(t.Keys) do
52
					if k==io.KeyCode then
53
						t.Function(t.Name,io.UserInputState,io)
54
					end
55
				end
56
			end
57
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
58
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
59
	    end
60
	end)
61
	Event.Parent = NLS([==[
62
	local Player = game:GetService("Players").LocalPlayer
63
	local Event = script:WaitForChild("UserInput_Event")
64
65
	local UIS = game:GetService("UserInputService")
66
	local input = function(io,a)
67
		if a then return end
68
		--Since InputObject is a client-side instance, we create and pass table instead
69
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
70
	end
71
	UIS.InputBegan:Connect(input)
72
	UIS.InputEnded:Connect(input)
73
74
	local Mouse = Player:GetMouse()
75
	local h,t
76
	--Give the server mouse data 30 times every second, but only if the values changed
77
	--If player is not moving their mouse, client won't fire events
78
	while wait(1/30) do
79
		if h~=Mouse.Hit or t~=Mouse.Target then
80
			h,t=Mouse.Hit,Mouse.Target
81
			Event:FireServer({isMouse=true,Target=t,Hit=h})
82
		end
83
	end]==],Player.Character)
84
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
85
end
86
87-
local plr = game.Players.LocalPlayer
87+
local plr = owner
88
local chr = plr.Character
89
local PGui=plr.PlayerGui
90
local lleg = chr["Left Leg"]
91
local rleg = chr["Right Leg"]
92
local larm = chr["Left Arm"]
93
local rarm = chr["Right Arm"]
94
local hed = chr.Head
95
local rutprt = chr.HumanoidRootPart
96
local torso = chr.Torso
97
local otheranims=false
98
local armmovement=false
99
chr.Animate.Disabled=true
100
local RunSpeed=36
101
local WlkSpeed=18
102
local runnin=false
103
local tik=0
104
local rollvalue=0
105
local swimming=false
106
local fldb={['w']=false,['a']=false,['s']=false,['d']=false}
107
local jumpval=0
108
local idlerollv=0
109
110
local BallColor=torso.BrickColor
111
local BallTransparency=0
112
local BallReflectance=0
113
local BallMaterial="Neon"
114
115
116
117
coroutine.wrap(function()
118
for i,x in pairs(hed:GetChildren()) do if x:IsA('Sound') then x:Destroy() end end end)()
119
function Lerp(a, b, i)
120
local com1 = {a.X, a.Y, a.Z, a:toEulerAnglesXYZ()}
121
local com2 = {b.X, b.Y, b.Z, b:toEulerAnglesXYZ()}
122
local calx = com1[1] + (com2[1] - com1[1]) * i
123
local caly = com1[2] + (com2[2] - com1[2]) * i
124
local calz = com1[3] + (com2[3] - com1[3]) * i
125
local cala = com1[4] + (com2[4] - com1[4]) * i
126
local calb = com1[5] + (com2[5] - com1[5]) * i
127
local calc = com1[6] + (com2[6] - com1[6]) * i
128
return CFrame.new(calx, caly, calz) * CFrame.Angles(cala, calb, calc)
129
end
130
function TwnSingleNumber(s,f,m)
131
local wot=s+(f-s)*m
132
return wot
133
end
134
function TwnVector3(q,w,e)
135
local begin={q.x,q.y,q.z}
136
local ending={w.x,w.y,w.z}
137
local bgx=begin[1]+(ending[1]-begin[1])*e
138
local bgy=begin[2]+(ending[2]-begin[2])*e
139
local bgz=begin[3]+(ending[3]-begin[3])*e
140
return Vector3.new(bgx,bgy,bgz)
141
end
142
newWeld = function(wld, wp0, wp1, wc0x, wc0y, wc0z)
143
wld = Instance.new("Weld", wp1)
144
wld.Part0 = wp0
145
wld.Part1 = wp1
146
wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
147
end
148
function Avg(a, b)
149
return CFrame.new((a.X+b.X)/2,(a.Y+b.Y)/2,(a.Z+b.Z)/2)
150
end
151
152
local jump=Instance.new('Sound',rutprt)
153
jump.Volume=.2
154
jump.Pitch=1
155
jump.SoundId='http://www.roblox.com/asset?id=170588191'
156
157
newWeld(law, torso, larm, -1.5, 0.5, 0)
158
newWeld(raw, torso, rarm, 1.5, 0.5, 0)
159
newWeld(llw, torso, lleg, -.5, -2, 0)
160
newWeld(rlw, torso, rleg, .5, -2, 0)
161
newWeld(hw, torso, hed, 0, 1.5, 0)
162
local rutwald=Instance.new('Weld',rutprt)
163
rutwald.Part0=rutprt
164
rutwald.Part1=torso
165
larm.Weld.C1 = CFrame.new(0, 0.5, 0)
166
rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
167
rleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
168
lleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
169
170
local anim = "Idling"
171
local lastanim = "Idling"
172
local val = 0
173
local syne = 0
174
local num = 0
175
local runtime = 0
176
177
mouse.KeyDown:connect(function(kei)
178
if string.byte(kei)==48 and not otheranims and not sitting and not disabled then
179
runnin=true
180
end
181
if kei=='w' then fldb.w=true end
182
if kei=='a' then fldb.a=true end
183
if kei=='s' then fldb.s=true end
184
if kei=='d' then fldb.d=true end
185
end)
186
mouse.KeyUp:connect(function(kei)
187
if string.byte(kei)==48 and not otheranims and not sitting and not disabled then
188
runnin=false
189
end
190
if kei=='w' then fldb.w=false end
191
if kei=='a' then fldb.a=false end
192
if kei=='s' then fldb.s=false end
193
if kei=='d' then fldb.d=false end
194
end)
195
196
local bawl=Instance.new("Part",torso)
197
bawl.formFactor="Custom"
198
bawl.Shape="Ball"
199
bawl.BrickColor=(BallColor or torso.BrickColor)
200
bawl.Material=BallMaterial
201
bawl.Transparency=(BallTransparency or 0)
202
bawl.Reflectance=(BallReflectance or 0)
203
bawl.Size=Vector3.new(5.35,5.35,5.35)
204
bawl.TopSurface=10
205
bawl.BottomSurface=10
206
bawl.LeftSurface=10
207
bawl.RightSurface=10
208
bawl.FrontSurface=10
209
bawl.BackSurface=10
210
bawl.Anchored=false
211
bawl:breakJoints''
212
bawl.Locked=true
213
bawl.CanCollide=true
214
--[[local bawlmesh=Instance.new("SpecialMesh",bawl)
215
bawlmesh.MeshId="http://www.roblox.com/asset/?id=1527559"
216
--bawlmesh.TextureId="http://www.roblox.com/asset?id=25701026"
217
bawlmesh.Scale=Vector3.new(2.35,2.35,2.35)]]
218
local bawllight=Instance.new("PointLight",bawl)
219
bawllight.Brightness=1
220
bawllight.Range=15
221
bawllight.Color=bawl.BrickColor.Color
222
bawllight.Shadows=true
223
local bawlweld=Instance.new("Weld",bawl)
224
bawlweld.Part0=rutprt
225
bawlweld.Part1=bawl
226
bawlweld.C1=CFrame.new(0,0,0)
227
rutprt.Weld.C1=CFrame.new(0,-bawl.Size.y,0)*CFrame.Angles(math.rad(0),math.rad(0),0)
228
229
chr.Humanoid.Swimming:connect(function(speedpls)
230
if speedpls>=5 and not otheranims and not disabled and not sitting then
231
swimming=true
232
anim="Swimming"
233
elseif speedpls<5 and not otheranims and not disabled and not sitting then
234
swimming=false
235
end
236
end)
237
238
coroutine.resume(coroutine.create(function()
239
while true do
240
if trailing then
241
local Ray=Ray.new(rutprt.CFrame.p,(rutprt.CFrame.p-(rutprt.CFrame*CFrame.new(0,-2,0)).p).unit*-5)
242
local hitbrick,hitposition=Workspace:FindPartOnRay(Ray,chr)
243
if hitbrick and hitposition then
244
local splash=Instance.new("Part",bawl)
245
splash.Anchored=true
246
splash.CanCollide=false
247
splash.Transparency=0
248
splash.formFactor="Custom"
249
splash.BrickColor=hitbrick.BrickColor
250
splash.Size=Vector3.new(2,2,2)
251
game:service'Debris':AddItem(splash,2)
252
splash.CFrame=CFrame.new(hitposition)*CFrame.Angles(math.random(1,3),math.random(1,3),math.random(1,3))
253
local splm=Instance.new("BlockMesh",splash)
254
coroutine.wrap(function()
255
for a=0,1,.05 do 
256
splm.Scale=Vector3.new(a,a,a) splash.Transparency=splash.Transparency+.05 splash.CFrame=splash.CFrame+Vector3.new(0,.05,0) wait'' end
257
end)()
258
end
259
wait''
260
else
261
wait''
262
end
263
end
264
end))
265
266
game:service'RunService'.Stepped:connect(function()
267
syne=syne+1
268
if not otheranims and not swimming then
269
if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 1 and not dnc and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
270
anim="Idling"
271
272
elseif (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude > 1 and (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude < RunSpeed-5 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
273
anim="Walking"
274
dnc=false
275
276
elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > RunSpeed-10 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
277
anim="Sprinting"
278
dnc=false
279
280
elseif torso.Velocity.y>5 and chr.Humanoid.Jump then
281
anim='Jumping'
282
dnc=false
283
284
elseif (torso.Velocity.y < -5) and chr.Humanoid.Jump then
285
anim='Falling'
286
dnc=false
287
288
end
289
end
290
291
if anim~=lastanim then runtime=0 end
292
lastanim=anim
293
294
if anim=="Idling" then
295
trailing=false
296
if not armmovement then
297
rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525+math.cos(syne/32.5)/25,0)*CFrame.Angles(0,0,math.rad(3)),.1)
298
larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/32.5)/25,0)*CFrame.Angles(0,0,math.rad(-3)),.1)
299
end
300
lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/32.5)/20,(math.cos(syne/32.5)/35))*CFrame.Angles(-(math.cos(syne/32.5)/35),0,math.rad(-2.5)),.1)
301
rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/32.5)/20,(math.cos(syne/32.5)/35))*CFrame.Angles(-(math.cos(syne/32.5)/35),0,math.rad(2.5)),.1)
302
hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/32.5)/50,0)*CFrame.Angles(math.cos(syne/32.5)/40,0,0),.1)
303
rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.4,-math.cos(syne/25)*3)*CFrame.Angles(math.cos(syne/25)/4,math.rad(0),math.rad(0)),.1)
304
bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,-math.cos(syne/25)*3)*CFrame.Angles(math.rad(rollvalue),0,0),.25)
305
end
306
307
308
if anim=="Walking" then
309
trailing=true
310
rollvalue=rollvalue+3
311
if rollvalue>=359 then rollvalue=0 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/4)/5))
312
elseif rollvalue>=177 and rollvalue<=183 then rollvalue=184 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/4)/5))
313
else
314
bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/4)/5)),.2) end
315
if not armmovement then
316
rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525-math.cos(syne/8)/6,math.cos(syne/8)/6)*CFrame.Angles(-math.cos(syne/8)/3+math.rad(25),0,math.rad(12.5)),.1)
317
larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/8)/6,-math.cos(syne/8)/6)*CFrame.Angles(math.cos(syne/8)/3+math.rad(25),0,math.rad(-12.5)),.1)
318
end
319
320
lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-(math.cos(syne/8)/11)-.5,-1.7+math.sin(syne/4)/3.5-math.cos(syne/8)/4,math.rad(-5)-(math.cos(syne/8)))*CFrame.Angles(math.rad(5)+(math.cos(syne/8)),0,-(math.cos(syne/8)/11)+math.rad(1)),.1)
321
322
rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(-(math.cos(syne/8)/11)+.5,-1.7-math.sin(syne/4)/3.5+math.cos(syne/8)/4,math.rad(-5)+(math.cos(syne/8)))*CFrame.Angles(math.rad(5)-(math.cos(syne/8)),0,-(math.cos(syne/8)/11)+math.rad(-1)),.1)
323
324
rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.5-math.cos(syne/4)/2,-math.cos(syne/4)*1.5)*CFrame.Angles(math.cos(syne/4)/10+math.rad(-5),math.cos(syne/4)/10,math.cos(syne/8)/10+math.sin(rutprt.RotVelocity.y/2)/10),.1)
325
end
326
327
if anim=="Sprinting" then
328
trailing=true
329
rollvalue=rollvalue+5
330
if rollvalue>=359 then rollvalue=0 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5))
331
elseif rollvalue>=177 and rollvalue<=183 then rollvalue=184 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5))
332
else
333
bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5)),.2) end
334
if not armmovement then
335
rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525-math.cos(syne/6)/6,math.sin(syne/6)/5)*CFrame.Angles(-math.cos(syne/6)/3+math.rad(25),0,math.rad(12.5)),.1)
336
larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/6)/6,-math.sin(syne/6)/5)*CFrame.Angles(math.cos(syne/6)/3+math.rad(25),0,math.rad(-12.5)),.1)
337
end
338
339
lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-(math.cos(syne/6)/11)-.575,-1.7+math.cos(syne/3)/4-math.cos(syne/6)/4,math.rad(-5)-(math.cos(syne/6)))*CFrame.Angles(math.rad(5)+(math.cos(syne/6)),0,-(math.cos(syne/6)/11)+math.rad(-5)),.1)
340
341
rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(-(math.cos(syne/6)/11)+.575,-1.7-math.cos(syne/3)/4+math.cos(syne/6)/4,math.rad(-5)+(math.cos(syne/6)))*CFrame.Angles(math.rad(5)-(math.cos(syne/6)),0,-(math.cos(syne/6)/11)+math.rad(5)),.1)
342
343
rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.5-math.cos(syne/3)/2,-math.cos(syne/3)*1.5)*CFrame.Angles(math.cos(syne/3)/10+math.rad(-5),math.cos(syne/3)/10,math.cos(syne/6)/10+math.sin(rutprt.RotVelocity.y/2)/10),.1)
344
end
345
346
if anim=="Falling" then
347
trailing=false
348
if not armmovement then
349
rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(25),0,math.rad(25)),.1)
350
larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(25),0,math.rad(-25)),.1)
351
end
352
lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,math.rad(-20))*CFrame.Angles(math.rad(20),0,math.rad(-2.5)),.1)
353
rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9,math.rad(-20))*CFrame.Angles(math.rad(20),0,math.rad(2.5)),.1)
354
hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-15),0,0),.1)
355
rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,rutprt.Weld.C0.y+.2,1.75)*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),.1)
356
bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(rollvalue),0,0),.325)
357
end
358
359
if anim=="Jumping" then
360
trailing=false
361
if not armmovement then
362
rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(-25),0,math.rad(25)),.1)
363
larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(-25),0,math.rad(-25)),.1)
364
end
365
lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.9,math.rad(5))*CFrame.Angles(math.rad(-5),0,math.rad(-2.5)),.1)
366
rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9,math.rad(5))*CFrame.Angles(math.rad(-5),0,math.rad(2.5)),.1)
367
hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,.05)*CFrame.Angles(math.rad(15),0,0),.1)
368
rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,rutprt.Weld.C0.y+.1,0)*CFrame.Angles(math.rad(5),math.rad(0),math.rad(0)),.1)
369
bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(math.rad(rollvalue),0,0),.325)
370
end
371
372
if anim=="WallRun" then
373
chr.Humanoid.Jump=true
374
trailing=false
375
rollvalue=rollvalue+7
376
if rollvalue>=359 then rollvalue=0 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5))
377
elseif rollvalue>=177 and rollvalue<=183 then rollvalue=184 bawlweld.C0=CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5))
378
else
379
bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,-(math.cos(syne/3)/5)),.2) end
380
if not armmovement then
381
rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.325,.525,.2)*CFrame.Angles(math.rad(-45),0,math.rad(3)),.1)
382
larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.325,.525,.2)*CFrame.Angles(math.rad(-45),0,math.rad(-3)),.1)
383
end
384
385
lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-(math.cos(syne/5)/11)-.575,-1.8-math.cos(syne/2.5)/2+math.cos(syne/5)/6,math.rad(-30)-(math.cos(syne/5)))*CFrame.Angles(math.rad(30)+(math.cos(syne/5)),0,-(math.cos(syne/5)/11)+math.rad(-5)),.1)
386
387
rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(-(math.cos(syne/5)/11)+.575,-1.8+math.cos(syne/2.5)/2-math.cos(syne/5)/6,math.rad(-30)+(math.cos(syne/5)))*CFrame.Angles(math.rad(30)-(math.cos(syne/5)),0,-(math.cos(syne/5)/11)+math.rad(5)),.1)
388
389
hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.45,.25)*CFrame.Angles(math.rad(30),0,0),.1)
390
rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-1-math.cos(syne/2.5)/2,2-math.cos(syne/3)*1.5)*CFrame.Angles(math.cos(syne/2.5)/10+math.rad(-3),math.cos(syne/2.5)/10,math.cos(syne/5)/10+math.sin(rutprt.RotVelocity.y/2)/10),.1)
391
end
392
393
394
if anim=="Swimming" then
395
rollvalue=rollvalue+4
396
if rollvalue>=360 then rollvalue=0 end
397
if not armmovement then
398
rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525-math.cos(syne/8)/6,math.cos(syne/8)/6)*CFrame.Angles(-math.cos(syne/8)/3+math.rad(25),0,math.rad(12.5)),.1)
399
larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/8)/6,-math.cos(syne/8)/6)*CFrame.Angles(math.cos(syne/8)/3+math.rad(25),0,math.rad(-12.5)),.1)
400
end
401
402
lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.7+math.cos(syne/4)/4,math.rad(-5)-(math.cos(syne/8)))*CFrame.Angles(math.rad(5)+(math.cos(syne/8)),0,math.rad(-5)),.1)
403
404
rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.7-math.cos(syne/4)/4,math.rad(-5)+(math.cos(syne/8)))*CFrame.Angles(math.rad(5)-(math.cos(syne/8)),0,math.rad(5)),.1)
405
406
bawlweld.C0=Lerp(bawlweld.C0,CFrame.new(0,-.5,0)*CFrame.Angles(-math.rad(rollvalue),0,0),.25)
407
rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.4-math.cos(syne/4)/4,-math.cos(syne/4)*1.25)*CFrame.Angles(math.cos(syne/4)/10+math.rad(95),math.cos(syne/4)/10,math.cos(syne/8)/10+math.sin(rutprt.RotVelocity.y/2)/10),.1)
408
end
409
410
chr.Humanoid.CameraOffset=(rutprt.CFrame:toObjectSpace(hed.CFrame)).p+Vector3.new(0,-1.25,0)
411
412
if runnin and not disabled and not otheranims and not sitting then
413
chr.Humanoid.WalkSpeed=RunSpeed
414
elseif not runnin and not disabled and not otheranims and not sitting then
415
chr.Humanoid.WalkSpeed=WlkSpeed
416
end
417
418
if rutprt:findFirstChild("WallRunningVelocitypls") and otheranims then
419
local rei=Ray.new((rutprt.CFrame).p,(((rutprt.CFrame*CFrame.new(0,0,-1)).p)-rutprt.CFrame.p).unit*((bawl.Size.y/2)))
420
local hitpart,hitpos=Workspace:FindPartOnRay(rei,chr)
421
if not hitpart then
422
otheranims=false
423
rutprt:findFirstChild("WallRunningVelocitypls"):Destroy''
424
else
425
return
426
end
427
end
428
429
if runnin and (fldb.w or fldb.a or fldb.s or fldb.d) then
430
local rei=Ray.new((rutprt.CFrame).p,(((rutprt.CFrame*CFrame.new(0,0,-1)).p)-rutprt.CFrame.p).unit*((bawl.Size.y/2)))
431
local hitpart,hitpos=Workspace:FindPartOnRay(rei,chr)
432
if hitpart and hitpart.CanCollide then
433
otheranims=true
434
anim="WallRun"
435
if not rutprt:findFirstChild("WallRunningVelocitypls") then
436
local wlvelo=Instance.new("BodyVelocity",rutprt)
437
wlvelo.Name="WallRunningVelocitypls"
438
wlvelo.maxForce=Vector3.new(0,math.huge,0)
439
wlvelo.velocity=Vector3.new(0,RunSpeed*1.2,0)
440
end
441
end
442
else
443
if rutprt:findFirstChild("WallRunningVelocitypls") and otheranims then
444
otheranims=false
445
rutprt:findFirstChild("WallRunningVelocitypls"):destroy''
446
end
447
end
448
end)