SHOW:
|
|
- or go back to the newest paste.
1 | - | local plr=game.Players.kong109 |
1 | + | local plr=game.Players.Wlnged |
2 | local chr=plr.Character | |
3 | local mouse = plr:GetMouse() | |
4 | local PGui=plr.PlayerGui | |
5 | local lleg = chr["Left Leg"] | |
6 | local rleg = chr["Right Leg"] | |
7 | local larm = chr["Left Arm"] | |
8 | local rarm = chr["Right Arm"] | |
9 | local hed = chr.Head | |
10 | local rutprt = chr.HumanoidRootPart | |
11 | local torso = chr.Torso | |
12 | local otheranims=false | |
13 | local armmovement=false | |
14 | chr.Animate.Disabled=true | |
15 | local RunSpeed=30 | |
16 | local WlkSpeed=18 | |
17 | local runnin=false | |
18 | local disabled=false | |
19 | local tik=0 | |
20 | local height=1 | |
21 | local raising=false | |
22 | local lowering=false | |
23 | local pseudohead=hed:Clone() | |
24 | for i,x in pairs(pseudohead:GetChildren()) do if not x.ClassName:find('Mesh') then x:Destroy() end end | |
25 | pseudohead.Name='PseudoHead' | |
26 | pseudohead.Parent=chr.Head | |
27 | local pseudoweld=Instance.new('Weld',torso) | |
28 | pseudoweld.Part0=hed | |
29 | pseudoweld.Name='PseudoHedWld' | |
30 | pseudoweld.Part1=pseudohead | |
31 | hed.Transparency=1 | |
32 | ||
33 | coroutine.resume(coroutine.create(function() | |
34 | local rate=.05 | |
35 | local Hats={} | |
36 | for i,x in pairs(chr:GetChildren()) do if x:IsA("Hat") then table.insert(Hats,x) x.Handle.Mesh.TextureId="http://www.roblox.com/asset?id=25701026" | |
37 | end | |
38 | end | |
39 | local lam=Instance.new("SpecialMesh",larm) | |
40 | lam.MeshId="http://www.roblox.com/asset?id=12221505" | |
41 | lam.TextureId="http://www.roblox.com/asset?id=25701026" | |
42 | local ram=Instance.new("SpecialMesh",rarm) | |
43 | ram.MeshId="http://www.roblox.com/asset?id=12221505" | |
44 | ram.TextureId="http://www.roblox.com/asset?id=25701026" | |
45 | local rlm=Instance.new("SpecialMesh",rleg) | |
46 | rlm.MeshId="http://www.roblox.com/asset?id=12221626" | |
47 | rlm.TextureId="http://www.roblox.com/asset?id=25701026" | |
48 | local llm=Instance.new("SpecialMesh",lleg) | |
49 | llm.MeshId="http://www.roblox.com/asset?id=12221626" | |
50 | llm.TextureId="http://www.roblox.com/asset?id=25701026" | |
51 | local trm=Instance.new("SpecialMesh",torso) | |
52 | trm.MeshId="http://www.roblox.com/asset?id=12221758" | |
53 | trm.TextureId="http://www.roblox.com/asset?id=25701026" | |
54 | local hem=Instance.new("SpecialMesh",hed) | |
55 | hem.MeshId="rbxasset://fonts/head.mesh" | |
56 | hem.TextureId="http://www.roblox.com/asset?id=25701026" | |
57 | local hem2=Instance.new("SpecialMesh",pseudohead) | |
58 | hem2.MeshId="rbxasset://fonts/head.mesh" | |
59 | hem2.TextureId="http://www.roblox.com/asset?id=25701026" | |
60 | local asd=Instance.new('PointLight',torso) | |
61 | asd.Brightness=123 | |
62 | asd.Range=12 | |
63 | asd.Shadows=true | |
64 | ||
65 | while wait'0' do | |
66 | for a=0,1,rate do | |
67 | lam.VertexColor=Vector3.new(a,0,-a+1) | |
68 | ram.VertexColor=Vector3.new(a,0,-a+1) | |
69 | rlm.VertexColor=Vector3.new(a,0,-a+1) | |
70 | llm.VertexColor=Vector3.new(a,0,-a+1) | |
71 | trm.VertexColor=Vector3.new(a,0,-a+1) | |
72 | hem.VertexColor=Vector3.new(a,0,-a+1) | |
73 | hem2.VertexColor=Vector3.new(a,0,-a+1) | |
74 | asd.Color=Color3.new(a,0,-a+1) | |
75 | coroutine.wrap(function() | |
76 | for x=1,#Hats do | |
77 | Hats[x].Handle.Mesh.VertexColor=Vector3.new(a,0,-a+1) | |
78 | end | |
79 | end)() | |
80 | wait'' | |
81 | end | |
82 | for a=0,1,rate do | |
83 | lam.VertexColor=Vector3.new(-a+1,a,0) | |
84 | ram.VertexColor=Vector3.new(-a+1,a,0) | |
85 | rlm.VertexColor=Vector3.new(-a+1,a,0) | |
86 | llm.VertexColor=Vector3.new(-a+1,a,0) | |
87 | trm.VertexColor=Vector3.new(-a+1,a,0) | |
88 | hem.VertexColor=Vector3.new(-a+1,a,0) | |
89 | hem2.VertexColor=Vector3.new(-a+1,a,0) | |
90 | asd.Color=Color3.new(-a+1,a,0) | |
91 | coroutine.wrap(function() | |
92 | for x=1,#Hats do | |
93 | Hats[x].Handle.Mesh.VertexColor=Vector3.new(-a+1,a,0) | |
94 | end | |
95 | end)() | |
96 | wait'' | |
97 | end | |
98 | for a=0,1,rate do | |
99 | lam.VertexColor=Vector3.new(0,-a+1,a) | |
100 | ram.VertexColor=Vector3.new(0,-a+1,a) | |
101 | rlm.VertexColor=Vector3.new(0,-a+1,a) | |
102 | llm.VertexColor=Vector3.new(0,-a+1,a) | |
103 | trm.VertexColor=Vector3.new(0,-a+1,a) | |
104 | hem.VertexColor=Vector3.new(0,-a+1,a) | |
105 | hem2.VertexColor=Vector3.new(0,-a+1,a) | |
106 | asd.Color=Color3.new(0,-a+1,a) | |
107 | coroutine.wrap(function() | |
108 | for x=1,#Hats do | |
109 | Hats[x].Handle.Mesh.VertexColor=Vector3.new(0,-a+1,a) | |
110 | end | |
111 | end)() | |
112 | wait'' | |
113 | end | |
114 | end | |
115 | end)) | |
116 | ||
117 | ||
118 | ||
119 | ||
120 | ||
121 | ||
122 | ||
123 | ||
124 | ||
125 | coroutine.wrap(function() | |
126 | for i,x in pairs(hed:GetChildren()) do if x:IsA('Sound') then x:Destroy() end end end)() | |
127 | ||
128 | local flap=Instance.new("Sound",torso) | |
129 | flap.Volume=.3 | |
130 | flap.Pitch=1 | |
131 | flap.SoundId="http://www.roblox.com/asset?id=90820031" | |
132 | ||
133 | function Lerp(a, b, i) | |
134 | local com1 = {a.X, a.Y, a.Z, a:toEulerAnglesXYZ()} | |
135 | local com2 = {b.X, b.Y, b.Z, b:toEulerAnglesXYZ()} | |
136 | local calx = com1[1] + (com2[1] - com1[1]) * i | |
137 | local caly = com1[2] + (com2[2] - com1[2]) * i | |
138 | local calz = com1[3] + (com2[3] - com1[3]) * i | |
139 | local cala = com1[4] + (com2[4] - com1[4]) * i | |
140 | local calb = com1[5] + (com2[5] - com1[5]) * i | |
141 | local calc = com1[6] + (com2[6] - com1[6]) * i | |
142 | return CFrame.new(calx, caly, calz) * CFrame.Angles(cala, calb, calc) | |
143 | end | |
144 | ||
145 | function TwnSingleNumber(s,f,m) | |
146 | local wot=s+(f-s)*m | |
147 | return wot | |
148 | end | |
149 | ||
150 | function TwnVector3(q,w,e) | |
151 | local begin={q.x,q.y,q.z} | |
152 | local ending={w.x,w.y,w.z} | |
153 | local bgx=begin[1]+(ending[1]-begin[1])*e | |
154 | local bgy=begin[2]+(ending[2]-begin[2])*e | |
155 | local bgz=begin[3]+(ending[3]-begin[3])*e | |
156 | return Vector3.new(bgx,bgy,bgz) | |
157 | end | |
158 | ||
159 | newWeld = function(wld, wp0, wp1, wc0x, wc0y, wc0z) | |
160 | wld = Instance.new("Weld", wp1) | |
161 | wld.Part0 = wp0 | |
162 | wld.Part1 = wp1 | |
163 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
164 | end | |
165 | ||
166 | newWeld(law, torso, larm, -1.5, 0.5, 0) | |
167 | newWeld(raw, torso, rarm, 1.5, 0.5, 0) | |
168 | newWeld(llw, torso, lleg, -.5, -2, 0) | |
169 | newWeld(rlw, torso, rleg, .5, -2, 0) | |
170 | newWeld(hw, torso, hed, 0, 1.5, 0) | |
171 | local rutwald=Instance.new('Weld',rutprt) | |
172 | rutwald.Part0=rutprt | |
173 | rutwald.Part1=torso | |
174 | rutprt.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0) | |
175 | larm.Weld.C1 = CFrame.new(0, 0.5, 0) | |
176 | rarm.Weld.C1 = CFrame.new(0, 0.5, 0) | |
177 | rleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0) | |
178 | lleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0) | |
179 | ||
180 | local anim = "Idling" | |
181 | local lastanim = "Idling" | |
182 | local val = 0 | |
183 | local syne = 0 | |
184 | local num = 0 | |
185 | local runtime = 0 | |
186 | ||
187 | --[[local pseudohead=hed:Clone() | |
188 | for i,x in pairs(pseudohead:GetChildren()) do if not x.ClassName:find('Mesh') then x:Destroy() end end | |
189 | pseudohead.Name='PseudoHead' | |
190 | pseudohead.Parent=chr.Head | |
191 | local pseudoweld=Instance.new('Weld',torso) | |
192 | pseudoweld.Part0=hed | |
193 | pseudoweld.Name='PseudoHedWld' | |
194 | pseudoweld.Part1=pseudohead | |
195 | hed.Transparency=1]] | |
196 | ||
197 | ||
198 | ||
199 | maus.KeyDown:connect(function(kei) | |
200 | if string.byte(kei)==48 and not otheranims and not disabled then | |
201 | chr.Humanoid.WalkSpeed=RunSpeed | |
202 | runnin=true | |
203 | end | |
204 | if kei=="e" and not otheranims and not disabled and not lowering then | |
205 | raising=true | |
206 | end | |
207 | if kei=="q" and not otheranims and not disabled and not raising then | |
208 | lowering=true | |
209 | end | |
210 | end) | |
211 | ||
212 | maus.KeyUp:connect(function(kei) | |
213 | if string.byte(kei)==48 and not otheranims and not disabled then | |
214 | chr.Humanoid.WalkSpeed=WlkSpeed | |
215 | runnin=false | |
216 | end | |
217 | if kei=="e" and not otheranims and not disabled then | |
218 | raising=false | |
219 | end | |
220 | if kei=="q" and not otheranims and not disabled then | |
221 | lowering=false | |
222 | end | |
223 | end) | |
224 | ||
225 | game:service'RunService'.RenderStepped:connect(function() | |
226 | if raising and not lowering then height=height+.2 | |
227 | elseif lowering and not raising then height=height-.2 | |
228 | end | |
229 | if height>50 then height=50 | |
230 | elseif height<-.75 then height=-.75 | |
231 | end | |
232 | syne=syne+1 | |
233 | if not otheranims then | |
234 | if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 1 and not dnc and torso.Velocity.y<5 and torso.Velocity.y>-5 then | |
235 | anim="Idling" | |
236 | ||
237 | elseif (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude > 1 and (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude < 25 and torso.Velocity.y<5 and torso.Velocity.y>-5 then | |
238 | anim="Walking" | |
239 | dnc=false | |
240 | ||
241 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > 25 and torso.Velocity.y<5 and torso.Velocity.y>-5 then | |
242 | anim="Sprinting" | |
243 | dnc=false | |
244 | ||
245 | elseif torso.Velocity.y>5 then | |
246 | anim='Jumping' | |
247 | dnc=false | |
248 | ||
249 | elseif (torso.Velocity.y < -5) then | |
250 | anim='Falling' | |
251 | dnc=false | |
252 | end | |
253 | end | |
254 | ||
255 | if anim=="Idling" then | |
256 | tik=tik+1 | |
257 | if tik==45 then tik=0 | |
258 | flap:play'' | |
259 | end | |
260 | if not armmovement then | |
261 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.55,0)*CFrame.Angles(math.sin(syne/16)/3,0,(math.sin(syne/8)*1.5)+math.rad(55)),.1) | |
262 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.55,0)*CFrame.Angles(math.sin(syne/16)/3,0,-(math.sin(syne/8)*1.5)-math.rad(55)),.1) | |
263 | end | |
264 | lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.8,math.sin(syne/16)/3)*CFrame.Angles(-math.sin(syne/16)/3,0,math.rad(-2.5)),.1) | |
265 | rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.8,math.sin(syne/16)/3)*CFrame.Angles(-math.sin(syne/16)/3,0,math.rad(2.5)),.1) | |
266 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(0),0),.1) | |
267 | rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-(math.sin(syne/8))*1.8+height,-(math.sin(syne/16)/2))*CFrame.Angles(math.sin(syne/16)/10,math.rad(0),math.rad(0)),.025) | |
268 | end | |
269 | if anim=="Walking" then | |
270 | tik=tik+1 | |
271 | if tik==43 then tik=0 | |
272 | flap:play'' | |
273 | end | |
274 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(-3)+math.sin(syne/7)/4,0,(math.sin(syne/7)*1.5)+math.rad(55)),.1) | |
275 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(-3)+math.sin(syne/7)/4,0,-(math.sin(syne/7)*1.5)-math.rad(55)),.1) | |
276 | lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.8,-math.sin(syne/14)/10)*CFrame.Angles(math.sin(syne/14)/10+math.rad(-5),0,math.rad(-2.5)),.1) | |
277 | rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.8,-math.sin(syne/14)/10)*CFrame.Angles(math.sin(syne/14)/10+math.rad(-5),0,math.rad(2.5)),.1) | |
278 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(0),0),.1) | |
279 | rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-(math.sin(syne/7))*1.8+height,math.sin(syne/14)/2)*CFrame.Angles(math.rad(-10),math.rad(0),math.rad(0)),.025) | |
280 | end | |
281 | if anim=="Sprinting" then | |
282 | tik=tik+1 | |
283 | if tik==40 then tik=0 | |
284 | flap:play'' | |
285 | end | |
286 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.5,0)*CFrame.Angles(math.rad(-3)-math.sin(syne/6.5)/2,0,(math.sin(syne/6.5)*1.5)+math.rad(55)),.1) | |
287 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(-3)-math.sin(syne/6.5)/2,0,-(math.sin(syne/6.5)*1.5)-math.rad(55)),.1) | |
288 | lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-2,0)*CFrame.Angles(math.rad(0),0,math.rad(-2.5)),.1) | |
289 | rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.5,-.1)*CFrame.Angles(math.rad(-17.5),0,math.rad(2.5)),.1) | |
290 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(0),0),.1) | |
291 | rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-(math.sin(syne/6.5)*1.6)+height,math.sin(syne/6.5)/5)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(0)),.025) | |
292 | end | |
293 | if anim=="Jumping" then | |
294 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.55,0)*CFrame.Angles(0,0,math.rad(5)),.1) | |
295 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.55,0)*CFrame.Angles(0,0,math.rad(5)),.1) | |
296 | lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-2,0)*CFrame.Angles(math.rad(0),0,math.rad(-2.5)),.1) | |
297 | rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.5,-.1)*CFrame.Angles(math.rad(-12.5),0,math.rad(2.5)),.125) | |
298 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(20),math.rad(0),0),.1) | |
299 | rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,height,0)*CFrame.Angles(math.rad(5),math.rad(0),math.rad(0)),.025) | |
300 | end | |
301 | if anim=="Falling" then | |
302 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,1,0)*CFrame.Angles(math.rad(15),0,math.rad(175)),.1) | |
303 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,1,0)*CFrame.Angles(math.rad(15),0,math.rad(-175)),.1) | |
304 | lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-2,0)*CFrame.Angles(math.rad(0),0,math.rad(-2.5)),.1) | |
305 | rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.5,0)*CFrame.Angles(math.rad(-7.5),0,math.rad(2.5)),.125) | |
306 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,-.1)*CFrame.Angles(math.rad(-20),math.rad(0),0),.1) | |
307 | 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)),.3) | |
308 | end | |
309 | ||
310 | ||
311 | chr.Humanoid.CameraOffset=(rutprt.CFrame:toObjectSpace(hed.CFrame)).p+Vector3.new(0,-1.25,0) | |
312 | end) |