SHOW:
|
|
- or go back to the newest paste.
1 | local asin = math.asin | |
2 | local atan2 = math.atan2 | |
3 | local rad = math.rad | |
4 | local sin = math.sin | |
5 | local abs = math.abs | |
6 | local ceil = math.ceil | |
7 | local function getAngles(cf) | |
8 | local sx,sy,sz,m00,m01,m02,m10,m11,m12,m20,m21,m22 = cf:components() | |
9 | return atan2(-m12,m22),asin(m02),atan2(-m01,m00) | |
10 | end | |
11 | Lerp = { | |
12 | Number = function(C1,C2,inc) | |
13 | return C1 + (C2 - C1) * inc | |
14 | end; | |
15 | CFrame = function(a,b,m) | |
16 | local c,d={a:components()},{b:components()} | |
17 | table.foreach(c,function(a,b)c[a]=c[a]+(d[a]-c[a])*m end) | |
18 | return CFrame.new(unpack(c)) | |
19 | end; | |
20 | } | |
21 | local function genWeld(a,b) | |
22 | local w = Instance.new("Weld",a) | |
23 | w.Part0 = a | |
24 | w.Part1 = b | |
25 | return w | |
26 | end | |
27 | Part = function(x,y,z,color,tr,cc,an,parent) | |
28 | local p = Instance.new('Part',parent or Weapon) | |
29 | p.formFactor = 'Custom' | |
30 | p.Size = Vector3.new(x,y,z) | |
31 | p.BrickColor = BrickColor.new(color) | |
32 | p.CanCollide = cc | |
33 | p.Transparency = tr | |
34 | p.Anchored = an | |
35 | p.TopSurface,p.BottomSurface = 0,0 | |
36 | p:BreakJoints() | |
37 | return p | |
38 | end | |
39 | Weld = function(p0,p1,x,y,z,rx,ry,rz,par) | |
40 | local w = Instance.new('Motor',par or p0) | |
41 | w.Part0 = p0 | |
42 | w.Part1 = p1 | |
43 | w.C1 = CFrame.new(x,y,z)*CFrame.Angles(rx,ry,rz) | |
44 | return w | |
45 | end | |
46 | Mesh = function(par,num,x,y,z) | |
47 | local msh = nil | |
48 | if num == 1 then | |
49 | msh = Instance.new("CylinderMesh",par) | |
50 | elseif num == 2 then | |
51 | msh = Instance.new("SpecialMesh",par) | |
52 | msh.MeshType = 'Wedge' | |
53 | elseif num == 3 then | |
54 | msh = Instance.new("BlockMesh",par) | |
55 | elseif type(num) == 'string' then | |
56 | msh = Instance.new("SpecialMesh",par) | |
57 | msh.MeshId = num | |
58 | end | |
59 | msh.Scale = Vector3.new(x,y,z) | |
60 | return msh | |
61 | end | |
62 | anglespeed = 1 | |
63 | yeet = 0 | |
64 | dnc=0 | |
65 | count = 0 | |
66 | angle = 0 | |
67 | counttime = 50 | |
68 | countspeed = 1 | |
69 | speed = 1 | |
70 | hats={} | |
71 | song={} | |
72 | local plr=game.Players.LocalPlayer | |
73 | local pchar=plr.Character | |
74 | local torso=pchar.Torso | |
75 | local mos=plr:GetMouse() | |
76 | local Neck = genWeld(pchar.Torso,pchar.Head) | |
77 | Neck.C0 = CFrame.new(0,1,0) | |
78 | Neck.C1 = CFrame.new(0,-0.5,0) | |
79 | local LeftShoulder = genWeld(pchar.Torso,pchar['Left Arm']) | |
80 | LeftShoulder.C0 = CFrame.new(-1,0.5,0) | |
81 | LeftShoulder.C1 = CFrame.new(0.5,0.5,0) | |
82 | RightShoulder = genWeld(pchar.Torso,pchar['Right Arm']) | |
83 | RightShoulder.C0 = CFrame.new(1,0.5,0) | |
84 | RightShoulder.C1 = CFrame.new(-0.5,0.5,0) | |
85 | local LeftHip = genWeld(pchar.Torso,pchar['Left Leg']) | |
86 | LeftHip.C0 = CFrame.new(-1,-1,0) | |
87 | LeftHip.C1 = CFrame.new(-0.5,1,0) | |
88 | local RightHip = genWeld(pchar.Torso,pchar['Right Leg']) | |
89 | RightHip.C0 = CFrame.new(1,-1,0) | |
90 | RightHip.C1 = CFrame.new(0.5,1,0) | |
91 | local RootJoint = genWeld(pchar.HumanoidRootPart,pchar.Torso) | |
92 | RootJoint.C0 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/2,0,math.pi) | |
93 | RootJoint.C1 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/2,0,math.pi) | |
94 | local mainp=Part(2.01,2.01,1.01,'Black',0,false,false,pchar) | |
95 | Weld(torso,mainp,0,0,0,0,0,0,mainp) | |
96 | local p=Part(2.02,1.2,1.02,'Lavender',0,false,false,pchar) | |
97 | Weld(mainp,p,0,.41,0,0,0,0,p) | |
98 | local p=Part(2.02,2.03,.5,'Lavender',0,false,false,pchar) | |
99 | Weld(mainp,p,0,0,-0.26,0,0,0,p) | |
100 | local p=Part(.5,1,1.02,'Lavender',0,false,false,pchar) | |
101 | Weld(mainp,p,-0.2,-0.65,0,0,0,rad(30),p) | |
102 | local p=Part(.5,1,1.02,'Lavender',0,false,false,pchar) | |
103 | Weld(mainp,p,0.2,-0.65,0,0,0,-rad(30),p) | |
104 | local p=Part(.5,1,1.02,'Lavender',0,false,false,pchar) | |
105 | Weld(mainp,p,.76,-0.51,0,0,0,0,p) | |
106 | local p=Part(.5,1,1.02,'Lavender',0,false,false,pchar) | |
107 | Weld(mainp,p,-.76,-0.51,0,0,0,0,p) | |
108 | local p=Part(1.01,2.01,1.01,'CGA brown',0,false,false,pchar) | |
109 | - | local p=Part(1.01,2.01,1.01,'Nougat',0,false,false,pchar) |
109 | + | |
110 | local p=Part(1.02,1.25,1.02,'Lavender',0,false,false,pchar) | |
111 | Weld(pchar['Right Arm'],p,0,-0.41,0,0,0,0,p) | |
112 | local p=Part(1.01,2.01,1.01,'CGA brown',0,false,false,pchar) | |
113 | - | local p=Part(1.01,2.01,1.01,'Nougat',0,false,false,pchar) |
113 | + | |
114 | local p=Part(1.02,1.25,1.02,'Lavender',0,false,false,pchar) | |
115 | Weld(pchar['Left Arm'],p,0,-0.41,0,0,0,0,p) | |
116 | local p=Part(1.01,2.01,1.01,'Dark stone grey',0,false,false,pchar) | |
117 | Weld(pchar['Right Leg'],p,0,0,0,0,0,0,p) | |
118 | local p=Part(1.01,2.01,1.01,'Dark stone grey',0,false,false,pchar) | |
119 | Weld(pchar['Left Leg'],p,0,0,0,0,0,0,p) | |
120 | local p=Part(2,1,1,'CGA brown',0,false,false,pchar) | |
121 | - | local p=Part(2,1,1,'Nougat',0,false,false,pchar) |
121 | + | |
122 | h=Mesh(p,2,1.25,1.25,1.25) | |
123 | h.MeshType='Head' | |
124 | function face(id) | |
125 | pchar.Head.face.Texture='http://www.roblox.com/asset/?id='..id | |
126 | end | |
127 | ||
128 | function addh(id,txt,s1,s2,s3,x,y,z) | |
129 | local hat=Part(1,1,1,'',0,false,false,pchar) | |
130 | table.insert(hats,hat) | |
131 | Weld(pchar.Head,hat,x,y,z,0,0,0,p) | |
132 | m=Mesh(hat,'http://www.roblox.com/asset/?id='..id,s1,s2,s3) | |
133 | m.TextureId='http://www.roblox.com/asset/?id='..txt | |
134 | return m | |
135 | end | |
136 | ||
137 | function clearhats() | |
138 | for i=1,#hats do | |
139 | hats[i]:Destroy() | |
140 | end | |
141 | hats={} | |
142 | end | |
143 | ||
144 | function so(id,pi) | |
145 | local s = Instance.new("Sound",torso) | |
146 | s.Looped=true | |
147 | s.Pitch=pi | |
148 | s.SoundId = "http://roblox.com/asset/?id="..id | |
149 | s.Volume=1 | |
150 | table.insert(song,s) | |
151 | s:play() | |
152 | end | |
153 | ||
154 | function killsong() | |
155 | for i=1,#song do | |
156 | song[i]:stop() | |
157 | song[i]:Destroy() | |
158 | end | |
159 | song={} | |
160 | end | |
161 | ||
162 | local function newLerpTo(weld) | |
163 | return { | |
164 | Weld = weld; -- The weld that will lerp | |
165 | To = weld.C0; -- Where it will lerp to; a CFrame | |
166 | Cache = weld.C0; -- Cache of original position; it helps when making anim keyframes | |
167 | Speed = 0.1; -- Speed of lerp. 0.1 or 0.2 is best | |
168 | } | |
169 | end | |
170 | LerpTo = { | |
171 | Neck = newLerpTo(Neck); | |
172 | LeftArm = newLerpTo(LeftShoulder); | |
173 | RightArm = newLerpTo(RightShoulder); | |
174 | LeftLeg = newLerpTo(LeftHip); | |
175 | RightLeg = newLerpTo(RightHip); | |
176 | RootJoint = newLerpTo(RootJoint); | |
177 | } | |
178 | for _,v in pairs(pchar:GetChildren()) do | |
179 | if v.ClassName=="Hat" then | |
180 | v:remove() | |
181 | end | |
182 | end | |
183 | ||
184 | pchar.Head.Transparency=.99 | |
185 | ||
186 | ||
187 | mos.KeyDown:connect(function(key) | |
188 | if(key == "q")then--tunak | |
189 | q=not q | |
190 | if q==true then | |
191 | dnc=0 | |
192 | face('22815795') | |
193 | addh('11380070','11380053',1,1,1,0,-.75,0) | |
194 | so('162682002',1) | |
195 | Spawn(function() | |
196 | while true do wait() | |
197 | dnc=1 | |
198 | for i=1,5 do | |
199 | if q==false then dnc=0 break end | |
200 | wait(1) | |
201 | end | |
202 | dnc=2 | |
203 | for i=1,5 do | |
204 | if q==false then dnc=0 break end | |
205 | wait(1) | |
206 | end | |
207 | dnc=3 | |
208 | for i=1,5 do | |
209 | if q==false then dnc=0 break end | |
210 | wait(1) | |
211 | end | |
212 | end | |
213 | end) | |
214 | else | |
215 | killsong() | |
216 | clearhats() | |
217 | end | |
218 | end | |
219 | if(key == "t")then-- swing | |
220 | q=not q | |
221 | if q==true then | |
222 | dnc=0 | |
223 | face('13079565') | |
224 | addh('1285237','63036639',1.1,1.1,1.1,0,-.6,0) | |
225 | so('279810112',1) | |
226 | - | so('154479412',1) |
226 | + | |
227 | while true do wait() | |
228 | dnc=9 | |
229 | for i=1,5 do | |
230 | if q==false then dnc=0 break end | |
231 | wait(1) | |
232 | end | |
233 | dnc=9 | |
234 | for i=1,5 do | |
235 | if q==false then dnc=0 break end | |
236 | wait(1) | |
237 | end | |
238 | end | |
239 | end) | |
240 | else | |
241 | killsong() | |
242 | clearhats() | |
243 | end | |
244 | end | |
245 | if(key == "e")then-- touch | |
246 | q=not q | |
247 | if q==true then | |
248 | dnc=0 | |
249 | face('114968735') | |
250 | addh('1577360','1577349',1,1,1,0,-.25,.2) | |
251 | addh('169415286','169415338',2.5,2.5,2.5,0,-.7,-.15) | |
252 | so('142691408',1) | |
253 | - | so('168007346',1) |
253 | + | |
254 | while true do wait() | |
255 | dnc=4 | |
256 | for i=1,5 do | |
257 | if q==false then dnc=0 break end | |
258 | wait(1) | |
259 | end | |
260 | dnc=5 | |
261 | for i=1,5 do | |
262 | if q==false then dnc=0 break end | |
263 | wait(1) | |
264 | end | |
265 | dnc=6 | |
266 | for i=1,5 do | |
267 | if q==false then dnc=0 break end | |
268 | wait(1) | |
269 | end | |
270 | end | |
271 | end) | |
272 | else | |
273 | killsong() | |
274 | clearhats() | |
275 | end | |
276 | end | |
277 | if(key == "r")then-- op | |
278 | q=not q | |
279 | if q==true then | |
280 | dnc=0 | |
281 | face('13079565') | |
282 | addh('13640868','18987684',1,1,1,0,-.8,0) | |
283 | addh('13332444','13332337',1,1,1,0,-.25,0) | |
284 | addh('68251147','67995474',1,1,1,0,-.2,0.17) | |
285 | so('516079827',1) | |
286 | - | so('130844430',1) |
286 | + | |
287 | while true do wait() | |
288 | dnc=7 | |
289 | for i=1,5 do | |
290 | if q==false then dnc=0 break end | |
291 | wait(1) | |
292 | end | |
293 | dnc=8 | |
294 | for i=1,5 do | |
295 | if q==false then dnc=0 break end | |
296 | wait(1) | |
297 | end | |
298 | end | |
299 | end) | |
300 | else | |
301 | killsong() | |
302 | clearhats() | |
303 | end | |
304 | end | |
305 | end) | |
306 | ||
307 | local function updateanims() | |
308 | if dnc==0 then | |
309 | if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then | |
310 | anglespeed = 1/2 | |
311 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(sin(yeet)*0.05,0,0) | |
312 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,0,0) | |
313 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(sin(yeet)*0.1,0,0) | |
314 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(-sin(yeet)*0.1,0,0) | |
315 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,abs(sin(yeet))*0.1) | |
316 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-abs(sin(yeet))*0.1) | |
317 | end | |
318 | if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then | |
319 | anglespeed = 4 | |
320 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,math.sin(yeet)*0.05) | |
321 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(-sin(yeet)*.8,0,rad(10)) | |
322 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(sin(yeet)*.8,0,-rad(10)) | |
323 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(sin(yeet)*.8,0,0) | |
324 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-sin(yeet)*.8,0,0) | |
325 | end | |
326 | end | |
327 | if dnc==1 then | |
328 | anglespeed = 5 | |
329 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(sin(angle)*0.05,0,0) | |
330 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,sin(angle)*0.15,0) * CFrame.new(0,abs(sin(angle))*0.1,0) | |
331 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(80)-sin(yeet)*0.2,0,-rad(65)) | |
332 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(80)-sin(yeet)*0.2,0,rad(65)) | |
333 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(20)+sin(angle)*0.5,0,0) | |
334 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(rad(20)-sin(angle)*0.5,0,0) | |
335 | end | |
336 | if dnc==2 then | |
337 | anglespeed = 2 | |
338 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(sin(angle)*0.05,-rad(20),0) | |
339 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,abs(sin(angle))*0.1,0) | |
340 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(80)-sin(angle)*0.5,0,rad(20)) | |
341 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(0,0,-abs(sin(angle))*0.3) | |
342 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,abs(sin(yeet))*0.3) | |
343 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-abs(sin(yeet))*0.3) | |
344 | end | |
345 | if dnc==3 then | |
346 | anglespeed = 3 | |
347 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(sin(angle)*0.05,0,0) | |
348 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,abs(sin(angle))*0.3,0) | |
349 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(-rad(180),0,math.pi/30-math.sin(-angle)*0.2) | |
350 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(-rad(180),0,-math.pi/30-math.sin(-angle)*0.2) | |
351 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(sin(yeet)*0.3,0,0) | |
352 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-sin(yeet)*0.3,0,0) | |
353 | end | |
354 | if dnc==4 then | |
355 | anglespeed = 3 | |
356 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,sin(yeet)*0.1) | |
357 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,0,0) | |
358 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(10),rad(30),rad(10)) * CFrame.new(0,-abs(sin(yeet))*0.2,0) | |
359 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(10),-rad(30),-rad(10)) * CFrame.new(0,-abs(sin(yeet))*0.2,0) | |
360 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,abs(sin(yeet))*0.1) | |
361 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-abs(sin(yeet))*0.1) | |
362 | end | |
363 | if dnc==5 then | |
364 | anglespeed = 3 | |
365 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(rad(10),0,sin(yeet)*0.1) | |
366 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(rad(20),sin(angle)*0.2,sin(angle)*0.5) * CFrame.new(0,-abs(sin(angle))*0.5,0) | |
367 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90)-sin(yeet)*0.5,0,-rad(10)) | |
368 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90)-sin(yeet)*0.5,0,rad(10)) | |
369 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(20),0,abs(sin(yeet))*0.1) | |
370 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(rad(20),0,-abs(sin(yeet))*0.1) | |
371 | end | |
372 | if dnc==6 then | |
373 | anglespeed = 3 | |
374 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,sin(angle)*1,sin(yeet)*0.1) | |
375 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(sin(angle)*1,0,0) | |
376 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(10),rad(30),-rad(10)) * CFrame.new(0,-abs(sin(yeet))*0.2,0) | |
377 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(10),-rad(30),rad(10)) * CFrame.new(0,-abs(sin(yeet))*0.2,0) | |
378 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,abs(sin(yeet))*0.2) | |
379 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-abs(sin(yeet))*0.2) | |
380 | end | |
381 | if dnc==7 then | |
382 | anglespeed = 4 | |
383 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,-sin(yeet)*0.2,0) | |
384 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,sin(yeet)*0.2) * CFrame.new(0,0,-abs(sin(yeet))*0.4) | |
385 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(80)+sin(yeet)*0.2,0,-rad(50)) *CFrame.new(0,-.5,0) | |
386 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90)+sin(yeet)*0.2,0,rad(50))*CFrame.new(0,-.5,0) | |
387 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,rad(20)+sin(yeet)*0.5) *CFrame.new(0,abs(sin(yeet))*0.3,0) | |
388 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-rad(20)+sin(yeet)*0.5) *CFrame.new(0,abs(sin(yeet))*0.3,0) | |
389 | end | |
390 | if dnc==8 then | |
391 | anglespeed = 4 | |
392 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,-sin(yeet)*0.2,0) | |
393 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,sin(yeet)*0.2) * CFrame.new(0,0,-abs(sin(yeet))*0.4) | |
394 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(180)+sin(yeet)*.3,0,sin(yeet)*.3) | |
395 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90)+sin(yeet)*0.2,0,rad(50))*CFrame.new(0,-.5,0) | |
396 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,rad(20)+sin(yeet)*0.5) *CFrame.new(0,abs(sin(yeet))*0.3,0) | |
397 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-rad(20)+sin(yeet)*0.5) *CFrame.new(0,abs(sin(yeet))*0.3,0) | |
398 | end | |
399 | if dnc==9 then | |
400 | anglespeed = 4 | |
401 | LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,-sin(yeet)*0.2,0) | |
402 | LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,sin(yeet)*0.2) | |
403 | LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(80)+sin(yeet)*0.2,0,-rad(50)) *CFrame.new(0,-.5,0) | |
404 | LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90)+sin(yeet)*0.2,0,rad(50))*CFrame.new(0,-.5,0) | |
405 | LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,rad(20)+sin(yeet)*0.5) *CFrame.new(0,abs(sin(yeet))*0.3,0) | |
406 | LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-rad(20)+sin(yeet)*0.5) *CFrame.new(0,abs(sin(yeet))*0.3,0) | |
407 | end | |
408 | end | |
409 | Spawn(function() | |
410 | while wait()do | |
411 | count = (count%counttime)+countspeed | |
412 | angle = math.pi*math.sin((math.pi*2)/counttime*count) | |
413 | yeet = (yeet % 100) + anglespeed/10 | |
414 | end | |
415 | end) | |
416 | game:service'RunService'.RenderStepped:connect(function() | |
417 | for _,v in pairs(LerpTo) do | |
418 | v.Weld.C0 = Lerp.CFrame(v.Weld.C0,v.To,v.Speed) | |
419 | end | |
420 | updateanims() | |
421 | end) |