SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
2 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
3 | do | |
4 | print("FE Compatibility code by Mokiros") | |
5 | script.Parent = Player.Character | |
6 | ||
7 | --RemoteEvent for communicating | |
8 | local Event = Instance.new("RemoteEvent") | |
9 | Event.Name = "UserInput_Event" | |
10 | ||
11 | --Fake event to make stuff like Mouse.KeyDown work | |
12 | local function fakeEvent() | |
13 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} | |
14 | t.connect = t.Connect | |
15 | return t | |
16 | end | |
17 | ||
18 | --Creating fake input objects with fake variables | |
19 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
20 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
21 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
22 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
23 | end} | |
24 | --Merged 2 functions into one by checking amount of arguments | |
25 | CAS.UnbindAction = CAS.BindAction | |
26 | ||
27 | --This function will trigger the events that have been :Connect()'ed | |
28 | local function te(self,ev,...) | |
29 | local t = m[ev] | |
30 | if t and t._fakeEvent and t.Function then | |
31 | t.Function(...) | |
32 | end | |
33 | end | |
34 | m.TrigEvent = te | |
35 | UIS.TrigEvent = te | |
36 | ||
37 | Event.OnServerEvent:Connect(function(plr,io) | |
38 | if plr~=Player then return end | |
39 | if io.isMouse then | |
40 | m.Target = io.Target | |
41 | m.Hit = io.Hit | |
42 | else | |
43 | local b = io.UserInputState == Enum.UserInputState.Begin | |
44 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
45 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
46 | end | |
47 | for _,t in pairs(CAS.Actions) do | |
48 | for _,k in pairs(t.Keys) do | |
49 | if k==io.KeyCode then | |
50 | t.Function(t.Name,io.UserInputState,io) | |
51 | end | |
52 | end | |
53 | end | |
54 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
55 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
56 | end | |
57 | end) | |
58 | Event.Parent = NLS([==[ | |
59 | local Player = game:GetService("Players").LocalPlayer | |
60 | local Event = script:WaitForChild("UserInput_Event") | |
61 | ||
62 | local UIS = game:GetService("UserInputService") | |
63 | local input = function(io,a) | |
64 | if a then return end | |
65 | --Since InputObject is a client-side instance, we create and pass table instead | |
66 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) | |
67 | end | |
68 | UIS.InputBegan:Connect(input) | |
69 | UIS.InputEnded:Connect(input) | |
70 | ||
71 | local Mouse = Player:GetMouse() | |
72 | local h,t | |
73 | --Give the server mouse data 30 times every second, but only if the values changed | |
74 | --If player is not moving their mouse, client won't fire events | |
75 | while wait(1/30) do | |
76 | if h~=Mouse.Hit or t~=Mouse.Target then | |
77 | h,t=Mouse.Hit,Mouse.Target | |
78 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
79 | end | |
80 | end]==],Player.Character) | |
81 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
82 | end | |
83 | plr = owner | |
84 | Player = plr | |
85 | char = plr.Character | |
86 | ||
87 | local cap = Instance.new("Part",char) | |
88 | cap.CanCollide = false | |
89 | local mesh = Instance.new("FileMesh",cap) | |
90 | mesh.MeshId = "rbxassetid://1401768294" | |
91 | mesh.TextureId = "rbxassetid://1401768475" | |
92 | mesh.Scale = Vector3.new(0.02,0.02,0.02) | |
93 | local weld = Instance.new("Weld",cap) | |
94 | weld.Part0 = cap | |
95 | weld.Part1 = char.Head | |
96 | weld.C0 = CFrame.new(0.000736236572, -0.606394291, 0.0590667725, 1, 0, 0, 0, 0.999990702, 0, 0, 0, 1) | |
97 | ||
98 | local GrooveCubeRemix = Instance.new("Sound",char) | |
99 | GrooveCubeRemix.SoundId = "rbxassetid://493026875" | |
100 | GrooveCubeRemix.Volume = 4 | |
101 | GrooveCubeRemix.Looped = true | |
102 | GrooveCubeRemix:Play() | |
103 | ||
104 | ||
105 | for i,v in pairs(char:GetChildren()) do | |
106 | if v.ClassName == "Accessory" or v.ClassName == "Shirt" or v.ClassName == "Pants" then | |
107 | v:Destroy() | |
108 | end | |
109 | end | |
110 | local shirt = Instance.new("Shirt",char) | |
111 | shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=329656762" | |
112 | local pants = Instance.new("Pants",char) | |
113 | pants.PantsTemplate = "http://www.roblox.com/asset/?id=329658414" | |
114 | char.Head.face.Texture = "http://www.roblox.com/asset/?id=851872681" | |
115 | ||
116 | local player = Player | |
117 | ||
118 | ||
119 | local chara = workspace:WaitForChild(player.Name) | |
120 | local human = chara.Humanoid | |
121 | local neck = Instance.new("Weld",char) | |
122 | neck.Part0 = char.Torso | |
123 | neck.Part1 = char.Head | |
124 | neck.C0 = CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
125 | local human2 = Instance.new("Weld",char) | |
126 | human2.Part0 = char.HumanoidRootPart | |
127 | human2.Part1 = char.Torso | |
128 | human2co = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
129 | necc = CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
130 | local rhandweld = Instance.new("Weld", char.Torso) | |
131 | rhandweld.Part0 = char.Torso | |
132 | rhandweld.Part1 = char["Right Arm"] | |
133 | rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1) | |
134 | local lhandweld = Instance.new("Weld", char.Torso) | |
135 | lhandweld.Part0 = char.Torso | |
136 | lhandweld.Part1 = char["Left Arm"] | |
137 | lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1) | |
138 | local llegweld = Instance.new("Weld", char.Torso) | |
139 | llegweld.Part0 = char.Torso | |
140 | llegweld.Part1 = char["Left Leg"] | |
141 | llegweld.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) * CFrame.new(0,-1,0) | |
142 | local rlegclone = char.Torso["Right Hip"]:Clone() | |
143 | local rlegweld = Instance.new("Weld", char.Torso) | |
144 | rlegweld.Part0 = char.Torso | |
145 | rlegweld.Part1 = char["Right Leg"] | |
146 | rlegweld.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) * CFrame.new(0,-1,0) | |
147 | pose = "Standing" | |
148 | ||
149 | cananimate = true | |
150 | abletolongjump = false | |
151 | crouching = false | |
152 | longjumping = false | |
153 | walking = false | |
154 | ||
155 | local speed = 0 | |
156 | ||
157 | char.Humanoid.Running:connect(function(s) | |
158 | speed = s | |
159 | end) | |
160 | ||
161 | coroutine.wrap(function() | |
162 | while true do | |
163 | wait() | |
164 | local ray = Ray.new(chara.Torso.Position, (chara.Torso.Position - Vector3.new(0,9999999,0)).unit * 300) | |
165 | local p, position = game.Workspace:FindPartOnRay(ray, char, true, false) | |
166 | local dis = (chara.Torso.Position - position).magnitude | |
167 | if dis > 3.8 and chara.Torso.Velocity.Y > 0 then | |
168 | pose = "Jumping" | |
169 | char.Humanoid.WalkSpeed = 16 | |
170 | end | |
171 | if dis> 3.8 and chara.Torso.Velocity.Y < 0 then | |
172 | pose = "Falling" | |
173 | char.Humanoid.WalkSpeed = 16 | |
174 | end | |
175 | if dis < 3.8 and speed == 0 then | |
176 | pose = "Standing" | |
177 | char.Humanoid.WalkSpeed = 16 | |
178 | end | |
179 | if dis < 3.8 and speed > 0 then | |
180 | pose = "Walking" | |
181 | char.Humanoid.WalkSpeed = 16 | |
182 | end | |
183 | if longjumping and crouching and walking then | |
184 | pose = "LongJump" | |
185 | char.Humanoid.WalkSpeed = 16 | |
186 | end | |
187 | if crouching and dis < 3.8 and speed == 0 and not longjumping then | |
188 | pose = "CrouchIdle" | |
189 | char.Humanoid.WalkSpeed = 8 | |
190 | end | |
191 | if crouching and dis < 3.8 and speed > 0 and not longjumping then | |
192 | pose = "CrouchWalk" | |
193 | char.Humanoid.WalkSpeed = 8 | |
194 | end | |
195 | end | |
196 | end)() | |
197 | local Jump = Instance.new("Sound",char) | |
198 | Jump.SoundId = "rbxassetid://158309736" | |
199 | Jump.Volume = 4 | |
200 | jumping = false | |
201 | sound = Jump | |
202 | stage = 1 | |
203 | hum = char.Humanoid | |
204 | function onJump(val) | |
205 | jumping = val | |
206 | ||
207 | if jumping == true and stage > 1 and stage < 3 and not crouching then | |
208 | --print("Triple jump!") | |
209 | stage = 3 | |
210 | char.Torso.Velocity = char.Torso.CFrame.upVector * 125 | |
211 | ||
212 | sound:Play() | |
213 | wait(1) | |
214 | stage = 0 | |
215 | elseif jumping == true and stage > 0 and stage < 2 and not crouching then | |
216 | --print("Double jump!") | |
217 | stage = 2 | |
218 | char.Torso.Velocity = char.Torso.CFrame.upVector * 85 | |
219 | ||
220 | sound:Play() | |
221 | elseif jumping == true and stage < 1 then | |
222 | --print("Normal jump!") | |
223 | stage = 1 | |
224 | ||
225 | sound.Pitch = 1 | |
226 | sound:Play() | |
227 | end | |
228 | end | |
229 | hum.Jumping:connect(onJump) | |
230 | ||
231 | ||
232 | -- Jump Timeout -- | |
233 | function onFall(val) | |
234 | falling = val | |
235 | if val == false then --When player lands... | |
236 | wait(0.25) --Next jump times out after .2 seconds. | |
237 | if stage > 0 and falling == false then | |
238 | stage = 0 --Resets jumps. | |
239 | end | |
240 | end | |
241 | end | |
242 | hum.FreeFalling:connect(onFall) | |
243 | stomp = Instance.new("Sound",char) | |
244 | stomp.SoundId = "rbxassetid://140439666" | |
245 | stomp.Volume = 10 | |
246 | ||
247 | -- Stomp | |
248 | char["Right Leg"].Touched:connect(function(part) | |
249 | local human = part.Parent:FindFirstChildOfClass("Humanoid") | |
250 | if human and human.Parent.Name ~= char.Name and part.Name == "Head" then | |
251 | human:Destroy() | |
252 | stomp:Play() | |
253 | char.Torso.Velocity = char.Torso.CFrame.upVector * 100 | |
254 | char.Humanoid.Jump = true | |
255 | stage = 3 | |
256 | pose = "Jumping" | |
257 | end | |
258 | end) | |
259 | ||
260 | ||
261 | char["Left Leg"].Touched:connect(function(part) | |
262 | local human = part.Parent:FindFirstChildOfClass("Humanoid") | |
263 | if human and human.Parent.Name ~= char.Name and part.Name == "Head" then | |
264 | human:Destroy() | |
265 | stomp:Play() | |
266 | char.Torso.Velocity = char.Torso.CFrame.upVector * 100 | |
267 | char.Humanoid.Jump = true | |
268 | stage = 3 | |
269 | pose = "Jumping" | |
270 | end | |
271 | end) | |
272 | ||
273 | local Jump3 = Instance.new("Sound",char) | |
274 | Jump3.SoundId = "rbxassetid://1555685807" | |
275 | Jump3.Volume = 10 | |
276 | function crouch() | |
277 | if not crouching then | |
278 | abletolongjump = true | |
279 | crouching = true -- no anims yet but there will be soon | |
280 | end | |
281 | end | |
282 | ||
283 | function stopcrouching() | |
284 | if crouching then | |
285 | abletolongjump = false | |
286 | crouching = false | |
287 | end | |
288 | end | |
289 | ||
290 | function longjump() | |
291 | if not longjumping and abletolongjump and walking then | |
292 | Jump3:Play() | |
293 | char.Humanoid.Jump = true | |
294 | char.Torso.Velocity = char.Torso.CFrame.lookVector * 100 | |
295 | char.Humanoid.JumpPower = 80 | |
296 | longjumping = true | |
297 | wait(1) | |
298 | longjumping = false | |
299 | - | char.Humanoid.JumpPower = 50 |
299 | + | char.Humanoid.JumpPower = 100 |
300 | end | |
301 | end | |
302 | ||
303 | ||
304 | ||
305 | ||
306 | Mouse.KeyDown:connect(function(k) | |
307 | if string.byte(k) == 48 then | |
308 | crouch() | |
309 | end | |
310 | if k == "q" and crouching and abletolongjump then | |
311 | longjump() | |
312 | end | |
313 | end) | |
314 | ||
315 | Mouse.KeyUp:connect(function(k) | |
316 | if string.byte(k) == 48 then | |
317 | stopcrouching() | |
318 | end | |
319 | end) | |
320 | local health = Instance.new("ScreenGui",plr.PlayerGui) | |
321 | health.Name = "HealthGui" | |
322 | local text = Instance.new("TextLabel",health) | |
323 | text.Position = UDim2.new(-0.005, 0, 0.755, 0) | |
324 | text.Size = UDim2.new(0, 200, 0, 50) | |
325 | text.Text = char.Humanoid.Health .. "/" .. char.Humanoid.MaxHealth | |
326 | text.TextScaled = true | |
327 | text.BackgroundTransparency = 1 | |
328 | text.TextColor3 = Color3.new(1,1,1) | |
329 | local Warning = Instance.new("TextLabel",health) | |
330 | Warning.Position = UDim2.new(-0.003, 0,0.618, 0) | |
331 | Warning.Size = UDim2.new(0, 200, 0, 50) | |
332 | Warning.BackgroundTransparency = 1 | |
333 | Warning.TextScaled = true | |
334 | Warning.TextTransparency = 1 | |
335 | Warning.Text = "WARNING! LOW HEALTH" | |
336 | Warning.TextColor3 = BrickColor.new("Really red").Color | |
337 | Warning.TextStrokeColor3 = BrickColor.new("Really red").Color | |
338 | - | char.Humanoid.Health = 50 |
338 | + | char.Humanoid.Health = 100000 |
339 | - | char.Humanoid.MaxHealth = 50 |
339 | + | char.Humanoid.MaxHealth = 100000 |
340 | ouch = Instance.new("Sound",char) | |
341 | ouch.SoundId = "rbxassetid://131358789" | |
342 | ouch.Volume = 10 | |
343 | low = Instance.new("Sound",char) | |
344 | low.SoundId = "rbxassetid://1366726134" | |
345 | low.Volume = 10 | |
346 | lowhealth = false | |
347 | coroutine.wrap(function() | |
348 | while true do | |
349 | wait() | |
350 | for i,v in pairs(char:GetChildren()) do | |
351 | if v.ClassName == "Part" and v.Name ~= "HumanoidRootPart" then | |
352 | v.BrickColor = BrickColor.new("Pastel brown") | |
353 | end | |
354 | end | |
355 | end | |
356 | end)() | |
357 | coroutine.wrap(function() | |
358 | while true do | |
359 | wait() | |
360 | text.Text = char.Humanoid.Health .. "/" .. char.Humanoid.MaxHealth | |
361 | if hum.Health < 10 then | |
362 | low:Play() | |
363 | lowhealth = true | |
364 | Warning.TextTransparency = 0 | |
365 | end | |
366 | if hum.Health > 10 then | |
367 | lowhealth = false | |
368 | Warning.TextTransparency = 1 | |
369 | end | |
370 | - | if hum.Health < 50 then |
370 | + | if hum.Health < 100000 then |
371 | ouch:Play() | |
372 | for i = 1,30 do | |
373 | wait() | |
374 | char.Head.face.Transparency = 1 | |
375 | for i,v in pairs(char:GetChildren()) do | |
376 | if v.ClassName == "Part" then | |
377 | v.Transparency = 1 | |
378 | end | |
379 | end | |
380 | wait(0.05) | |
381 | for i,v in pairs(char:GetChildren()) do | |
382 | if v.ClassName == "Part" then | |
383 | v.Transparency = 0 | |
384 | end | |
385 | end | |
386 | char.HumanoidRootPart.Transparency = 1 | |
387 | char.Head.face.Transparency = 0 | |
388 | end | |
389 | - | char.Humanoid.Health = 50 |
389 | + | char.Humanoid.Health = 100000 |
390 | end | |
391 | end | |
392 | end)() | |
393 | while true do | |
394 | wait() | |
395 | if pose == "Standing" and cananimate then | |
396 | walking = false | |
397 | for i = 0,1 , 0.07 do | |
398 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1),i) | |
399 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1),i) | |
400 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.499999523, -2.00000048, -9.53674316e-07, 0.970465422, 0, -0.241240621, 0, 1, 0, 0.241240621, 0, 0.970465422),i) | |
401 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.499999523, -2.00000048, 0, 0.825716197, -3.35415825e-06, -0.564085841, -0.00202200096, 0.999993622, -0.00296577741, 0.564082265, 0.00358947273, 0.825710893),i) | |
402 | human2.C0 = human2.C0:lerp(CFrame.new(0, 0, 0, 0.779511273, 0, 0.626388252, 0, 0.999997616, 0, -0.626388252, 0, 0.779511273):inverse(),i) | |
403 | neck.C0 = neck.C0:lerp(CFrame.new(0, 1.5, 0, 0.726146579, 0, 0.687539995, 0, 1, 0, -0.687539995, 0, 0.726146579),i) | |
404 | wait() | |
405 | end | |
406 | end | |
407 | if pose == "Walking" and cananimate then | |
408 | walking = true | |
409 | for i = 0,1 ,0.07 do | |
410 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.168842316, -0.374614239, 1, 0, 0, 0, 0.662306964, -0.74923259, 0, 0.74923259, 0.662307084),i) | |
411 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.12597847, 0.331827164, 1, 0, 0, 0, 0.748035073, 0.663659215, 0, -0.663659275, 0.748035014),i) | |
412 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.67391682, -0.738807678, 0.99999994, 0, 0, 0, 0.673916757, -0.738807261, 0, 0.738807321, 0.673916817),i) | |
413 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.67705727, 0.735931396, 1, 0, 0, 0, 0.677056909, 0.735930681, 0, -0.735930741, 0.677056968),i) | |
414 | human2.C0 = human2.C0:lerp(human2co,i) | |
415 | neck.C0 = neck.C0:lerp(necc,i) | |
416 | wait() | |
417 | end | |
418 | walking = true | |
419 | for i = 0,1 ,0.07 do | |
420 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.69855976, 0.715551376, 1, 0, 0, 0, 0.698559642, 0.715551734, 0, -0.715551794, 0.698559701),i) | |
421 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.80723953, -0.590223312, 1, 0, 0, 0, 0.807239354, -0.590224087, 0, 0.590224147, 0.807239413),i) | |
422 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.216003418, 0.411518574, 1, 0, 0, 0, 0.567983389, 0.823040009, 0, -0.823040009, 0.567983389),i) | |
423 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.215018272, -0.41083622, 1, 0, 0, 0, 0.569954693, -0.821676135, 0, 0.821676135, 0.569954753),i) | |
424 | human2.C0 = human2.C0:lerp(human2co,i) | |
425 | neck.C0 = neck.C0:lerp(necc,i) | |
426 | wait() | |
427 | end | |
428 | walking = true | |
429 | end | |
430 | if pose == "Jumping" and cananimate and stage == 1 then | |
431 | walking = false | |
432 | for i = 0,1 , 0.07 do | |
433 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, -0.0720152855, 0.193100929, 1, 0, 0, 0, 0.896007597, 0.444038779, 0, -0.444038779, 0.896007597),i) | |
434 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.49999976, 0.95036602, -0.548690796, 1, 0, 0, 0, -0.866025984, -0.499998987, 0, 0.499998987, -0.866025984),i) | |
435 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.98754525, -0.507376909, 1, 0, 0, 0, 0.878388762, -0.477946907, 0, 0.477946877, 0.878388762),i) | |
436 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.91097617, 0.239589691, 1, 0, 0, 0, 0.93738246, 0.348301798, 0, -0.348301798, 0.93738246),i) | |
437 | human2.C0 = human2.C0:lerp(human2co,i) | |
438 | neck.C0 = neck.C0:lerp(necc,i) | |
439 | wait() | |
440 | end | |
441 | end | |
442 | if pose == "Jumping" and cananimate and stage == 2 then | |
443 | walking = false | |
444 | for i = 0,1 , 0.07 do | |
445 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.66472816, 0.166806221, 0, 0.840905726, -0.541181803, 0, 0.541181803, 0.840905726, 0, 0, 0, 1),i) | |
446 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.69600487, 0.110276461, 0, 0.871529698, 0.490342826, 0, -0.490342826, 0.871529698, 0, 0, 0, 1),i) | |
447 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.3247503, -0.419755459, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i) | |
448 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i) | |
449 | human2.C0 = human2.C0:lerp(human2co,i) | |
450 | neck.C0 = neck.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 0.917574883, -0.397562951, 0, 0.397562951, 0.917574883),i) | |
451 | wait() | |
452 | end | |
453 | end | |
454 | if pose == "Jumping" and cananimate and stage == 3 then | |
455 | walking = false | |
456 | for i = 0,1 ,0.07 do | |
457 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.499996185, -0.302403927, -1.00209022, 0.998795688, 1.07394217e-05, 0.0490646139, 0.0144870952, 0.955350697, -0.295119137, -0.0468770824, 0.295474499, 0.954199851),i) | |
458 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.999998093, 0.401779056, -0.300704479, 0.995004237, 0.0998337567, 2.21675634e-07, -8.0173304e-05, 0.000801276532, -0.999999762, -0.0998337343, 0.995003879, 0.000805277436),i) | |
459 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.999984741, 0.403417826, -0.400689125, 0.978886008, -0.198669523, -0.0480909608, -0.0489091128, 0.000789985002, -0.99880302, 0.198469713, 0.98006618, -0.00894344598),i) | |
460 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.499996185, -0.299546242, -1.00121045, 0.999991715, 1.10380352e-05, -3.05008143e-06, -1.13286078e-05, 0.955351293, -0.295472056, -2.51282472e-07, 0.295474589, 0.955343246),i) | |
461 | human2.C0 = human2.C0 * CFrame.Angles(math.rad(-20), math.rad(0), math.rad(0)) | |
462 | neck.C0 = neck.C0:lerp(necc,i) | |
463 | wait() | |
464 | end | |
465 | end | |
466 | if pose == "Falling" and cananimate then | |
467 | walking = false | |
468 | for i = 0,1 , 0.07 do | |
469 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(2.00721169, 0.966965914, 0, -0.554754853, -0.832013845, 0, 0.832013845, -0.554754853, 0, 0, 0, 1),i) | |
470 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.87815094, 0.913155079, 0, -0.494452, 0.869204998, 0, -0.869204998, -0.494452, 0, 0, 0, 1),i) | |
471 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i) | |
472 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i) | |
473 | human2.C0 = human2.C0:lerp(human2co,i) | |
474 | neck.C0 = neck.C0:lerp(CFrame.new(0, 1.50154519, -0.248991966, 1, 0, 0, 0, 0.852542579, 0.522657752, 0, -0.522657752, 0.852542579),i) | |
475 | wait() | |
476 | end | |
477 | end | |
478 | if pose == "LongJump" and cananimate then | |
479 | for i = 0,1 ,0.07 do | |
480 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.268796921, 0.378599167, 1, 0, 0, 0, 0.479244441, 0.877675295, 0, -0.877680123, 0.479247063),i) | |
481 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.3865062, -0.938074112, 1, 0, 0, 0, 0.285262436, -0.958443761, 0, 0.958449006, 0.285263985),i) | |
482 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.49999988, 0.223083735, 0.169561386, 1, 0, 0, 0, 0.60511744, 0.796129346, 0, -0.796133697, 0.605120778),i) | |
483 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.53550446, -0.961566925, 1, 0, 0, 0, 0.407492548, -0.913202584, 0, 0.913207591, 0.407494754),i) | |
484 | human2.C0 = human2.C0:lerp(human2co,i) | |
485 | neck.C0 = neck.C0:lerp(necc,i) | |
486 | wait() | |
487 | end | |
488 | end | |
489 | if pose == "CrouchIdle" and cananimate then | |
490 | walking = false | |
491 | for i = 0,1 ,0.07 do | |
492 | human2.C0 = human2.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.0382479317, -0.999268353, 0, 0.999266207, 0.0382480137):inverse(),i) | |
493 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.836666107, 1.21547508, 0.497126102, 0.782464266, -0.619657576, 0.0614301562, -0.106479198, -0.0359476209, 0.993664801, -0.61352396, -0.784048676, -0.0941083729),i) | |
494 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.500001907, -0.912134171, -1.33790898, 0.999999821, 4.32133675e-07, 2.32458115e-06, 2.38418579e-06, 0.0123845953, -0.999923229, -4.60073352e-07, 0.999923527, 0.0123845842),i) | |
495 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.06795311, 1.25440025, 0.391194582, -0.887933075, 0.459972352, -1.25467777e-05, -0.0143302083, -0.0276902169, -0.999513805, -0.459749311, -0.887501359, 0.0311785322),i) | |
496 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.499998093, -0.951980591, -1.32859886, 0.999999762, 3.56696546e-07, -6.85453415e-07, -6.85453415e-07, 0.0145149324, -0.999894559, -3.42726707e-07, 0.999894857, 0.0145149129),i) | |
497 | neck.C0 = neck.C0:lerp(necc,i) | |
498 | wait() | |
499 | end | |
500 | end | |
501 | if pose == "CrouchWalk" and cananimate then | |
502 | walking = true | |
503 | for i = 0,1, 0.07 do | |
504 | human2.C0 = human2.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.0382479317, -0.999268353, 0, 0.999266207, 0.0382480137):inverse(),i) | |
505 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.08789825, -1.2466166, 0.999999821, -6.70552254e-07, 2.29477882e-06, 2.38418579e-06, 0.460938156, -0.887432218, -4.60073352e-07, 0.887432396, 0.460938305),i) | |
506 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.499999046, 0.152124405, -1.14450228, 0.999999881, -5.96046448e-07, -1.16229057e-06, -1.22189522e-06, -0.641044497, -0.76750356, -3.22237611e-07, 0.767503738, -0.641044617),i) | |
507 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.06795311, 1.25440025, 0.391194582, -0.887933075, 0.459972352, -1.25467777e-05, -0.0143302083, -0.0276902169, -0.999513805, -0.459749311, -0.887501359, 0.0311785322),i) | |
508 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.836666107, 1.21547508, 0.497126102, 0.782464266, -0.619657576, 0.0614301562, -0.106479198, -0.0359476209, 0.993664801, -0.61352396, -0.784048676, -0.0941083729),i) | |
509 | neck.C0 = neck.C0:lerp(necc,i) | |
510 | wait() | |
511 | end | |
512 | for i = 0,1, 0.07 do | |
513 | human2.C0 = human2.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.0382479317, -0.999268353, 0, 0.999266207, 0.0382480137):inverse(),i) | |
514 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.500027657, -0.210391998, -1.34505367, 0.999999762, 1.38282776e-05, 2.73883343e-05, 3.06665897e-05, -0.405213743, -0.914221942, -1.54413283e-06, 0.914222181, -0.405213833),i) | |
515 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500020981, -1.04758263, -1.2475245, 0.999999821, -2.4586916e-05, 5.15282154e-05, 5.70416451e-05, 0.470286787, -0.882513642, -2.55182385e-06, 0.882513881, 0.470286816),i) | |
516 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.06795311, 1.25440025, 0.391194582, -0.887933075, 0.459972352, -1.25467777e-05, -0.0143302083, -0.0276902169, -0.999513805, -0.459749311, -0.887501359, 0.0311785322),i) | |
517 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.836666107, 1.21547508, 0.497126102, 0.782464266, -0.619657576, 0.0614301562, -0.106479198, -0.0359476209, 0.993664801, -0.61352396, -0.784048676, -0.0941083729),i) | |
518 | neck.C0 = neck.C0:lerp(necc,i) | |
519 | wait() | |
520 | end | |
521 | end | |
522 | end |