SHOW:
|
|
- or go back to the newest paste.
| 1 | script.Parent = nil | |
| 2 | ||
| 3 | function fly() | |
| 4 | ||
| 5 | for i,v in pairs(script:GetChildren()) do | |
| 6 | ||
| 7 | pcall(function() v.Value = "" end) | |
| 8 | ||
| 9 | game:GetService("Debris"):AddItem(v,.1)
| |
| 10 | ||
| 11 | end | |
| 12 | ||
| 13 | function weld(p0,p1,c0,c1,par) | |
| 14 | ||
| 15 | local w = Instance.new("Weld",p0 or par)
| |
| 16 | ||
| 17 | w.Part0 = p0 | |
| 18 | ||
| 19 | w.Part1 = p1 | |
| 20 | ||
| 21 | w.C0 = c0 or CFrame.new() | |
| 22 | ||
| 23 | w.C1 = c1 or CFrame.new() | |
| 24 | ||
| 25 | return w | |
| 26 | ||
| 27 | end | |
| 28 | ||
| 29 | local motors = {}
| |
| 30 | ||
| 31 | function motor(p0,p1,c0,c1,des,vel,par) | |
| 32 | ||
| 33 | local w = Instance.new("Motor6D",p0 or par)
| |
| 34 | ||
| 35 | w.Part0 = p0 | |
| 36 | ||
| 37 | w.Part1 = p1 | |
| 38 | ||
| 39 | w.C0 = c0 or CFrame.new() | |
| 40 | ||
| 41 | w.C1 = c1 or CFrame.new() | |
| 42 | ||
| 43 | w.MaxVelocity = tonumber(vel) or .05 | |
| 44 | ||
| 45 | w.DesiredAngle = tonumber(des) or 0 | |
| 46 | ||
| 47 | return w | |
| 48 | ||
| 49 | end | |
| 50 | ||
| 51 | function lerp(a,b,c) | |
| 52 | ||
| 53 | return a+(b-a)*c | |
| 54 | ||
| 55 | end | |
| 56 | ||
| 57 | function clerp(c1,c2,al) | |
| 58 | ||
| 59 | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
| |
| 60 | ||
| 61 | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
| |
| 62 | ||
| 63 | for i,v in pairs(com1) do | |
| 64 | ||
| 65 | com1[i] = lerp(v,com2[i],al) | |
| 66 | ||
| 67 | end | |
| 68 | ||
| 69 | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) | |
| 70 | ||
| 71 | end | |
| 72 | ||
| 73 | function ccomplerp(c1,c2,al) | |
| 74 | ||
| 75 | local com1 = {c1:components()}
| |
| 76 | ||
| 77 | local com2 = {c2:components()}
| |
| 78 | ||
| 79 | for i,v in pairs(com1) do | |
| 80 | ||
| 81 | com1[i] = lerp(v,com2[i],al) | |
| 82 | ||
| 83 | end | |
| 84 | ||
| 85 | return CFrame.new(unpack(com1)) | |
| 86 | ||
| 87 | end | |
| 88 | ||
| 89 | function tickwave(time,length,offset) | |
| 90 | ||
| 91 | return (math.abs((tick()+(offset or 0))%time-time/2)*2-time/2)/time/2*length | |
| 92 | ||
| 93 | end | |
| 94 | ||
| 95 | function invcol(c) | |
| 96 | ||
| 97 | c = c.Color | |
| 98 | ||
| 99 | return BrickColor.new(Color3.new(1-c.b,1-c.g,1-c.r)) | |
| 100 | ||
| 101 | end | |
| 102 | ||
| 103 | local oc = oc or function(...) return ... end | |
| 104 | ||
| 105 | local plr = game.Players.LocalPlayer | |
| 106 | ||
| 107 | local char = plr.Character | |
| 108 | ||
| 109 | local tor = char.Torso | |
| 110 | ||
| 111 | local hum = char.Humanoid | |
| 112 | ||
| 113 | hum.PlatformStand = false | |
| 114 | ||
| 115 | pcall(function() | |
| 116 | ||
| 117 | char.Wings:Destroy() | |
| 118 | ||
| 119 | end) | |
| 120 | ||
| 121 | pcall(function() | |
| 122 | ||
| 123 | char.Angel:Destroy() -- hat | |
| 124 | ||
| 125 | end) | |
| 126 | ||
| 127 | local mod = Instance.new("Model",char)
| |
| 128 | ||
| 129 | mod.Name = "Wings" | |
| 130 | ||
| 131 | local special = {
| |
| 132 | ||
| 133 | --antiboomz0r = {"Really black","Institutional white",0,0,false,Color3.new(1,1,.95),Color3.new(1,1,.6)},
| |
| 134 | ||
| 135 | antiboomz0r = {"New Yeller",nil,0.4,0.7,true,Color3.new(1,1,.95),Color3.new(1,1,.6)},
| |
| 136 | ||
| 137 | --antiboomz0r = {"Cyan","Toothpaste",0,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
| |
| 138 | ||
| 139 | taart = {"Royal purple",nil,.4,.4,true},
| |
| 140 | ||
| 141 | mitta = {"Black",nil,0,0,false},
| |
| 142 | ||
| 143 | penjuin3 = {"White",nil,0,0,false},
| |
| 144 | ||
| 145 | thepc8110 = {"Black","Bright red",.5,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
| |
| 146 | ||
| 147 | nonspeaker = {"Cyan","Toothpaste",0,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
| |
| 148 | ||
| 149 | littleau999 = {"Reddish brown",1030,0,0,false},
| |
| 150 | ||
| 151 | - | SmokeDelsin = {"Really black","Really black",.2,0,true,Color3.new(0,0,0),Color3.new(0,0,0)},
|
| 151 | + | unscripter = {"Really black","Really black",.2,0,true,Color3.new(0,0,0),Color3.new(0,0,0)},
|
| 152 | ||
| 153 | - | SmokeDelsin = {"White","Really black",.2,0,false,Color3.new(0,0,0),Color3.new(0,0,0)},
|
| 153 | + | oxcool1 = {"Really black","White",.2,0,false,Color3.new(0,0,0),Color3.new(0,0,0)},
|
| 154 | ||
| 155 | - | SmokeDelsin = {"Really black",nil,0,0,tre},
|
| 155 | + | krodmiss = {"Really black",nil,0,0,false},
|
| 156 | ||
| 157 | } | |
| 158 | ||
| 159 | - | local topcolor = char.Torso.BrickColor |
| 159 | + | local topcolor = invcol(char.Torso.BrickColor) |
| 160 | ||
| 161 | local feacolor = char.Torso.BrickColor | |
| 162 | ||
| 163 | local ptrans = 0 | |
| 164 | ||
| 165 | local pref = 0 | |
| 166 | ||
| 167 | local fire = false | |
| 168 | ||
| 169 | local fmcol = Color3.new() | |
| 170 | ||
| 171 | local fscol = Color3.new() | |
| 172 | ||
| 173 | local spec = special[plr.Name:lower()] | |
| 174 | ||
| 175 | if spec then | |
| 176 | ||
| 177 | topcolor,feacolor,ptrans,pref,fire,fmcol,fscol = spec[1] and BrickColor.new(spec[1]) or topcolor,spec[2] and BrickColor.new(spec[2]) or feacolor,spec[3],spec[4],spec[5],spec[6],spec[7] | |
| 178 | ||
| 179 | end | |
| 180 | ||
| 181 | local part = Instance.new("Part")
| |
| 182 | ||
| 183 | part.FormFactor = "Custom" | |
| 184 | ||
| 185 | part.Size = Vector3.new(.2,.2,.2) | |
| 186 | ||
| 187 | part.TopSurface,part.BottomSurface = 0,0 | |
| 188 | ||
| 189 | part.CanCollide = false | |
| 190 | ||
| 191 | part.BrickColor = topcolor | |
| 192 | ||
| 193 | part.Transparency = ptrans | |
| 194 | ||
| 195 | part.Reflectance = pref | |
| 196 | ||
| 197 | local ef = Instance.new("Fire",fire and part or nil)
| |
| 198 | ||
| 199 | ef.Size = .15 | |
| 200 | ||
| 201 | ef.Color = fmcol or Color3.new() | |
| 202 | ||
| 203 | ef.SecondaryColor = fscol or Color3.new() | |
| 204 | ||
| 205 | part:BreakJoints() | |
| 206 | ||
| 207 | ||
| 208 | function newpart() | |
| 209 | ||
| 210 | local clone = part:Clone() | |
| 211 | ||
| 212 | clone.Parent = mod | |
| 213 | ||
| 214 | clone:BreakJoints() | |
| 215 | ||
| 216 | return clone | |
| 217 | ||
| 218 | end | |
| 219 | ||
| 220 | local feath = newpart() | |
| 221 | ||
| 222 | feath.BrickColor = feacolor | |
| 223 | ||
| 224 | feath.Transparency = 0 | |
| 225 | ||
| 226 | Instance.new("SpecialMesh",feath).MeshType = "Sphere"
| |
| 227 | ||
| 228 | function newfeather() | |
| 229 | ||
| 230 | local clone = feath:Clone() | |
| 231 | ||
| 232 | clone.Parent = mod | |
| 233 | ||
| 234 | clone:BreakJoints() | |
| 235 | ||
| 236 | return clone | |
| 237 | ||
| 238 | end | |
| 239 | ||
| 240 | ||
| 241 | ---------- RIGHT WING | |
| 242 | ||
| 243 | local r1 = newpart() | |
| 244 | ||
| 245 | r1.Size = Vector3.new(.3,1.5,.3)*1.2 | |
| 246 | ||
| 247 | local rm1 = motor(tor,r1,CFrame.new(.35,.6,.4) * CFrame.Angles(0,0,math.rad(-60)) * CFrame.Angles(math.rad(30),math.rad(-25),0),CFrame.new(0,-.8,0),.1) | |
| 248 | ||
| 249 | local r2 = newpart() | |
| 250 | ||
| 251 | r2.Size = Vector3.new(.4,1.8,.4)*1.2 | |
| 252 | ||
| 253 | local rm2 = motor(r1,r2,CFrame.new(0,.75,0) * CFrame.Angles(0,0,math.rad(50)) * CFrame.Angles(math.rad(-30),math.rad(15),0),CFrame.new(0,-.9,0),.1) | |
| 254 | ||
| 255 | local r3 = newpart() | |
| 256 | ||
| 257 | r3.Size = Vector3.new(.3,2.2,.3)*1.2 | |
| 258 | ||
| 259 | local rm3 = motor(r2,r3,CFrame.new(.1,.9,0) * CFrame.Angles(0,0,math.rad(-140)) * CFrame.Angles(math.rad(-3),0,0),CFrame.new(0,-1.1,0),.1) | |
| 260 | ||
| 261 | local r4 = newpart() | |
| 262 | ||
| 263 | r4.Size = Vector3.new(.25,1.2,.25)*1.2 | |
| 264 | ||
| 265 | local rm4 = motor(r3,r4,CFrame.new(0,1.1,0) * CFrame.Angles(0,0,math.rad(-10)) * CFrame.Angles(math.rad(-3),0,0),CFrame.new(0,-.6,0),.1) | |
| 266 | ||
| 267 | local feather = newfeather() | |
| 268 | ||
| 269 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
| 270 | ||
| 271 | feather.Size = Vector3.new(.4,3,.3) | |
| 272 | ||
| 273 | weld(r4,feather,CFrame.new(-.1,-.3,0),CFrame.new(0,-1.5,0)) | |
| 274 | ||
| 275 | feather = newfeather() | |
| 276 | ||
| 277 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
| 278 | ||
| 279 | feather.Size = Vector3.new(.4,2.3,.3) | |
| 280 | ||
| 281 | weld(r4,feather,CFrame.new(.1,-.1,0) * CFrame.Angles(0,math.random()*.1,0),CFrame.new(0,-1.1,0)) | |
| 282 | ||
| 283 | feather = newfeather() | |
| 284 | ||
| 285 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
| 286 | ||
| 287 | feather.Size = Vector3.new(.35,2.2,.25) | |
| 288 | ||
| 289 | weld(r4,feather,CFrame.new(.1,-.3,0) * CFrame.Angles(0,math.random()*.1,math.rad(-10)),CFrame.new(0,-1.1,0)) | |
| 290 | ||
| 291 | local rf3 = {}
| |
| 292 | ||
| 293 | for i=0,7 do | |
| 294 | ||
| 295 | feather = newfeather() | |
| 296 | ||
| 297 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
| 298 | ||
| 299 | feather.Size = Vector3.new(.45,2.2,.35) | |
| 300 | ||
| 301 | table.insert(rf3,motor(r3,feather,CFrame.new(.05,1-i*.285,0) * CFrame.Angles(0,math.random()*.1,math.rad(-25-i*2)),CFrame.new(0,-feather.Size.Y/2,0))) | |
| 302 | ||
| 303 | end | |
| 304 | ||
| 305 | local rf2 = {}
| |
| 306 | ||
| 307 | for i=0,6 do | |
| 308 | ||
| 309 | feather = newfeather() | |
| 310 | ||
| 311 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
| 312 | ||
| 313 | feather.Size = Vector3.new(.45,2.2-i*.08,.3) | |
| 314 | ||
| 315 | table.insert(rf2,motor(r2,feather,CFrame.new(.05,.75-i*.26,0) * CFrame.Angles(0,math.random()*.1,math.rad(-75-i*4)),CFrame.new(0,-feather.Size.Y/2,0))) | |
| 316 | ||
| 317 | end | |
| 318 | ||
| 319 | local rf1 = {}
| |
| 320 | ||
| 321 | for i=0,6 do | |
| 322 | ||
| 323 | feather = newfeather() | |
| 324 | ||
| 325 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
| 326 | ||
| 327 | feather.Size = Vector3.new(.37,1.65-i*.06,.25) | |
| 328 | ||
| 329 | table.insert(rf1,motor(r1,feather,CFrame.new(.05,.63-i*.21,0) * CFrame.Angles(0,math.random()*.05,math.rad(-75)),CFrame.new(0,-feather.Size.Y/2,0))) | |
| 330 | ||
| 331 | end | |
| 332 | ||
| 333 | ---------- LEFT WING | |
| 334 | ||
| 335 | local l1 = newpart() | |
| 336 | ||
| 337 | l1.Size = Vector3.new(.3,1.5,.3)*1.2 | |
| 338 | ||
| 339 | local lm1 = motor(tor,l1,CFrame.new(-.35,.6,.4) * CFrame.Angles(0,0,math.rad(60)) * CFrame.Angles(math.rad(30),math.rad(25),0) * CFrame.Angles(0,-math.pi,0),CFrame.new(0,-.8,0) ,.1) | |
| 340 | ||
| 341 | local l2 = newpart() | |
| 342 | ||
| 343 | l2.Size = Vector3.new(.4,1.8,.4)*1.2 | |
| 344 | ||
| 345 | local lm2 = motor(l1,l2,CFrame.new(0,.75,0) * CFrame.Angles(0,0,math.rad(50)) * CFrame.Angles(math.rad(30),math.rad(-15),0),CFrame.new(0,-.9,0),.1) | |
| 346 | ||
| 347 | local l3 = newpart() | |
| 348 | ||
| 349 | l3.Size = Vector3.new(.3,2.2,.3)*1.2 | |
| 350 | ||
| 351 | local lm3 = motor(l2,l3,CFrame.new(.1,.9,0) * CFrame.Angles(0,0,math.rad(-140)) * CFrame.Angles(math.rad(3),0,0),CFrame.new(0,-1.1,0),.1) | |
| 352 | ||
| 353 | local l4 = newpart() | |
| 354 | ||
| 355 | l4.Size = Vector3.new(.25,1.2,.25)*1.2 | |
| 356 | ||
| 357 | local lm4 = motor(l3,l4,CFrame.new(0,1.1,0) * CFrame.Angles(0,0,math.rad(-10)) * CFrame.Angles(math.rad(3),0,0),CFrame.new(0,-.6,0),.1) | |
| 358 | ||
| 359 | local feather = newfeather() | |
| 360 | ||
| 361 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
| 362 | ||
| 363 | feather.Size = Vector3.new(.4,3,.3) | |
| 364 | ||
| 365 | weld(l4,feather,CFrame.new(-.1,-.3,0),CFrame.new(0,-1.5,0)) | |
| 366 | ||
| 367 | feather = newfeather() | |
| 368 | ||
| 369 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
| 370 | ||
| 371 | feather.Size = Vector3.new(.4,2.3,.3) | |
| 372 | ||
| 373 | weld(l4,feather,CFrame.new(.1,-.1,0) * CFrame.Angles(0,math.random()*.1,0),CFrame.new(0,-1.1,0)) | |
| 374 | ||
| 375 | feather = newfeather() | |
| 376 | ||
| 377 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
| 378 | ||
| 379 | feather.Size = Vector3.new(.35,2.2,.25) | |
| 380 | ||
| 381 | weld(l4,feather,CFrame.new(.1,-.3,0) * CFrame.Angles(0,math.random()*.1,math.rad(-10)),CFrame.new(0,-1.1,0)) | |
| 382 | ||
| 383 | local lf3 = {}
| |
| 384 | ||
| 385 | for i=0,7 do | |
| 386 | ||
| 387 | feather = newfeather() | |
| 388 | ||
| 389 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
| 390 | ||
| 391 | feather.Size = Vector3.new(.45,2.2,.35) | |
| 392 | ||
| 393 | table.insert(lf3,motor(l3,feather,CFrame.new(.05,1-i*.285,0) * CFrame.Angles(0,math.random()*.1,math.rad(-25-i*2)),CFrame.new(0,-feather.Size.Y/2,0))) | |
| 394 | ||
| 395 | end | |
| 396 | ||
| 397 | local lf2 = {}
| |
| 398 | ||
| 399 | for i=0,6 do | |
| 400 | ||
| 401 | feather = newfeather() | |
| 402 | ||
| 403 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
| 404 | ||
| 405 | feather.Size = Vector3.new(.45,2.2-i*.08,.3) | |
| 406 | ||
| 407 | table.insert(lf2,motor(l2,feather,CFrame.new(.05,.75-i*.26,0) * CFrame.Angles(0,math.random()*.1,math.rad(-75-i*4)),CFrame.new(0,-feather.Size.Y/2,0))) | |
| 408 | ||
| 409 | end | |
| 410 | ||
| 411 | local lf1 = {}
| |
| 412 | ||
| 413 | for i=0,6 do | |
| 414 | ||
| 415 | feather = newfeather() | |
| 416 | ||
| 417 | feather.Mesh.Scale = Vector3.new(1,1,1) | |
| 418 | ||
| 419 | feather.Size = Vector3.new(.37,1.65-i*.06,.25) | |
| 420 | ||
| 421 | table.insert(lf1,motor(l1,feather,CFrame.new(.05,.63-i*.21,0) * CFrame.Angles(0,math.random()*.05,math.rad(-75)),CFrame.new(0,-feather.Size.Y/2,0))) | |
| 422 | ||
| 423 | end | |
| 424 | ||
| 425 | local rwing = {rm1,rm2,rm3,rm4}
| |
| 426 | ||
| 427 | local lwing = {lm1,lm2,lm3,lm4}
| |
| 428 | ||
| 429 | local oc0 = {}
| |
| 430 | ||
| 431 | for i,v in pairs(rwing) do | |
| 432 | ||
| 433 | oc0[v] = v.C0 | |
| 434 | ||
| 435 | end | |
| 436 | ||
| 437 | for i,v in pairs(lwing) do | |
| 438 | ||
| 439 | oc0[v] = v.C0 | |
| 440 | ||
| 441 | end | |
| 442 | ||
| 443 | function gotResized() | |
| 444 | ||
| 445 | if lastsize then | |
| 446 | ||
| 447 | if tor.Size == lastsize then return end -- This shouldn't happen? | |
| 448 | ||
| 449 | local scaleVec = tor.Size/lastsize | |
| 450 | ||
| 451 | for i,v in pairs(oc0) do | |
| 452 | ||
| 453 | oc0[i] = v-v.p+scaleVec*v.p | |
| 454 | ||
| 455 | end | |
| 456 | ||
| 457 | lastsize = tor.Size | |
| 458 | ||
| 459 | end | |
| 460 | ||
| 461 | lastsize = tor.Size | |
| 462 | ||
| 463 | end | |
| 464 | ||
| 465 | tor.Changed:connect(function(p) | |
| 466 | ||
| 467 | if p == "Size" then | |
| 468 | ||
| 469 | gotResized() | |
| 470 | ||
| 471 | end | |
| 472 | ||
| 473 | end) | |
| 474 | ||
| 475 | gotResized() | |
| 476 | ||
| 477 | local idle = {0,0.5,-.2,0; .05,.05,.1,.05; -.6,-1.5,.1,0;}--0,.3,0,0
| |
| 478 | ||
| 479 | local outlow = {-.7,-.2,1.8,0; .3,.05,.1,.05; .2,0,0,0}
| |
| 480 | ||
| 481 | local outhigh = {.5,-.2,1.8,0; .3,.05,.1,.05; .2,0,0,0}
| |
| 482 | ||
| 483 | local veryhigh = {.9,-.3,1.9,0; .3,.05,.1,.05; .2,0,0,0}
| |
| 484 | ||
| 485 | local flap1 = {-.3,.3,1.1,-.2; .3,.05,.1,.05; .2,-.6,0,0}
| |
| 486 | ||
| 487 | local divebomb = {0,.2,.4,-.7; .3,.05,.1,.05; 0,-.5,-.6,0}
| |
| 488 | ||
| 489 | ||
| 490 | function setwings(tab,time) | |
| 491 | ||
| 492 | time = time or 10 | |
| 493 | ||
| 494 | for i=1,4 do | |
| 495 | ||
| 496 | rwing[i].DesiredAngle = tab[i] | |
| 497 | ||
| 498 | lwing[i].DesiredAngle = tab[i] | |
| 499 | ||
| 500 | rwing[i].MaxVelocity = math.abs(tab[i]-rwing[i].CurrentAngle)/time | |
| 501 | ||
| 502 | lwing[i].MaxVelocity = math.abs(tab[i]-lwing[i].CurrentAngle)/time | |
| 503 | ||
| 504 | local rcf = oc0[rwing[i]] * (tab[12+i] or CFrame.new()) | |
| 505 | ||
| 506 | local lcf = oc0[lwing[i]] * (tab[12+i] or CFrame.new()) | |
| 507 | ||
| 508 | end | |
| 509 | ||
| 510 | for i,v in pairs(rf1) do | |
| 511 | ||
| 512 | v.DesiredAngle = tab[9] | |
| 513 | ||
| 514 | v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time | |
| 515 | ||
| 516 | end | |
| 517 | ||
| 518 | for i,v in pairs(lf1) do | |
| 519 | ||
| 520 | v.DesiredAngle = tab[9] | |
| 521 | ||
| 522 | v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time | |
| 523 | ||
| 524 | end | |
| 525 | ||
| 526 | for i,v in pairs(rf2) do | |
| 527 | ||
| 528 | v.DesiredAngle = tab[10] | |
| 529 | ||
| 530 | v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time | |
| 531 | ||
| 532 | end | |
| 533 | ||
| 534 | for i,v in pairs(lf2) do | |
| 535 | ||
| 536 | v.DesiredAngle = tab[10] | |
| 537 | ||
| 538 | v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time | |
| 539 | ||
| 540 | end | |
| 541 | ||
| 542 | for i,v in pairs(rf3) do | |
| 543 | ||
| 544 | v.DesiredAngle = tab[11] | |
| 545 | ||
| 546 | v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time | |
| 547 | ||
| 548 | end | |
| 549 | ||
| 550 | for i,v in pairs(lf3) do | |
| 551 | ||
| 552 | v.DesiredAngle = tab[11] | |
| 553 | ||
| 554 | v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time | |
| 555 | ||
| 556 | end | |
| 557 | ||
| 558 | end | |
| 559 | ||
| 560 | setwings(outhigh,1) | |
| 561 | ||
| 562 | flying = false | |
| 563 | ||
| 564 | moving = false | |
| 565 | ||
| 566 | for i,v in pairs(tor:GetChildren()) do | |
| 567 | ||
| 568 | if v.ClassName:lower():match("body") then
| |
| 569 | ||
| 570 | v:Destroy() | |
| 571 | ||
| 572 | end | |
| 573 | ||
| 574 | end | |
| 575 | ||
| 576 | local ctor = tor:Clone() | |
| 577 | ||
| 578 | ctor:ClearAllChildren() | |
| 579 | ||
| 580 | ctor.Name = "cTorso" | |
| 581 | ||
| 582 | ctor.Transparency = 1 | |
| 583 | ||
| 584 | ctor.CanCollide = false | |
| 585 | ||
| 586 | ctor.FormFactor = "Custom" | |
| 587 | ||
| 588 | ctor.Size = Vector3.new(.2,.2,.2) | |
| 589 | ||
| 590 | ctor.Parent = mod | |
| 591 | ||
| 592 | weld(tor,ctor) | |
| 593 | ||
| 594 | local bg = Instance.new("BodyGyro",ctor)
| |
| 595 | ||
| 596 | bg.maxTorque = Vector3.new() | |
| 597 | ||
| 598 | bg.P = 15000 | |
| 599 | ||
| 600 | bg.D = 1000 | |
| 601 | ||
| 602 | local bv = Instance.new("BodyVelocity",ctor)
| |
| 603 | ||
| 604 | bv.maxForce = Vector3.new() | |
| 605 | ||
| 606 | bv.P = 15000 | |
| 607 | ||
| 608 | vel = Vector3.new() | |
| 609 | ||
| 610 | cf = CFrame.new() | |
| 611 | ||
| 612 | flspd = 0 | |
| 613 | ||
| 614 | ||
| 615 | keysdown = {}
| |
| 616 | ||
| 617 | keypressed = {}
| |
| 618 | ||
| 619 | ktime = {}
| |
| 620 | ||
| 621 | descendtimer = 0 | |
| 622 | ||
| 623 | jumptime = tick() | |
| 624 | ||
| 625 | hum.Jumping:connect(function() | |
| 626 | ||
| 627 | jumptime = tick() | |
| 628 | ||
| 629 | end) | |
| 630 | ||
| 631 | cam = workspace.CurrentCamera | |
| 632 | ||
| 633 | kd = plr:GetMouse().KeyDown:connect(oc(function(key) | |
| 634 | ||
| 635 | keysdown[key] = true | |
| 636 | ||
| 637 | keypressed[key] = true | |
| 638 | ||
| 639 | if key == "q" then | |
| 640 | ||
| 641 | descendtimer = tick() | |
| 642 | ||
| 643 | elseif key == " " and not hum.Jump then | |
| 644 | ||
| 645 | jumptime = tick() | |
| 646 | ||
| 647 | elseif (key == "a" or key == "d") and ktime[key] and tick()-ktime[key] < .3 and math.abs(reqrotx) < .3 then | |
| 648 | ||
| 649 | reqrotx = key == "a" and math.pi*2 or -math.pi*2 | |
| 650 | ||
| 651 | end | |
| 652 | ||
| 653 | ktime[key] = tick() | |
| 654 | ||
| 655 | end)) | |
| 656 | ||
| 657 | ku = plr:GetMouse().KeyUp:connect(function(key) | |
| 658 | ||
| 659 | keysdown[key] = false | |
| 660 | ||
| 661 | if key == " " then | |
| 662 | ||
| 663 | descendtimer = tick() | |
| 664 | ||
| 665 | end | |
| 666 | ||
| 667 | end) | |
| 668 | ||
| 669 | function mid(a,b,c) | |
| 670 | ||
| 671 | return math.max(a,math.min(b,c or -a)) | |
| 672 | ||
| 673 | end | |
| 674 | ||
| 675 | function bn(a) | |
| 676 | ||
| 677 | return a and 1 or 0 | |
| 678 | ||
| 679 | end | |
| 680 | ||
| 681 | function gm(tar) | |
| 682 | ||
| 683 | local m = 0 | |
| 684 | ||
| 685 | for i,v in pairs(tar:GetChildren()) do | |
| 686 | ||
| 687 | if v:IsA("BasePart") then
| |
| 688 | ||
| 689 | m = m + v:GetMass() | |
| 690 | ||
| 691 | end | |
| 692 | ||
| 693 | m = m + gm(v) | |
| 694 | ||
| 695 | end | |
| 696 | ||
| 697 | return m | |
| 698 | ||
| 699 | end | |
| 700 | ||
| 701 | reqrotx = 0 | |
| 702 | ||
| 703 | local grav = 196.2 | |
| 704 | ||
| 705 | local con | |
| 706 | ||
| 707 | con = game:GetService("RunService").Stepped:connect(oc(function()
| |
| 708 | ||
| 709 | --[[if not mod:IsDescendantOf(workspace) then | |
| 710 | ||
| 711 | pcall(function() kd:disconnect() end) | |
| 712 | ||
| 713 | pcall(function() ku:disconnect() end) | |
| 714 | ||
| 715 | bg:Destroy() | |
| 716 | ||
| 717 | bv:Destroy() | |
| 718 | ||
| 719 | con:disconnect() | |
| 720 | ||
| 721 | script:Destroy() | |
| 722 | ||
| 723 | return | |
| 724 | ||
| 725 | end]] | |
| 726 | ||
| 727 | local obvel = tor.CFrame:vectorToObjectSpace(tor.Velocity) | |
| 728 | ||
| 729 | local sspd, uspd,fspd = obvel.X,obvel.Y,obvel.Z | |
| 730 | ||
| 731 | if flying then | |
| 732 | ||
| 733 | local lfldir = fldir | |
| 734 | ||
| 735 | fldir = cam.CoordinateFrame:vectorToWorldSpace(Vector3.new(bn(keysdown.d)-bn(keysdown.a),0,bn(keysdown.s)-bn(keysdown.w))).unit | |
| 736 | ||
| 737 | local lmoving = moving | |
| 738 | ||
| 739 | moving = fldir.magnitude > .1 | |
| 740 | ||
| 741 | if lmoving and not moving then | |
| 742 | ||
| 743 | idledir = lfldir*Vector3.new(1,0,1) | |
| 744 | ||
| 745 | descendtimer = tick() | |
| 746 | ||
| 747 | end | |
| 748 | ||
| 749 | local dbomb = fldir.Y < -.6 or (moving and keysdown["1"]) | |
| 750 | ||
| 751 | if moving and keysdown["0"] and lmoving then | |
| 752 | ||
| 753 | fldir = (Vector3.new(lfldir.X,math.min(fldir.Y,lfldir.Y+.01)-.1,lfldir.Z)+(fldir*Vector3.new(1,0,1))*.05).unit | |
| 754 | ||
| 755 | end | |
| 756 | ||
| 757 | local down = tor.CFrame:vectorToWorldSpace(Vector3.new(0,-1,0)) | |
| 758 | ||
| 759 | local descending = (not moving and keysdown["q"] and not keysdown[" "]) | |
| 760 | ||
| 761 | cf = ccomplerp(cf,CFrame.new(tor.Position,tor.Position+(not moving and idledir or fldir)),keysdown["0"] and .02 or .07) | |
| 762 | ||
| 763 | local gdown = not dbomb and cf.lookVector.Y < -.2 and tor.Velocity.unit.Y < .05 | |
| 764 | ||
| 765 | hum.PlatformStand = true | |
| 766 | ||
| 767 | bg.maxTorque = Vector3.new(1,1,1)*9e5 | |
| 768 | ||
| 769 | local rotvel = CFrame.new(Vector3.new(),tor.Velocity):toObjectSpace(CFrame.new(Vector3.new(),fldir)).lookVector | |
| 770 | ||
| 771 | bg.cframe = cf * CFrame.Angles(not moving and -.1 or -math.pi/2+.2,moving and mid(-2.5,rotvel.X/1.5) + reqrotx or 0,0) | |
| 772 | ||
| 773 | reqrotx = reqrotx - reqrotx/10 | |
| 774 | ||
| 775 | bv.maxForce = Vector3.new(1,1,1)*9e4*.5 | |
| 776 | ||
| 777 | local anioff =(bn(keysdown[" "])-bn(keysdown["q"]))/2 | |
| 778 | ||
| 779 | local ani = tickwave(1.5-anioff,1) | |
| 780 | ||
| 781 | bv.velocity = bv.velocity:Lerp(Vector3.new(0,bn(not moving)*-ani*15+(descending and math.min(20,tick()-descendtimer)*-8 or bn(keysdown[" "])-bn(keysdown["q"]))*15,0)+vel,.6) | |
| 782 | ||
| 783 | vel = moving and cf.lookVector*flspd or Vector3.new() | |
| 784 | ||
| 785 | flspd = math.min(120,lerp(flspd,moving and (fldir.Y<0 and flspd+(-fldir.Y)*grav/60 or math.max(50,flspd-fldir.Y*grav/300)) or 60,.4)) | |
| 786 | ||
| 787 | setwings(moving and (gdown and outlow or dbomb and divebomb) or (descending and veryhigh or flap1),15) | |
| 788 | ||
| 789 | for i=1,4 do | |
| 790 | ||
| 791 | --CFrame.Angles(-.5+bn(i==3)*2.4+bn(i==4)*.5,.1+bn(i==2)*.5-bn(i==3)*1.1,bn(i==3)*.1) | |
| 792 | ||
| 793 | rwing[i].C0 = clerp(rwing[i].C0,oc0[rwing[i]] * (gdown and CFrame.new() or dbomb and CFrame.Angles(-.5+bn(i==3)*.4+bn(i==4)*.5,.1+bn(i==2)*.5-bn(i==3)*1.1,bn(i==3)*.1) or descending and CFrame.Angles(.3,0,0) or CFrame.Angles((i*.1+1.5)*ani,ani*-.5,1*ani)),descending and .8 or .2) | |
| 794 | ||
| 795 | lwing[i].C0 = clerp(lwing[i].C0,oc0[lwing[i]] * (gdown and CFrame.new() or dbomb and CFrame.Angles(-(-.5+bn(i==3)*.4+bn(i==4)*.5),-(.1+bn(i==2)*.5-bn(i==3)*1.1),bn(i==3)*.1) or descending and CFrame.Angles(-.3,0,0) or CFrame.Angles(-(i*.1+1.5)*ani,ani*.5,1*ani)),descending and .8 or .2) | |
| 796 | ||
| 797 | end | |
| 798 | ||
| 799 | local hit,ray = workspace:FindPartOnRayWithIgnoreList(Ray.new(tor.Position,Vector3.new(0,-3.5+math.min(0,bv.velocity.y)/30,0)),{char})
| |
| 800 | ||
| 801 | if hit and down.Y < -.85 and tick()-flystart > 1 then | |
| 802 | ||
| 803 | flying = false | |
| 804 | ||
| 805 | hum.PlatformStand = false | |
| 806 | ||
| 807 | tor.Velocity = Vector3.new() | |
| 808 | ||
| 809 | end | |
| 810 | ||
| 811 | else | |
| 812 | ||
| 813 | bg.maxTorque = Vector3.new() | |
| 814 | ||
| 815 | bv.maxForce = Vector3.new() | |
| 816 | ||
| 817 | local ani = tickwave(walking and .8 or 4.5,1) | |
| 818 | ||
| 819 | setwings(idle,10) | |
| 820 | ||
| 821 | local x,y,z = fspd/160,uspd/700,sspd/900 | |
| 822 | ||
| 823 | for i=1,4 do | |
| 824 | ||
| 825 | rwing[i].C0 = clerp(rwing[i].C0,oc0[rwing[i]] * CFrame.Angles(ani*.1 + -mid(-.1,x),0 + -mid(-.1,y) + bn(i==2)*.6,ani*.02 + -mid(-.1,z)),.2) | |
| 826 | ||
| 827 | lwing[i].C0 = clerp(lwing[i].C0,oc0[lwing[i]] * CFrame.Angles(ani*-.05 + mid(-.1,x),0 + mid(-.1,y) + -bn(i==2)*.6,ani*.02 + mid(-.1,z)),.2) | |
| 828 | ||
| 829 | end | |
| 830 | ||
| 831 | if keypressed[" "] and not flying and (tick()-jumptime > .05 and (tick()-jumptime < 3 or hum.Jump)) then | |
| 832 | ||
| 833 | vel = Vector3.new(0,50,0) | |
| 834 | ||
| 835 | bv.velocity = vel | |
| 836 | ||
| 837 | idledir = cam.CoordinateFrame.lookVector*Vector3.new(1,0,1) | |
| 838 | ||
| 839 | cf = tor.CFrame * CFrame.Angles(-.01,0,0) | |
| 840 | ||
| 841 | tor.CFrame = cf | |
| 842 | ||
| 843 | bg.cframe = cf | |
| 844 | ||
| 845 | flystart = tick() | |
| 846 | ||
| 847 | flying = true | |
| 848 | ||
| 849 | end | |
| 850 | ||
| 851 | end | |
| 852 | ||
| 853 | keypressed = {}
| |
| 854 | ||
| 855 | end)) | |
| 856 | ||
| 857 | ||
| 858 | ||
| 859 | end fly() | |
| 860 | ||
| 861 | local plr = game:service'Players'.LocalPlayer | |
| 862 | local m = plr:GetMouse() | |
| 863 | local char = plr.Character | |
| 864 | local runservice = game:service'RunService' | |
| 865 | local modelScale = 1/5 | |
| 866 | ||
| 867 | ||
| 868 | pcall(function() local a = script.Parent.FaerieScript if a ~= script then a:Destroy() end end) | |
| 869 | pcall(function() local a = char.Animate if a ~= script then a.Disabled = true a:Destroy() end end) | |
| 870 | script.Name = "FaerieScript" | |
| 871 | ||
| 872 | function weld(a,b,c,d) | |
| 873 | local w = Instance.new("Weld",a)
| |
| 874 | w.Part0 = a | |
| 875 | w.Part1 = b | |
| 876 | w.C0 = c or CFrame.new() | |
| 877 | w.C1 = d or CFrame.new() | |
| 878 | return w | |
| 879 | end | |
| 880 | ||
| 881 | function lerp(a,b,c) | |
| 882 | return a+(b-a)*c | |
| 883 | end | |
| 884 | ||
| 885 | do -- Ignore my clerp stuff stolen from stravvy | |
| 886 | local function QuaternionFromCFrame(cf) | |
| 887 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 888 | local trace = m00 + m11 + m22 | |
| 889 | if trace > 0 then | |
| 890 | local s = math.sqrt(1 + trace) | |
| 891 | local recip = 0.5/s | |
| 892 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
| 893 | else | |
| 894 | local i = 0 | |
| 895 | if m11 > m00 then | |
| 896 | i = 1 | |
| 897 | end | |
| 898 | if m22 > (i == 0 and m00 or m11) then | |
| 899 | i = 2 | |
| 900 | end | |
| 901 | if i == 0 then | |
| 902 | local s = math.sqrt(m00-m11-m22+1) | |
| 903 | local recip = 0.5/s | |
| 904 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
| 905 | elseif i == 1 then | |
| 906 | local s = math.sqrt(m11-m22-m00+1) | |
| 907 | local recip = 0.5/s | |
| 908 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
| 909 | elseif i == 2 then | |
| 910 | local s = math.sqrt(m22-m00-m11+1) | |
| 911 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
| 912 | end | |
| 913 | end | |
| 914 | end | |
| 915 | local function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 916 | local xs, ys, zs = x + x, y + y, z + z | |
| 917 | local wx, wy, wz = w*xs, w*ys, w*zs | |
| 918 | local xx = x*xs | |
| 919 | local xy = x*ys | |
| 920 | local xz = x*zs | |
| 921 | local yy = y*ys | |
| 922 | local yz = y*zs | |
| 923 | local zz = z*zs | |
| 924 | 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)) | |
| 925 | end | |
| 926 | local function QuaternionSlerp(a, b, t) | |
| 927 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
| 928 | local startInterp, finishInterp; | |
| 929 | if cosTheta >= 0.0001 then | |
| 930 | if (1 - cosTheta) > 0.0001 then | |
| 931 | local theta = math.acos(cosTheta) | |
| 932 | local invSinTheta = 1/math.sin(theta) | |
| 933 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
| 934 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 935 | else | |
| 936 | startInterp = 1-t | |
| 937 | finishInterp = t | |
| 938 | end | |
| 939 | else | |
| 940 | if (1+cosTheta) > 0.0001 then | |
| 941 | local theta = math.acos(-cosTheta) | |
| 942 | local invSinTheta = 1/math.sin(theta) | |
| 943 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
| 944 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 945 | else | |
| 946 | startInterp = t-1 | |
| 947 | finishInterp = t | |
| 948 | end | |
| 949 | end | |
| 950 | 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 | |
| 951 | end | |
| 952 | function clerp(a,b,t) | |
| 953 | local qa = {QuaternionFromCFrame(a)}
| |
| 954 | local qb = {QuaternionFromCFrame(b)}
| |
| 955 | local ax, ay, az = a.x, a.y, a.z | |
| 956 | local bx, by, bz = b.x, b.y, b.z | |
| 957 | local _t = 1-t | |
| 958 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
| 959 | end | |
| 960 | end | |
| 961 | ||
| 962 | for i,v in pairs(char:GetChildren()) do | |
| 963 | if v:IsA("Hat") or v:IsA("BodyColors") or v:IsA("Clothing") or v:IsA("ShirtGraphic") then
| |
| 964 | v:Destroy() | |
| 965 | end | |
| 966 | end | |
| 967 | Instance.new("Hat",char)
| |
| 968 | local root = char.HumanoidRootPart | |
| 969 | local tw = root.RootJoint | |
| 970 | local tor = char.Torso | |
| 971 | local hd = char.Head | |
| 972 | local hum = char.Humanoid | |
| 973 | hum.Health = 40 | |
| 974 | hum.MaxHealth = 40 | |
| 975 | hum.WalkSpeed = 12 | |
| 976 | local rl,ll = char["Right Leg"],char["Left Leg"] | |
| 977 | local ra,la = char["Right Arm"],char["Left Arm"] | |
| 978 | ||
| 979 | local c0 = {
| |
| 980 | rs = CFrame.new(1,.5,0), | |
| 981 | ls = CFrame.new(-1,.5,0), | |
| 982 | rh = CFrame.new(.5,-1,0), | |
| 983 | lh = CFrame.new(-.5,-1,0), | |
| 984 | nk = CFrame.new(0,1,0), | |
| 985 | tw = CFrame.new(0,0,0)*CFrame.Angles(0,0,0), | |
| 986 | } | |
| 987 | local c1 = {
| |
| 988 | rs = CFrame.new(-.5,.5,0), | |
| 989 | ls = CFrame.new(.5,.5,0), | |
| 990 | rh = CFrame.new(0,1,0), | |
| 991 | lh = CFrame.new(0,1,0), | |
| 992 | nk = CFrame.new(0,-.5,0), | |
| 993 | tw = CFrame.new(0,0,0)*CFrame.Angles(0,0,0) | |
| 994 | } | |
| 995 | ||
| 996 | local rs = tor["Right Shoulder"] | |
| 997 | local ls = tor["Left Shoulder"] | |
| 998 | local rh = tor["Right Hip"] | |
| 999 | local lh = tor["Left Hip"] | |
| 1000 | local nk = tor["Neck"] | |
| 1001 | for i,v in pairs(tor:GetChildren()) do | |
| 1002 | if v:IsA("Motor6D") then
| |
| 1003 | v.DesiredAngle = 0 | |
| 1004 | v.MaxVelocity = 0 | |
| 1005 | v.CurrentAngle = 0 | |
| 1006 | end | |
| 1007 | end | |
| 1008 | ||
| 1009 | ||
| 1010 | ||
| 1011 | ||
| 1012 | pcall(function() tor.roblox:Destroy() end) | |
| 1013 | ||
| 1014 | pcall(function() char.Faerie:Destroy() end) | |
| 1015 | local model = Instance.new("Model",char)
| |
| 1016 | model.Name = "Faerie" | |
| 1017 | ||
| 1018 | local BasePart = Instance.new("Part")
| |
| 1019 | BasePart.CanCollide = false | |
| 1020 | BasePart.Anchored = false | |
| 1021 | BasePart.FormFactor = "Custom" | |
| 1022 | BasePart.Locked = true | |
| 1023 | BasePart.Size = Vector3.new() | |
| 1024 | BasePart.TopSurface,BasePart.BottomSurface,BasePart.LeftSurface,BasePart.RightSurface,BasePart.FrontSurface,BasePart.BackSurface = 10,10,10,10,10,10 | |
| 1025 | BasePart:BreakJoints() | |
| 1026 | ||
| 1027 | function NP(par) | |
| 1028 | local p = BasePart:Clone() | |
| 1029 | p.Parent = par or model | |
| 1030 | return p | |
| 1031 | end | |
| 1032 | ||
| 1033 | local w1 = NP() | |
| 1034 | w1.Transparency = .1 | |
| 1035 | local w1m = Instance.new("SpecialMesh",w1)
| |
| 1036 | w1m.MeshId = "rbxassetid://13107796" | |
| 1037 | w1m.TextureId = "rbxassetid://151759848" | |
| 1038 | w1m.Scale = Vector3.new(1.05, 1.05, 1.05) | |
| 1039 | local w1 = weld(tor,w1,CFrame.new(-.1,0.55,1.6)) | |
| 1040 | ||
| 1041 | local w2 = NP() | |
| 1042 | w2.Transparency = .1 | |
| 1043 | local w2m = Instance.new("SpecialMesh",w2)
| |
| 1044 | w2m.MeshId = "rbxassetid://19367766" | |
| 1045 | w2m.TextureId = "rbxassetid://9854798" | |
| 1046 | w2m.Scale = Vector3.new(1.05, 1.05, 1.05) | |
| 1047 | local w2 = weld(tor,w2,CFrame.new(.1,0.55,1.6)) | |
| 1048 | ||
| 1049 | local h = NP() | |
| 1050 | local hm = Instance.new("SpecialMesh",h)
| |
| 1051 | hm.MeshId = "rbxassetid://19999424" | |
| 1052 | hm.TextureId = "rbxassetid://215765468" | |
| 1053 | hm.Scale = Vector3.new(1, 1, 1) | |
| 1054 | weld(hd,h,CFrame.new(0,0.2,0)) | |
| 1055 | ||
| 1056 | for i,v in pairs(char:GetChildren()) do | |
| 1057 | if v:IsA("BasePart") then
| |
| 1058 | v.Material = "SmoothPlastic" | |
| 1059 | v.TopSurface,v.BottomSurface,v.FrontSurface,v.BackSurface,v.LeftSurface,v.RightSurface = 10,10,10,10,10,10 | |
| 1060 | end | |
| 1061 | end | |
| 1062 | ||
| 1063 | do | |
| 1064 | if modelScale ~= 1 then | |
| 1065 | for i,v in pairs(c0) do | |
| 1066 | c0[i] = (v-v.p) + v.p*modelScale | |
| 1067 | end | |
| 1068 | for i,v in pairs(c1) do | |
| 1069 | c1[i] = (v-v.p) + v.p*modelScale | |
| 1070 | end | |
| 1071 | local Joints = {}
| |
| 1072 | local gtJoints,gtParts; | |
| 1073 | ||
| 1074 | local function gtCFrame(cf) | |
| 1075 | return (cf-cf.p) + cf.p * modelScale | |
| 1076 | end | |
| 1077 | ||
| 1078 | function gtJoints(p) | |
| 1079 | for i,v in pairs(p:GetChildren()) do | |
| 1080 | if v:IsA("JointInstance") then
| |
| 1081 | table.insert(Joints,{v,v.Part0,v.Part1})
| |
| 1082 | v.Part0 = nil | |
| 1083 | v.Part1 = nil | |
| 1084 | v.C0 = (v.C0-(v.C0.p)) + (v.C0.p * modelScale) | |
| 1085 | v.C1 = (v.C1-(v.C1.p)) + (v.C1.p * modelScale) | |
| 1086 | end | |
| 1087 | gtJoints(v) | |
| 1088 | end | |
| 1089 | end | |
| 1090 | ||
| 1091 | function gtParts(p) | |
| 1092 | for i,v in pairs(p:GetChildren()) do | |
| 1093 | if v:IsA("BasePart") then
| |
| 1094 | pcall(function() v.FormFactor = "Custom" end) | |
| 1095 | local oldz = v.Size | |
| 1096 | local cf = tor.CFrame:toObjectSpace(v.CFrame) | |
| 1097 | v.Size = v.Size * modelScale | |
| 1098 | v.CFrame = tor.CFrame * gtCFrame(cf) | |
| 1099 | local mesh = nil | |
| 1100 | for i,t in pairs(v:GetChildren()) do | |
| 1101 | if t:IsA("DataModelMesh") then
| |
| 1102 | mesh = t | |
| 1103 | end | |
| 1104 | end | |
| 1105 | if mesh == nil and v:IsA("Part") and v.Shape == Enum.PartType.Ball then
| |
| 1106 | mesh = Instance.new("SpecialMesh",v)
| |
| 1107 | mesh.MeshType = Enum.MeshType.Sphere | |
| 1108 | end | |
| 1109 | if mesh == nil and ((v:IsA("Part") and v.Shape == Enum.PartType.Block) or v:IsA("Seat") or v:IsA("VehicleSeat")) then
| |
| 1110 | mesh = Instance.new("BlockMesh",v)
| |
| 1111 | end | |
| 1112 | if mesh ~= nil then | |
| 1113 | if mesh:IsA("SpecialMesh") and mesh.MeshType == Enum.MeshType.FileMesh then
| |
| 1114 | mesh.Scale = mesh.Scale * modelScale | |
| 1115 | else | |
| 1116 | mesh.Scale = mesh.Scale*(oldz*modelScale)/v.Size | |
| 1117 | end | |
| 1118 | end | |
| 1119 | end | |
| 1120 | gtParts(v) | |
| 1121 | end | |
| 1122 | end | |
| 1123 | gtJoints(char) | |
| 1124 | gtParts(char) | |
| 1125 | for i,v in pairs(Joints) do | |
| 1126 | v[1].Part0 = v[2] | |
| 1127 | v[1].Part1 = v[3] | |
| 1128 | end | |
| 1129 | end | |
| 1130 | end | |
| 1131 | rs.C0,rs.C1 = c0.rs,c1.rs | |
| 1132 | ls.C0,ls.C1 = c0.ls,c1.ls | |
| 1133 | rh.C0,rh.C1 = c0.rh,c1.rh | |
| 1134 | lh.C0,lh.C1 = c0.lh,c1.lh | |
| 1135 | nk.C0,nk.C1 = c0.nk,c1.nk | |
| 1136 | tw.C0,tw.C1 = c0.tw,c1.tw | |
| 1137 | ||
| 1138 | local w10,w20 = w1.C0,w2.C0 | |
| 1139 | ||
| 1140 | local pl = tor:FindFirstChild("FairyLight") or Instance.new("PointLight",tor)
| |
| 1141 | pl.Name = "FairyLight" | |
| 1142 | pl.Shadows = false | |
| 1143 | pl.Range = 8 | |
| 1144 | pl.Brightness = 10 | |
| 1145 | ||
| 1146 | local sparkles = tor:FindFirstChild("FairySparkles") or Instance.new("Sparkles",tor)
| |
| 1147 | sparkles.Name = "FairySparkles" | |
| 1148 | ||
| 1149 | ||
| 1150 | local outfit = 0 | |
| 1151 | local outfitparts = {ra,la,rl,ll,tor}
| |
| 1152 | local outfits = {
| |
| 1153 | {{106705109},{106705077},{106703301},{106703213},{106705037}}
| |
| 1154 | } | |
| 1155 | ||
| 1156 | ||
| 1157 | local mycolor = ll.BrickColor.Color | |
| 1158 | local mycolor2 = mycolor | |
| 1159 | ||
| 1160 | function setOutfit() | |
| 1161 | local of = outfits[outfit] | |
| 1162 | if of then | |
| 1163 | for i,v in pairs(outfitparts) do | |
| 1164 | local mesh = v:FindFirstChild("outfitMesh")
| |
| 1165 | local meshdata = outfits[outfit][i] | |
| 1166 | if not mesh then | |
| 1167 | mesh = Instance.new("SpecialMesh",v)
| |
| 1168 | mesh.Name = "outfitMesh" | |
| 1169 | mesh.TextureId = "rbxassetid://9854798" | |
| 1170 | end | |
| 1171 | mesh.Scale =(meshdata[2] or Vector3.new(1,1,1)) * modelScale | |
| 1172 | mesh.MeshId = "rbxassetid://"..meshdata[1] | |
| 1173 | mesh.VertexColor = Vector3.new(mycolor2.r,mycolor2.g,mycolor2.b) | |
| 1174 | end | |
| 1175 | else | |
| 1176 | for i,v in pairs(outfitparts) do | |
| 1177 | pcall(function() v.outfitMesh:Destroy() end) | |
| 1178 | end | |
| 1179 | end | |
| 1180 | end | |
| 1181 | setOutfit() | |
| 1182 | ||
| 1183 | local senabled = true | |
| 1184 | local lenabled = true | |
| 1185 | function changeColor() | |
| 1186 | for i,v in pairs(char:GetChildren()) do | |
| 1187 | if v:IsA("BasePart") then
| |
| 1188 | v.BrickColor = BrickColor.new(mycolor) | |
| 1189 | end | |
| 1190 | end | |
| 1191 | local mc1 = Vector3.new(mycolor.r,mycolor.g,mycolor.b) | |
| 1192 | local mc2 = Vector3.new(mycolor2.r,mycolor2.g,mycolor2.b) | |
| 1193 | w1m.VertexColor,w2m.VertexColor,hm.VertexColor = mc1,mc1,mc2 | |
| 1194 | for i,v in pairs(outfitparts) do | |
| 1195 | local mesh = v:FindFirstChild("outfitMesh")
| |
| 1196 | if mesh then | |
| 1197 | mesh.VertexColor = mc2 | |
| 1198 | end | |
| 1199 | end | |
| 1200 | pl.Color = mycolor | |
| 1201 | sparkles.SparkleColor = mycolor | |
| 1202 | end | |
| 1203 | changeColor() | |
| 1204 | ||
| 1205 | do | |
| 1206 | pcall(function() plr.PlayerGui.fairyColoring:Destroy() end) | |
| 1207 | local scr = Instance.new("ScreenGui",plr.PlayerGui)
| |
| 1208 | scr.Name = "fairyColoring" | |
| 1209 | local fr = Instance.new("Frame",scr)
| |
| 1210 | fr.Size = UDim2.new(0,-150,0,-65) | |
| 1211 | fr.BackgroundColor3 = Color3.new(1,1,1) | |
| 1212 | fr.BorderColor3 = Color3.new(.05,.05,.05) | |
| 1213 | fr.BackgroundTransparency = .8 | |
| 1214 | fr.Position = UDim2.new(1,0,1,scr.Parent:FindFirstChild("PandaHelpNotify") and -20 or 0)
| |
| 1215 | fr.ZIndex = 9 | |
| 1216 | local am = 75 | |
| 1217 | local rval,gval,bval = mycolor.r,mycolor.g,mycolor.b | |
| 1218 | local r = Instance.new("TextButton",fr)
| |
| 1219 | r.BackgroundTransparency = 1 | |
| 1220 | r.Size = UDim2.new(0,75,0,15) | |
| 1221 | r.Position = UDim2.new(0,5,0,5) | |
| 1222 | r.TextColor3 = Color3.new(1,1,1) | |
| 1223 | r.TextStrokeTransparency = .4 | |
| 1224 | for i=1,am do | |
| 1225 | local t = Instance.new("ImageLabel",r)
| |
| 1226 | t.BorderSizePixel = 0 | |
| 1227 | t.Size = UDim2.new(1/am,0,1,0) | |
| 1228 | t.Position = UDim2.new((i-1)/am,0,0,0) | |
| 1229 | t.Name = i | |
| 1230 | t.ZIndex = 10 | |
| 1231 | end | |
| 1232 | local rb = Instance.new("ImageLabel",r)
| |
| 1233 | rb.ZIndex = 10 | |
| 1234 | rb.Size = UDim2.new(0,2,1,-2) | |
| 1235 | rb.BackgroundColor3 = Color3.new(0,0,0) | |
| 1236 | rb.BackgroundTransparency = .5 | |
| 1237 | rb.BorderColor3 = Color3.new(.4,.4,.4) | |
| 1238 | rb.Name = "b" | |
| 1239 | local g = r:Clone() | |
| 1240 | g.Parent = fr | |
| 1241 | g.Position = UDim2.new(0,5,0,25) | |
| 1242 | local b = r:Clone() | |
| 1243 | b.Parent = fr | |
| 1244 | b.Position = UDim2.new(0,5,0,45) | |
| 1245 | r.ZIndex,g.ZIndex,b.ZIndex = 10,10,10 | |
| 1246 | local prev = Instance.new("TextButton",fr)
| |
| 1247 | prev.Size = UDim2.new(0,55,0,45) | |
| 1248 | prev.Position = UDim2.new(0,90,0,5) | |
| 1249 | prev.ZIndex = 10 | |
| 1250 | prev.BorderColor3 = Color3.new(.2,.2,.2) | |
| 1251 | prev.TextColor3 = Color3.new(1,1,1) | |
| 1252 | prev.TextStrokeTransparency = .4 | |
| 1253 | prev.TextYAlignment = "Bottom" | |
| 1254 | prev.FontSize = "Size8" | |
| 1255 | prev.TextWrapped = true | |
| 1256 | local res = Instance.new("TextButton",fr)
| |
| 1257 | res.Size = UDim2.new(0,55,0,9) | |
| 1258 | res.Position = UDim2.new(0,90,0,51) | |
| 1259 | res.ZIndex = 10 | |
| 1260 | res.BorderColor3 = Color3.new(.2,.2,.2) | |
| 1261 | res.BackgroundColor3 = Color3.new(.5,0,0) | |
| 1262 | res.TextColor3 = Color3.new(1,1,1) | |
| 1263 | res.Text = "reset" | |
| 1264 | res.FontSize = "Size8" | |
| 1265 | local mode = 0 | |
| 1266 | local function update(set) | |
| 1267 | r.b.Position = UDim2.new(rval,-1,0,1) | |
| 1268 | g.b.Position = UDim2.new(gval,-1,0,1) | |
| 1269 | b.b.Position = UDim2.new(bval,-1,0,1) | |
| 1270 | local col = Color3.new(rval,gval,bval) | |
| 1271 | prev.BackgroundColor3 = mode == 1 and mycolor2 or mycolor | |
| 1272 | prev.Text = "" | |
| 1273 | r.Text = math.floor(rval*255+.5) | |
| 1274 | g.Text = math.floor(gval*255+.5) | |
| 1275 | b.Text = math.floor(bval*255+.5) | |
| 1276 | for i,v in pairs(r:GetChildren()) do | |
| 1277 | local n = tonumber(v.Name) | |
| 1278 | if n then | |
| 1279 | local sc = n/am | |
| 1280 | v.BackgroundColor3 = Color3.new(sc,gval,bval) | |
| 1281 | end | |
| 1282 | end | |
| 1283 | for i,v in pairs(g:GetChildren()) do | |
| 1284 | local n = tonumber(v.Name) | |
| 1285 | if n then | |
| 1286 | local sc = n/am | |
| 1287 | v.BackgroundColor3 = Color3.new(rval,sc,bval) | |
| 1288 | end | |
| 1289 | end | |
| 1290 | for i,v in pairs(b:GetChildren()) do | |
| 1291 | local n = tonumber(v.Name) | |
| 1292 | if n then | |
| 1293 | local sc = n/am | |
| 1294 | v.BackgroundColor3 = Color3.new(rval,gval,sc) | |
| 1295 | end | |
| 1296 | end | |
| 1297 | if set ~= false then | |
| 1298 | if mode == 0 then | |
| 1299 | mycolor = col | |
| 1300 | end | |
| 1301 | if mode == 1 then | |
| 1302 | mycolor2 = col | |
| 1303 | end | |
| 1304 | changeColor() | |
| 1305 | end | |
| 1306 | end | |
| 1307 | update() | |
| 1308 | local rd,gd,bd = false,false,false | |
| 1309 | r.MouseButton1Down:connect(function(x,y) rd = true rval = (x-r.AbsolutePosition.X)/r.AbsoluteSize.X update() end) | |
| 1310 | r.MouseButton1Up:connect(function() rd = false end) | |
| 1311 | r.MouseLeave:connect(function() rd = false end) | |
| 1312 | r.MouseMoved:connect(function(x,y) if not rd then return end rval = (x-r.AbsolutePosition.X)/r.AbsoluteSize.X update() end) | |
| 1313 | g.MouseButton1Down:connect(function(x,y) gd = true gval = (x-g.AbsolutePosition.X)/g.AbsoluteSize.X update() end) | |
| 1314 | g.MouseButton1Up:connect(function() gd = false end) | |
| 1315 | g.MouseLeave:connect(function() gd = false end) | |
| 1316 | g.MouseMoved:connect(function(x,y) if not gd then return end gval = (x-g.AbsolutePosition.X)/g.AbsoluteSize.X update() end) | |
| 1317 | b.MouseButton1Down:connect(function(x,y) bd = true bval = (x-b.AbsolutePosition.X)/b.AbsoluteSize.X update() end) | |
| 1318 | b.MouseButton1Up:connect(function() bd = false end) | |
| 1319 | b.MouseLeave:connect(function() bd = false end) | |
| 1320 | b.MouseMoved:connect(function(x,y) if not bd then return end bval = (x-b.AbsolutePosition.X)/b.AbsoluteSize.X update() end) | |
| 1321 | res.MouseButton1Click:connect(function() | |
| 1322 | rval,gval,bval = themeColor.Color.r,themeColor.Color.g,themeColor.Color.b | |
| 1323 | update() | |
| 1324 | end) | |
| 1325 | ||
| 1326 | local modebtn = Instance.new("TextButton",fr)
| |
| 1327 | modebtn.Position = UDim2.new(1,-150,0,-15) | |
| 1328 | modebtn.Size = UDim2.new(0,49,0,14) | |
| 1329 | modebtn.BackgroundColor3 = Color3.new(1,1,0) | |
| 1330 | modebtn.BackgroundTransparency = .6 | |
| 1331 | modebtn.TextScaled = true | |
| 1332 | modebtn.Font = 4 | |
| 1333 | modebtn.TextColor3 = Color3.new(1,1,1) | |
| 1334 | modebtn.TextStrokeTransparency = .7 | |
| 1335 | modebtn.Text = "Body" | |
| 1336 | modebtn.MouseButton1Click:connect(function() | |
| 1337 | mode = (mode+1)%2 | |
| 1338 | local col = mode == 1 and mycolor2 or mycolor | |
| 1339 | rval,gval,bval = col.r,col.g,col.b | |
| 1340 | modebtn.Text = mode == 0 and "Body" or "Clothes" | |
| 1341 | update(false) | |
| 1342 | end) | |
| 1343 | ||
| 1344 | local outfitbtn = Instance.new("TextButton",fr)
| |
| 1345 | outfitbtn.Position = UDim2.new(1,-150,0,-30) | |
| 1346 | outfitbtn.Size = UDim2.new(0,49,0,14) | |
| 1347 | outfitbtn.BackgroundColor3 = Color3.new(1,1,0) | |
| 1348 | outfitbtn.BackgroundTransparency = .6 | |
| 1349 | outfitbtn.TextScaled = true | |
| 1350 | outfitbtn.Font = 4 | |
| 1351 | outfitbtn.TextColor3 = Color3.new(1,1,1) | |
| 1352 | outfitbtn.TextStrokeTransparency = .7 | |
| 1353 | outfitbtn.Text = "Outfit" | |
| 1354 | outfitbtn.MouseButton1Click:connect(function() | |
| 1355 | outfit = (outfit+1)%(#outfits+1) | |
| 1356 | setOutfit() | |
| 1357 | end) | |
| 1358 | ||
| 1359 | local sparklebtn = Instance.new("TextButton",fr)
| |
| 1360 | sparklebtn.Position = UDim2.new(1,-100,0,-15) | |
| 1361 | sparklebtn.Size = UDim2.new(0,100,0,14) | |
| 1362 | sparklebtn.BackgroundColor3 = Color3.new(0,1,0) | |
| 1363 | sparklebtn.BackgroundTransparency = .6 | |
| 1364 | sparklebtn.TextScaled = true | |
| 1365 | sparklebtn.Font = 4 | |
| 1366 | sparklebtn.TextColor3 = Color3.new(1,1,1) | |
| 1367 | sparklebtn.TextStrokeTransparency = .7 | |
| 1368 | sparklebtn.Text = "Sparkles" | |
| 1369 | sparklebtn.MouseButton1Click:connect(function() | |
| 1370 | senabled = not senabled | |
| 1371 | sparklebtn.BackgroundColor3 = senabled and Color3.new(0,1,0) or Color3.new(1,0,0) | |
| 1372 | end) | |
| 1373 | local lightbtn = Instance.new("TextButton",fr)
| |
| 1374 | lightbtn.Position = UDim2.new(1,-100,0,-30) | |
| 1375 | lightbtn.Size = UDim2.new(0,100,0,14) | |
| 1376 | lightbtn.BackgroundColor3 = Color3.new(0,1,0) | |
| 1377 | lightbtn.BackgroundTransparency = .6 | |
| 1378 | lightbtn.TextScaled = true | |
| 1379 | lightbtn.Font = 4 | |
| 1380 | lightbtn.TextColor3 = Color3.new(1,1,1) | |
| 1381 | lightbtn.TextStrokeTransparency = .7 | |
| 1382 | lightbtn.Text = "Light" | |
| 1383 | lightbtn.MouseButton1Click:connect(function() | |
| 1384 | lenabled = not lenabled | |
| 1385 | lightbtn.BackgroundColor3 = lenabled and Color3.new(0,1,0) or Color3.new(1,0,0) | |
| 1386 | end) | |
| 1387 | end | |
| 1388 | ||
| 1389 | ||
| 1390 | local gyro = root:FindFirstChild("RootGyro") or Instance.new("BodyGyro",root)
| |
| 1391 | gyro.maxTorque = Vector3.new() | |
| 1392 | gyro.Name = "RootGyro" | |
| 1393 | ||
| 1394 | local vel = root:FindFirstChild("RootVel") or Instance.new("BodyVelocity",root)
| |
| 1395 | vel.maxForce = Vector3.new() | |
| 1396 | vel.Name = "RootVel" | |
| 1397 | vel.P = 4000 | |
| 1398 | ||
| 1399 | local flying = false | |
| 1400 | local state = "idle" | |
| 1401 | local kd = {}
| |
| 1402 | local humspd = 0 | |
| 1403 | local flyspeed = 0 | |
| 1404 | local flystop = 0 | |
| 1405 | local sitting = false | |
| 1406 | local holding = false | |
| 1407 | ||
| 1408 | m.KeyDown:connect(function(k) | |
| 1409 | local now = tick() | |
| 1410 | kd[k] = now | |
| 1411 | if k == " " and not flying then | |
| 1412 | pcall(function() sitting:Destroy() end) | |
| 1413 | sitting = nil | |
| 1414 | state = "fly" | |
| 1415 | flying = true | |
| 1416 | flydir = (root.CFrame.lookVector*Vector3.new(1,0,1)).unit | |
| 1417 | elseif k == " " and state == "fly" then | |
| 1418 | flying = false | |
| 1419 | state = "idle" | |
| 1420 | flystop = tick() | |
| 1421 | elseif k == "x" and m.Target and (root.Position-m.Hit.p).magnitude < 20*modelScale then | |
| 1422 | local tar = m.Target | |
| 1423 | local cf = tar.CFrame:toObjectSpace(m.Hit) | |
| 1424 | local siz = tar.Size/2 | |
| 1425 | local cfr | |
| 1426 | local rx,ry,rz = 0,0,0 | |
| 1427 | local lv = tar.CFrame:vectorToObjectSpace(root.CFrame.lookVector) | |
| 1428 | if math.abs(cf.Y-siz.Y) < .03 then | |
| 1429 | cfr = CFrame.new(cf.p + Vector3.new(0,3*modelScale,0)) * CFrame.Angles(0,math.atan2(-lv.X,-lv.Z),0) | |
| 1430 | elseif math.abs(-cf.Y-siz.Y) < .03 then | |
| 1431 | cfr = CFrame.new(cf.p - Vector3.new(0,3*modelScale,0)) * CFrame.Angles(0,math.atan2(-lv.X,-lv.Z),math.pi) | |
| 1432 | elseif math.abs(cf.X-siz.X) < .03 then | |
| 1433 | cfr = CFrame.new(cf.p + Vector3.new(3*modelScale,0,0)) * CFrame.Angles(0,0,-math.pi/2) * CFrame.Angles(0,math.atan2(-lv.X,-lv.Z),0) | |
| 1434 | elseif math.abs(-cf.X-siz.X) < .03 then | |
| 1435 | cfr = CFrame.new(cf.p - Vector3.new(3*modelScale,0,0)) * CFrame.Angles(0,0,math.pi/2) * CFrame.Angles(0,math.atan2(-lv.X,-lv.Z),0) | |
| 1436 | elseif math.abs(cf.Z-siz.Z) < .03 then | |
| 1437 | cfr = CFrame.new(cf.p + Vector3.new(0,0,3*modelScale)) * CFrame.Angles(math.pi/2,0,0) * CFrame.Angles(0,math.atan2(-lv.X,-lv.Z),0) | |
| 1438 | elseif math.abs(-cf.Z-siz.Z) < .03 then | |
| 1439 | cfr = CFrame.new(cf.p - Vector3.new(0,0,3*modelScale)) * CFrame.Angles(-math.pi/2,0,0) * CFrame.Angles(0,math.atan2(-lv.X,-lv.Z),0) | |
| 1440 | end | |
| 1441 | if cfr then | |
| 1442 | pcall(function() sitting:Destroy() end) | |
| 1443 | flying = false | |
| 1444 | state = "sit" | |
| 1445 | if m.Target.Anchored then | |
| 1446 | sitting = {tar = tar, cf = cfr}
| |
| 1447 | else | |
| 1448 | sitting = weld(tar,root,cfr) | |
| 1449 | end | |
| 1450 | end | |
| 1451 | end | |
| 1452 | end) | |
| 1453 | m.KeyUp:connect(function(k) | |
| 1454 | kd[k] = nil | |
| 1455 | end) | |
| 1456 | ||
| 1457 | hum.Running:connect(function(spd) | |
| 1458 | if state ~= "idle" and state ~= "walk" and state ~= "inair" then return end | |
| 1459 | humspd = spd | |
| 1460 | state = flying and "fly" or (spd < 1 and "idle" or "walk") | |
| 1461 | end) | |
| 1462 | hum.Climbing:connect(function(spd) | |
| 1463 | if state ~= "idle" and state ~= "walk" and state ~= "inair" then return end | |
| 1464 | humspd = spd | |
| 1465 | state = flying and "fly" or (spd < 1 and "idle" or "walk") | |
| 1466 | end) | |
| 1467 | hum.Seated:connect(function(a) | |
| 1468 | state = a and "sit" or humspd > 0 and "idle" or "walk" | |
| 1469 | end) | |
| 1470 | ||
| 1471 | hum.Changed:connect(function() | |
| 1472 | if hum.Jump then | |
| 1473 | hum.Jump = false | |
| 1474 | end | |
| 1475 | end) | |
| 1476 | ||
| 1477 | hum.FreeFalling:connect(function() | |
| 1478 | if state ~= "idle" and state ~= "walk" and state ~= "inair" then return end | |
| 1479 | state = math.abs(tor.Velocity.Y) > 1 and "inair" or state | |
| 1480 | end) | |
| 1481 | ||
| 1482 | hum.FallingDown:connect(function(a) | |
| 1483 | if not a then return end | |
| 1484 | state = "inair" | |
| 1485 | end) | |
| 1486 | ||
| 1487 | ||
| 1488 | ||
| 1489 | while true do | |
| 1490 | runservice.RenderStepped:wait() | |
| 1491 | local cam = workspace.CurrentCamera | |
| 1492 | local alpha = .2 | |
| 1493 | sparkles.Enabled = senabled and flying and tor.Velocity.magnitude > 3 | |
| 1494 | pl.Enabled = lenabled | |
| 1495 | if state ~= "fly" then | |
| 1496 | if type(sitting) == "table" then | |
| 1497 | gyro.maxTorque = Vector3.new(1,1,1)*4e6 | |
| 1498 | vel.maxForce = Vector3.new(1,1,1)*4e5 | |
| 1499 | gyro.cframe = sitting.tar.CFrame * sitting.cf | |
| 1500 | vel.velocity = (gyro.cframe.p-root.Position)*10 | |
| 1501 | else | |
| 1502 | gyro.maxTorque,vel.maxForce = Vector3.new(),Vector3.new() | |
| 1503 | end | |
| 1504 | end | |
| 1505 | if sitting then | |
| 1506 | state = "sit" | |
| 1507 | end | |
| 1508 | tw.MaxVelocity,rh.MaxVelocity,lh.MaxVelocity,rs.MaxVelocity,ls.MaxVelocity,nk.MaxVelocity = 0,0,0,0,0,0 | |
| 1509 | tw.CurrentAngle,rh.CurrentAngle,lh.CurrentAngle,rs.CurrentAngle,ls.CurrentAngle,nk.CurrentAngle = 0,0,0,0,0,0 | |
| 1510 | ||
| 1511 | local hasRobe = outfit == 1 | |
| 1512 | ||
| 1513 | if state == "idle" then | |
| 1514 | hum.PlatformStand = false | |
| 1515 | local breathing = math.sin(tick()*2) | |
| 1516 | local tilt = .02 + breathing*.03 | |
| 1517 | w1.C0 = clerp(w1.C0,w10*CFrame.Angles(0,-.01+breathing*.01,0),alpha) | |
| 1518 | w2.C0 = clerp(w2.C0,w20*CFrame.Angles(0,.01-breathing*.01,0),alpha) | |
| 1519 | ||
| 1520 | tw.C0 = clerp(tw.C0,c0.tw*CFrame.Angles(tilt,0,0),alpha) | |
| 1521 | rh.C0 = clerp(rh.C0,c0.rh*CFrame.Angles(-tilt,hasRobe and 0 or -.1,hasRobe and 0 or .06),alpha) | |
| 1522 | lh.C0 = clerp(lh.C0,c0.lh*CFrame.Angles(-tilt,hasRobe and 0 or .1,hasRobe and 0 or -.06),alpha) | |
| 1523 | rs.C0 = clerp(rs.C0,c0.rs*CFrame.Angles(-tilt,0,.1),alpha) | |
| 1524 | ls.C0 = clerp(ls.C0,c0.ls*CFrame.Angles(-tilt,0,-.1),alpha) | |
| 1525 | nk.C0 = clerp(nk.C0,c0.nk*CFrame.Angles(-tilt+breathing*.05-.03,0,0),alpha) | |
| 1526 | elseif state == "inair" then | |
| 1527 | hum.PlatformStand = false | |
| 1528 | local wings = math.sin(tick()*80) | |
| 1529 | w1.C0 = clerp(w1.C0,w10*CFrame.Angles(0,-.15+wings*.3,0),.6) | |
| 1530 | w2.C0 = clerp(w2.C0,w20*CFrame.Angles(0,.15-wings*.3,0),.6) | |
| 1531 | local alpha = .15 | |
| 1532 | local tilt = .05 | |
| 1533 | local wavey = math.sin(tick()*3) | |
| 1534 | tw.C0 = clerp(tw.C0,c0.tw*CFrame.Angles(tilt,0,0),alpha) | |
| 1535 | rh.C0 = clerp(rh.C0,c0.rh*CFrame.Angles(-tilt+wavey*.1,0,hasRobe and 0 or .02),alpha) | |
| 1536 | lh.C0 = clerp(lh.C0,c0.lh*CFrame.Angles(-tilt-wavey*.1,0,hasRobe and 0 or -.02),alpha) | |
| 1537 | rs.C0 = clerp(rs.C0,c0.rs*CFrame.Angles(-tilt-wavey*.07,0,.01),alpha) | |
| 1538 | ls.C0 = clerp(ls.C0,c0.ls*CFrame.Angles(-tilt+wavey*.07,0,-.01),alpha) | |
| 1539 | nk.C0 = clerp(nk.C0,c0.nk*CFrame.Angles(-tilt+.2,0,0),alpha) | |
| 1540 | elseif state == "walk" then | |
| 1541 | hum.PlatformStand = false | |
| 1542 | local walking = math.sin(tick()*25) | |
| 1543 | local breathing = math.sin(tick()*2) | |
| 1544 | local tilt = -.03-breathing*.02+walking*.01 | |
| 1545 | alpha = .6 | |
| 1546 | w1.C0 = clerp(w1.C0,w10*CFrame.Angles(0,-.05+breathing*.01+walking*.05,0),alpha) | |
| 1547 | w2.C0 = clerp(w2.C0,w20*CFrame.Angles(0,.05-breathing*.01+walking*.05,0),alpha) | |
| 1548 | ||
| 1549 | tw.C0 = clerp(tw.C0,c0.tw*CFrame.Angles(tilt,-walking*.08,0),alpha) | |
| 1550 | rh.C0 = clerp(rh.C0,c0.rh*CFrame.Angles(-tilt+walking*.3,0,hasRobe and 0 or .02),alpha) | |
| 1551 | lh.C0 = clerp(lh.C0,c0.lh*CFrame.Angles(-tilt-walking*.3,0,hasRobe and 0 or -.02),alpha) | |
| 1552 | rs.C0 = clerp(rs.C0,c0.rs*CFrame.Angles(-tilt+.05-walking*.25,0,.01),alpha) | |
| 1553 | ls.C0 = clerp(ls.C0,c0.ls*CFrame.Angles(-tilt+.05+walking*.25,0,-.01),alpha) | |
| 1554 | nk.C0 = clerp(nk.C0,c0.nk*CFrame.Angles(-tilt+breathing*.04,walking*.07,0),alpha) | |
| 1555 | elseif state == "sit" then | |
| 1556 | hum.Sit = false | |
| 1557 | hum.PlatformStand = true | |
| 1558 | local breathing = math.sin(tick()*2) | |
| 1559 | local upvec = root.CFrame:vectorToWorldSpace(Vector3.new(0,1,0)) | |
| 1560 | if upvec.Y > .4 then | |
| 1561 | local tilt = -.55+breathing*.015 | |
| 1562 | w1.C0 = clerp(w1.C0,w10*CFrame.Angles(0,-.01+breathing*.01,0),alpha) | |
| 1563 | w2.C0 = clerp(w2.C0,w20*CFrame.Angles(0,.01-breathing*.01,0),alpha) | |
| 1564 | tw.C0 = clerp(tw.C0,c0.tw*CFrame.Angles(tilt,0,0)+Vector3.new(0,-1.7,0)*modelScale,alpha) | |
| 1565 | rh.C0 = clerp(rh.C0,c0.rh*CFrame.Angles(-tilt+1.57,0,hasRobe and 0 or .6),alpha) | |
| 1566 | lh.C0 = clerp(lh.C0,c0.lh*CFrame.Angles(-tilt+1.57,0,hasRobe and 0 or -.6),alpha) | |
| 1567 | rs.C0 = clerp(rs.C0,c0.rs*CFrame.Angles(-tilt+.3,0,-.1)*CFrame.Angles(hasRobe and .3 or 0,hasRobe and .2 or 0,hasRobe and -.2 or 0)+(hasRobe and 0 or 1)*Vector3.new(-.85,-.25,-.25)*modelScale,alpha) | |
| 1568 | ls.C0 = clerp(ls.C0,c0.ls*CFrame.Angles(-tilt+.3,0,.1)*CFrame.Angles(hasRobe and .3 or 0,hasRobe and -.2 or 0,hasRobe and .2 or 0)+(hasRobe and 0 or 1)*Vector3.new(.85,-.25,-.25)*modelScale,alpha) | |
| 1569 | nk.C0 = clerp(nk.C0,c0.nk*CFrame.Angles(-tilt+breathing*.04-.03,0,math.sin(tick()*4)*.06),alpha) | |
| 1570 | else -- wallhug | |
| 1571 | local breathing = math.sin(tick()*5) | |
| 1572 | local tilt = -1.55+breathing*.015 | |
| 1573 | w1.C0 = clerp(w1.C0,w10*CFrame.Angles(0,-.01+breathing*.01,0),alpha) | |
| 1574 | w2.C0 = clerp(w2.C0,w20*CFrame.Angles(0,.01-breathing*.01,0),alpha) | |
| 1575 | tw.C0 = clerp(tw.C0,c0.tw*CFrame.Angles(tilt,0,0)+Vector3.new(0,-2.5,0)*modelScale,alpha) | |
| 1576 | rh.C0 = clerp(rh.C0,c0.rh*CFrame.Angles(.2,0,hasRobe and 0 or .5)+Vector3.new(0,hasRobe and 0 or .2,0)*modelScale,alpha) | |
| 1577 | lh.C0 = clerp(lh.C0,c0.lh*CFrame.Angles(.2,0,hasRobe and 0 or -.5)+Vector3.new(0,hasRobe and 0 or .2,0)*modelScale,alpha) | |
| 1578 | rs.C0 = clerp(rs.C0,c0.rs*CFrame.Angles(2.9,0,.8)+Vector3.new(-.2,.4,0)*modelScale,alpha) | |
| 1579 | ls.C0 = clerp(ls.C0,c0.ls*CFrame.Angles(2.9,0,-.8)+Vector3.new(.2,.4,0)*modelScale,alpha) | |
| 1580 | nk.C0 = clerp(nk.C0,c0.nk*CFrame.Angles(breathing*.04+.7,0,0),alpha) | |
| 1581 | end | |
| 1582 | elseif state == "fly" then | |
| 1583 | hum.PlatformStand = true | |
| 1584 | gyro.maxTorque = Vector3.new(1,1,1)*4e6 | |
| 1585 | vel.maxForce = Vector3.new(1,1,1)*4e5 | |
| 1586 | ||
| 1587 | local velocity = Vector3.new((kd.d and 1 or 0)+(kd.a and -1 or 0),0,(kd.s and 1 or 0)+(kd.w and -1 or 0)) | |
| 1588 | velocity = cam.CoordinateFrame:vectorToWorldSpace(velocity) | |
| 1589 | local maxspeed = 40-(velocity.magnitude > 0 and velocity.unit.Y*20 or 0) | |
| 1590 | if velocity.magnitude > 0 then | |
| 1591 | flyspeed = lerp(flyspeed,maxspeed,.1) | |
| 1592 | flydir = flydir:Lerp(velocity.unit,.4).unit | |
| 1593 | hoverheight = nil | |
| 1594 | else | |
| 1595 | - | end |
| 1595 | + | |
| 1596 | flydir = (flydir*Vector3.new(1,0,1)).unit | |
| 1597 | hoverheight = hoverheight or root.Position.Y | |
| 1598 | end | |
| 1599 | vel.velocity = flydir.unit * flyspeed | |
| 1600 | if hoverheight then | |
| 1601 | vel.velocity = vel.velocity + Vector3.new(0,hoverheight-root.Position.Y,0) | |
| 1602 | end | |
| 1603 | gyro.cframe = CFrame.new(Vector3.new(),flydir*Vector3.new(1,0,1)) | |
| 1604 | ||
| 1605 | rl.CanCollide,ll.CanCollide = true,true | |
| 1606 | ||
| 1607 | local wings = math.sin(tick()*80) | |
| 1608 | w1.C0 = clerp(w1.C0,w10*CFrame.Angles(0,-.15+wings*.3,0),.6) | |
| 1609 | w2.C0 = clerp(w2.C0,w20*CFrame.Angles(0,.15-wings*.3,0),.6) | |
| 1610 | local alpha = .15 | |
| 1611 | local flytilt = (flyspeed/maxspeed) | |
| 1612 | local tilt = flytilt*-1.4 + math.asin(gyro.cframe:vectorToObjectSpace(flydir).unit.Y) | |
| 1613 | local wavey = math.sin(tick()*6) | |
| 1614 | tw.C0 = clerp(tw.C0,c0.tw*CFrame.Angles(tilt,0,0),alpha) | |
| 1615 | rh.C0 = clerp(rh.C0,c0.rh*CFrame.Angles(wavey*.1,hasRobe and 0 or -.08,hasRobe and 0 or .1),alpha) | |
| 1616 | lh.C0 = clerp(lh.C0,c0.lh*CFrame.Angles(-wavey*.1,hasRobe and 0 or .08,hasRobe and 0 or -.1),alpha) | |
| 1617 | rs.C0 = clerp(rs.C0,c0.rs*CFrame.Angles(-wavey*.15,-.08,.1),alpha) | |
| 1618 | ls.C0 = clerp(ls.C0,c0.ls*CFrame.Angles(wavey*.15,.08,-.1),alpha) | |
| 1619 | nk.C0 = clerp(nk.C0,c0.nk*CFrame.Angles(-tilt*.8,0,0),alpha) | |
| 1620 | end | |
| 1621 | end | |
| 1622 | local ran,err = ypcall(function() | |
| 1623 | plr = game:service'Players'.LocalPlayer | |
| 1624 | char = plr.Character | |
| 1625 | mouse = plr:GetMouse() | |
| 1626 | humanoid = char:findFirstChild("Humanoid")
| |
| 1627 | torso = char:findFirstChild("Torso")
| |
| 1628 | head = char.Head | |
| 1629 | ra = char:findFirstChild("Right Arm")
| |
| 1630 | la = char:findFirstChild("Left Arm")
| |
| 1631 | rl = char:findFirstChild("Right Leg")
| |
| 1632 | ll = char:findFirstChild("Left Leg")
| |
| 1633 | rs = torso:findFirstChild("Right Shoulder")
| |
| 1634 | ls = torso:findFirstChild("Left Shoulder")
| |
| 1635 | rh = torso:findFirstChild("Right Hip")
| |
| 1636 | lh = torso:findFirstChild("Left Hip")
| |
| 1637 | neck = torso:findFirstChild("Neck")
| |
| 1638 | rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
| |
| 1639 | anim = char:findFirstChild("Animate")
| |
| 1640 | rootpart = char:findFirstChild("HumanoidRootPart")
| |
| 1641 | camera = workspace.CurrentCamera | |
| 1642 | do --Removing ROBLOX's new Looped bug >_> | |
| 1643 | local function rec(x) | |
| 1644 | for i,v in pairs(x:children()) do | |
| 1645 | if v:IsA'Animation' then | |
| 1646 | v.AnimationId = 'rbxassetid://28159255' | |
| 1647 | end | |
| 1648 | rec(v) | |
| 1649 | end | |
| 1650 | end | |
| 1651 | rec(anim) --the Animate script | |
| 1652 | end | |
| 1653 | ||
| 1654 | humanoid.Jump = true | |
| 1655 | ||
| 1656 | wait(.4) | |
| 1657 | ||
| 1658 | ||
| 1659 | if anim then | |
| 1660 | anim:Destroy() | |
| 1661 | end | |
| 1662 | ||
| 1663 | ||
| 1664 | rj.C0 = CFrame.new() | |
| 1665 | rj.C1 = CFrame.new() | |
| 1666 | ||
| 1667 | ||
| 1668 | super_annoying = Instance.new("Sound", head)
| |
| 1669 | super_annoying.SoundId = "http://www.roblox.com/asset/?id=" | |
| 1670 | super_annoying.Volume = 0.6 | |
| 1671 | super_annoying.Looped = true | |
| 1672 | barrel_roll = Instance.new("Sound", head)
| |
| 1673 | barrel_roll.SoundId = "http://www.roblox.com/asset/?id=" | |
| 1674 | barrel_roll.Volume = 1 | |
| 1675 | barrel_roll.Looped = true | |
| 1676 | dubstep_gun = Instance.new("Sound", head)
| |
| 1677 | dubstep_gun.SoundId = "http://www.roblox.com/asset/?id=" | |
| 1678 | dubstep_gun.Volume = 0.6 | |
| 1679 | dubstep_gun.Looped = true | |
| 1680 | you_are_pirate = Instance.new("Sound", head)
| |
| 1681 | you_are_pirate.SoundId = "http://www.roblox.com/asset/?id=" | |
| 1682 | you_are_pirate.Volume = 0.6 | |
| 1683 | you_are_pirate.Looped = true | |
| 1684 | cant_touch = Instance.new("Sound", head)
| |
| 1685 | cant_touch.SoundId = "http://www.roblox.com/asset/?id=" | |
| 1686 | cant_touch.Volume = 1 | |
| 1687 | cant_touch.Looped = true | |
| 1688 | gangy_style = Instance.new("Sound", head)
| |
| 1689 | gangy_style.SoundId = "http://www.roblox.com/asset/?id=" | |
| 1690 | gangy_style.Volume = 0.6 | |
| 1691 | gangy_style.Looped = true | |
| 1692 | fox_say = Instance.new("Sound", head)
| |
| 1693 | fox_say.SoundId = "http://www.roblox.com/asset/?id=" | |
| 1694 | fox_say.Volume = 0.5 | |
| 1695 | fox_say.Looped = true | |
| 1696 | durk = Instance.new("Sound", head)
| |
| 1697 | durk.SoundId = "http://www.roblox.com/asset/?id=" | |
| 1698 | durk.Volume = 0.8 | |
| 1699 | durk.Looped = true | |
| 1700 | sax_guy = Instance.new("Sound", head)
| |
| 1701 | sax_guy.SoundId = "http://www.roblox.com/asset/?id=" | |
| 1702 | sax_guy.Volume = 0.6 | |
| 1703 | sax_guy.Looped = true | |
| 1704 | heman = Instance.new("Sound", head)
| |
| 1705 | heman.SoundId = "http://www.roblox.com/asset/?id=" | |
| 1706 | heman.Volume = 1 | |
| 1707 | heman.Looped = true | |
| 1708 | justin = Instance.new("Sound", head)
| |
| 1709 | justin.SoundId = "http://www.roblox.com/asset/?id=" | |
| 1710 | justin.Volume = 0.8 | |
| 1711 | justin.Looped = true | |
| 1712 | brony_music = Instance.new("Sound", head)
| |
| 1713 | brony_music.SoundId = "http://www.roblox.com/asset/?id=" | |
| 1714 | brony_music.Volume = 1 | |
| 1715 | brony_music.Looped = true | |
| 1716 | spitfire = Instance.new("Sound", head)
| |
| 1717 | spitfire.SoundId = "http://www.roblox.com/asset/?id=" | |
| 1718 | spitfire.Volume = 0.8 | |
| 1719 | spitfire.Looped = true | |
| 1720 | burn_dem = Instance.new("Sound", head)
| |
| 1721 | burn_dem.SoundId = "http://www.roblox.com/asset/?id=" | |
| 1722 | burn_dem.Volume = 1 | |
| 1723 | burn_dem.Looped = true | |
| 1724 | aj = Instance.new("Sound", head)
| |
| 1725 | aj.SoundId = "rbxassetid://" | |
| 1726 | aj.Volume = 1 | |
| 1727 | aj.Looped = true | |
| 1728 | ||
| 1729 | Instance.new("HumanoidController", game:service'ControllerService')
| |
| 1730 | Instance.new("SkateboardController", game:service'ControllerService')
| |
| 1731 | Instance.new("VehicleController", game:service'ControllerService')
| |
| 1732 | ||
| 1733 | ||
| 1734 | ||
| 1735 | ||
| 1736 | --minimize | |
| 1737 | rh.Parent = nil | |
| 1738 | lh.Parent = nil | |
| 1739 | rs.Parent = nil | |
| 1740 | ls.Parent = nil | |
| 1741 | neck.Parent = nil | |
| 1742 | rj.Parent = nil | |
| 1743 | ||
| 1744 | ||
| 1745 | rl.FormFactor = "Custom" | |
| 1746 | ll.FormFactor = "Custom" | |
| 1747 | ra.FormFactor = "Custom" | |
| 1748 | la.FormFactor = "Custom" | |
| 1749 | torso.FormFactor = "Custom" | |
| 1750 | head.FormFactor = "Custom" | |
| 1751 | rootpart.FormFactor = "Custom" | |
| 1752 | ||
| 1753 | ||
| 1754 | ||
| 1755 | ||
| 1756 | rootpart.Size = Vector3.new(.4, .4, .2) | |
| 1757 | rl.Size = Vector3.new(.2, .4, .2) | |
| 1758 | ll.Size = Vector3.new(.2, .4, .2) | |
| 1759 | ra.Size = Vector3.new(.2, .4, .2) | |
| 1760 | la.Size = Vector3.new(.2, .4, .2) | |
| 1761 | torso.Size = Vector3.new(.4, .4, .2) | |
| 1762 | head.Size = Vector3.new(.4, .2, .2) | |
| 1763 | ||
| 1764 | rh.Parent = torso | |
| 1765 | lh.Parent = torso | |
| 1766 | rs.Parent = torso | |
| 1767 | ls.Parent = torso | |
| 1768 | neck.Parent = torso | |
| 1769 | rj.Parent = rootpart | |
| 1770 | ||
| 1771 | ||
| 1772 | if torso:findFirstChild("roblox") then
| |
| 1773 | local p = Instance.new("Part", char)
| |
| 1774 | p.FormFactor = "Custom" | |
| 1775 | p.Size = torso.Size | |
| 1776 | p.Transparency = 1 | |
| 1777 | p:BreakJoints() | |
| 1778 | local w = Instance.new("Weld", char)
| |
| 1779 | w.Part0 = p | |
| 1780 | w.Part1 = torso | |
| 1781 | torso:findFirstChild("roblox").Parent = p
| |
| 1782 | end | |
| 1783 | ||
| 1784 | ||
| 1785 | --[[mesh1 = Instance.new("SpecialMesh", torso)
| |
| 1786 | mesh1.Name = "Mesh" | |
| 1787 | mesh1.Scale = torso.Size - Vector3.new(torso.Size.x/2, torso.Size.y/2, 0) | |
| 1788 | mesh1.MeshId = "rbxasset://fonts/torso.mesh" | |
| 1789 | mesh2 = Instance.new("SpecialMesh", la)
| |
| 1790 | mesh2.Name = "Mesh" | |
| 1791 | mesh2.Scale = la.Size - Vector3.new(0, la.Size.y/2, 0) | |
| 1792 | mesh2.MeshId = "rbxasset://fonts/leftarm.mesh" | |
| 1793 | mesh3 = Instance.new("SpecialMesh", ra)
| |
| 1794 | mesh3.Name = "Mesh" | |
| 1795 | mesh3.Scale = ra.Size - Vector3.new(0, ra.Size.y/2, 0) | |
| 1796 | mesh3.MeshId = "rbxasset://fonts/rightarm.mesh" | |
| 1797 | mesh4 = Instance.new("SpecialMesh", ll)
| |
| 1798 | mesh4.Name = "Mesh" | |
| 1799 | mesh4.Scale = ll.Size - Vector3.new(0, ll.Size.y/2, 0) | |
| 1800 | mesh4.MeshId = "rbxasset://fonts/leftleg.mesh" | |
| 1801 | mesh5 = Instance.new("SpecialMesh", rl)
| |
| 1802 | mesh5.Name = "Mesh" | |
| 1803 | mesh5.Scale = rl.Size - Vector3.new(0, rl.Size.y/2, 0) | |
| 1804 | mesh5.MeshId = "rbxasset://fonts/rightleg.mesh"--]] | |
| 1805 | ||
| 1806 | ||
| 1807 | --0.3 = 1.5, 0.1 = 0.5, 0.2 = 1 | |
| 1808 | ||
| 1809 | ls.C0 = CFrame.new(-.3,.1,0) | |
| 1810 | ls.C1 = CFrame.new(0,.1,0) | |
| 1811 | rs.C0 = CFrame.new(.3,.1,0) | |
| 1812 | rs.C1 = CFrame.new(0,.1,0) | |
| 1813 | rh.C0 = CFrame.new(.1,-.2,0) | |
| 1814 | rh.C1 = CFrame.new(0, .2, 0) | |
| 1815 | lh.C0 = CFrame.new(-.1,-.2,0) | |
| 1816 | lh.C1 = CFrame.new(0, .2, 0) | |
| 1817 | neck.C0 = CFrame.new(0,.2,0) | |
| 1818 | neck.C1 = CFrame.new(0,-.1,0) | |
| 1819 | ||
| 1820 | bodyc = char:findFirstChild("Body Colors")
| |
| 1821 | if bodyc then | |
| 1822 | bodyc:Destroy() | |
| 1823 | end | |
| 1824 | ||
| 1825 | wait(1) | |
| 1826 | ||
| 1827 | local body = {}
| |
| 1828 | for i,v in pairs(char:children()) do | |
| 1829 | if v:IsA'BasePart' then | |
| 1830 | body[v] = {Color = v.BrickColor}
| |
| 1831 | end | |
| 1832 | end | |
| 1833 | ||
| 1834 | function restorecolors() | |
| 1835 | for _,bp in pairs(char:children()) do | |
| 1836 | if bp:IsA("BasePart") then
| |
| 1837 | bp.BrickColor = body[bp].Color | |
| 1838 | end | |
| 1839 | end | |
| 1840 | end | |
| 1841 | ||
| 1842 | ||
| 1843 | local LightForTorso = Instance.new("PointLight", head)
| |
| 1844 | LightForTorso.Color = torso.BrickColor.Color | |
| 1845 | LightForTorso.Range = 7 | |
| 1846 | LightForTorso.Brightness = 1.5 | |
| 1847 | ||
| 1848 | ||
| 1849 | ||
| 1850 | ||
| 1851 | local slidecount = 0 | |
| 1852 | local slidecountmax = 0 | |
| 1853 | local anim = "" | |
| 1854 | local lastanim = anim | |
| 1855 | local speed = 0 | |
| 1856 | local looking = false | |
| 1857 | local dancing = false | |
| 1858 | local superannoying = false | |
| 1859 | local barrelroll = false | |
| 1860 | local dubstepgun = false | |
| 1861 | local foxie = false | |
| 1862 | local durka = false | |
| 1863 | local saxguy = false | |
| 1864 | local heya = false | |
| 1865 | local jb = false | |
| 1866 | local bronymusic = false | |
| 1867 | local sheddy = false | |
| 1868 | local burndem = false | |
| 1869 | local global_wait = 0 | |
| 1870 | ||
| 1871 | count = 0 | |
| 1872 | countspeed = 1 | |
| 1873 | sine = 0 | |
| 1874 | sinespeed = 1 | |
| 1875 | ||
| 1876 | ||
| 1877 | ||
| 1878 | humanoid.WalkSpeed = 50 | |
| 1879 | ||
| 1880 | ||
| 1881 | local controllerService = game:GetService("ControllerService")
| |
| 1882 | local controller = controllerService:GetChildren()[1] | |
| 1883 | ||
| 1884 | ||
| 1885 | local colors = {"White", "Really black"}
| |
| 1886 | ||
| 1887 | humanoid.Died:connect(function() | |
| 1888 | for cframe_parts = 0, 100 do | |
| 1889 | local p = Instance.new("Part")
| |
| 1890 | p.FormFactor = "Custom" | |
| 1891 | p.BrickColor = BrickColor.new(colors[math.random(1, #colors)]) | |
| 1892 | p.Size = Vector3.new(1, 1, 1) | |
| 1893 | Instance.new("BlockMesh", p).Scale = Vector3.new(0.05, 0.05, 0.05)
| |
| 1894 | p.Locked = true | |
| 1895 | p.CanCollide = false | |
| 1896 | p.Anchored = true | |
| 1897 | p.CFrame = torso.CFrame * CFrame.Angles(math.random(-36, 36),math.random(-36, 36),math.random(-36, 36)) | |
| 1898 | p.Parent = workspace | |
| 1899 | game:service'Debris':AddItem(p, 5) | |
| 1900 | coroutine.wrap(function() | |
| 1901 | while wait() do | |
| 1902 | if p ~= nil then | |
| 1903 | p.CFrame = p.CFrame * CFrame.new(0, 0.085, 0) | |
| 1904 | p.Mesh.Scale = p.Mesh.Scale - Vector3.new(0.005, 0, 0.005) + Vector3.new(0, 0.01, 0) | |
| 1905 | p.Transparency = p.Transparency + 0.015 | |
| 1906 | else | |
| 1907 | break | |
| 1908 | end | |
| 1909 | end | |
| 1910 | end)() | |
| 1911 | end | |
| 1912 | for _,v in pairs(char:children()) do | |
| 1913 | if v:IsA("Part") then
| |
| 1914 | v:Destroy() | |
| 1915 | end | |
| 1916 | end | |
| 1917 | ||
| 1918 | end) | |
| 1919 | ||
| 1920 | ||
| 1921 | mouse.KeyDown:connect(function(k) | |
| 1922 | ||
| 1923 | if string.byte(k) == 50 then | |
| 1924 | ||
| 1925 | if dancing then return end | |
| 1926 | sitting = not sitting | |
| 1927 | if sitting then | |
| 1928 | local ray = Ray.new(torso.Position, Vector3.new(0, -1, 0)) | |
| 1929 | local hitz,enz = workspace:FindPartOnRay(ray, char) | |
| 1930 | ||
| 1931 | ||
| 1932 | if hitz then | |
| 1933 | controller.Parent = nil | |
| 1934 | humanoid.WalkSpeed = 0 | |
| 1935 | coroutine.wrap(function() | |
| 1936 | while wait() do | |
| 1937 | humanoid.PlatformStand = true | |
| 1938 | if sitting == false then humanoid.PlatformStand = false break end | |
| 1939 | end | |
| 1940 | end)() | |
| 1941 | rj.C0 = CFrame.new(0, -0.35, 0) * CFrame.Angles(math.rad(10), 0, 0) | |
| 1942 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(math.pi/2-math.rad(10), 0, -math.pi/16) | |
| 1943 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(math.pi/2-math.rad(10), 0, math.pi/16) | |
| 1944 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(-math.rad(10), 0, -math.pi/10) | |
| 1945 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(-math.rad(10), 0, math.pi/10) | |
| 1946 | ||
| 1947 | miniweld = Instance.new("Weld", char)
| |
| 1948 | miniweld.C0 = hitz.CFrame:toObjectSpace(rootpart.CFrame) | |
| 1949 | miniweld.Part0 = hitz | |
| 1950 | miniweld.Part1 = rootpart | |
| 1951 | else | |
| 1952 | sitting = false | |
| 1953 | return | |
| 1954 | end | |
| 1955 | else | |
| 1956 | if miniweld then | |
| 1957 | miniweld:Destroy() | |
| 1958 | end | |
| 1959 | controller.Parent = controllerService | |
| 1960 | humanoid.PlatformStand = false | |
| 1961 | humanoid.WalkSpeed = 11 | |
| 1962 | end | |
| 1963 | end | |
| 1964 | ||
| 1965 | if k == "w" or k == "a" or k == "s" or k == "d" or string.byte(k) == 32 then | |
| 1966 | superannoying = false | |
| 1967 | barrelroll = false | |
| 1968 | heya = false | |
| 1969 | dubstepgun = false | |
| 1970 | youpirate = false | |
| 1971 | canttouch = false | |
| 1972 | gangnam = false | |
| 1973 | sheddy = false | |
| 1974 | durka = false | |
| 1975 | saxguy = false | |
| 1976 | foxie = false | |
| 1977 | burndem = false | |
| 1978 | bronymusic = false | |
| 1979 | brony_music:stop() | |
| 1980 | fox_say:stop() | |
| 1981 | spitfire:stop() | |
| 1982 | heman:stop() | |
| 1983 | justin:stop() | |
| 1984 | jb = false | |
| 1985 | durk:stop() | |
| 1986 | restorecolors() | |
| 1987 | burn_dem:stop() | |
| 1988 | if hat then | |
| 1989 | hat:Destroy() | |
| 1990 | end | |
| 1991 | sax_guy:stop() | |
| 1992 | gangy_style:stop() | |
| 1993 | cant_touch:stop() | |
| 1994 | you_are_pirate:stop() | |
| 1995 | dubstep_gun:stop() | |
| 1996 | super_annoying:stop() | |
| 1997 | barrel_roll:stop() | |
| 1998 | dancing = false | |
| 1999 | global_wait = 0 | |
| 2000 | LightForTorso.Color = torso.BrickColor.Color | |
| 2001 | end | |
| 2002 | ||
| 2003 | if k == "z" then | |
| 2004 | if dancing then return end | |
| 2005 | if not sitting then | |
| 2006 | dancing = true | |
| 2007 | superannoying = true | |
| 2008 | super_annoying:play() | |
| 2009 | end | |
| 2010 | end | |
| 2011 | if k == "k" then | |
| 2012 | if dancing then return end | |
| 2013 | if not sitting then | |
| 2014 | dancing = true | |
| 2015 | sheddy = true | |
| 2016 | spitfire:play() | |
| 2017 | end | |
| 2018 | end | |
| 2019 | ||
| 2020 | if k == "n" then | |
| 2021 | if dancing then return end | |
| 2022 | if not sitting then | |
| 2023 | dancing = true | |
| 2024 | gangnam = true | |
| 2025 | gangy_style:play() | |
| 2026 | end | |
| 2027 | end | |
| 2028 | ||
| 2029 | if k == "r" then | |
| 2030 | if dancing then return end | |
| 2031 | if not sitting then | |
| 2032 | dancing = true | |
| 2033 | burndem = true | |
| 2034 | burn_dem:play() | |
| 2035 | end | |
| 2036 | end | |
| 2037 | ||
| 2038 | ||
| 2039 | if k == "x" then | |
| 2040 | if dancing then return end | |
| 2041 | if not sitting then | |
| 2042 | dancing = true | |
| 2043 | barrelroll = true | |
| 2044 | barrel_roll:play() | |
| 2045 | hat = Instance.new("Part", char)
| |
| 2046 | hat.FormFactor = "Custom" | |
| 2047 | hat.CanCollide = false | |
| 2048 | hat.Size = torso.Size | |
| 2049 | hat.Locked = true | |
| 2050 | hat:breakJoints() | |
| 2051 | local hatmesh = Instance.new("SpecialMesh", hat)
| |
| 2052 | hatmesh.MeshId = "http://www.roblox.com/asset/?id=29873142" | |
| 2053 | hatmesh.TextureId = "http://www.roblox.com/asset/?id=31467063" | |
| 2054 | hatmesh.Scale = Vector3.new(.22, .2, .22) | |
| 2055 | local hatweld = Instance.new("Weld", hat)
| |
| 2056 | hatweld.Part0 = hat | |
| 2057 | hatweld.Part1 = torso | |
| 2058 | end | |
| 2059 | end | |
| 2060 | if k == "h" then | |
| 2061 | if dancing then return end | |
| 2062 | if not sitting then | |
| 2063 | dancing = true | |
| 2064 | heman:play() | |
| 2065 | heya = true | |
| 2066 | hat = Instance.new("Part", char)
| |
| 2067 | hat.FormFactor = "Custom" | |
| 2068 | hat.CanCollide = false | |
| 2069 | hat.Size = torso.Size + Vector3.new(0.01, 0.01, 0.01) | |
| 2070 | hat.Locked = true | |
| 2071 | hat.BrickColor = BrickColor.new("Hot pink")
| |
| 2072 | hat:breakJoints() | |
| 2073 | local hatweld = Instance.new("Weld", hat)
| |
| 2074 | hatweld.Part0 = hat | |
| 2075 | hatweld.Part1 = torso | |
| 2076 | end | |
| 2077 | end | |
| 2078 | if k == "j" then | |
| 2079 | if dancing then return end | |
| 2080 | if not sitting then | |
| 2081 | dancing = true | |
| 2082 | justin:play() | |
| 2083 | jb = true | |
| 2084 | hat = Instance.new("Part", char)
| |
| 2085 | hat.FormFactor = "Custom" | |
| 2086 | hat.CanCollide = false | |
| 2087 | hat.Size = head.Size | |
| 2088 | hat.Locked = true | |
| 2089 | hat.BrickColor = BrickColor.new("Hot pink")
| |
| 2090 | hat:breakJoints() | |
| 2091 | local hatmesh = Instance.new("SpecialMesh", hat)
| |
| 2092 | hatmesh.MeshId = "http://www.roblox.com/asset/?id=19999424" | |
| 2093 | hatmesh.TextureId = "http://www.roblox.com/asset/?id=20571982" | |
| 2094 | hatmesh.Scale = Vector3.new(.23, .23, .23) | |
| 2095 | local hatweld = Instance.new("Weld", hat)
| |
| 2096 | hatweld.Part0 = hat | |
| 2097 | hatweld.Part1 = head | |
| 2098 | hatweld.C0 = CFrame.new(0.025, -0.05, 0) | |
| 2099 | end | |
| 2100 | end | |
| 2101 | if k == "c" then | |
| 2102 | if dancing then return end | |
| 2103 | if not sitting then | |
| 2104 | dancing = true | |
| 2105 | dubstepgun = true | |
| 2106 | dubstep_gun:play() | |
| 2107 | end | |
| 2108 | end | |
| 2109 | if k == "v" then | |
| 2110 | if dancing then return end | |
| 2111 | if not sitting then | |
| 2112 | dancing = true | |
| 2113 | youpirate = true | |
| 2114 | you_are_pirate:play() | |
| 2115 | hat = Instance.new("Part", char)
| |
| 2116 | hat.FormFactor = "Custom" | |
| 2117 | hat.CanCollide = false | |
| 2118 | hat.Size = head.Size | |
| 2119 | hat.Locked = true | |
| 2120 | hat:breakJoints() | |
| 2121 | local hatmesh = Instance.new("SpecialMesh", hat)
| |
| 2122 | hatmesh.MeshId = "http://www.roblox.com/asset/?id=1028848" | |
| 2123 | hatmesh.TextureId = "http://www.roblox.com/asset/?id=1028847" | |
| 2124 | hatmesh.Scale = Vector3.new(.2, .2, .2) | |
| 2125 | local hatweld = Instance.new("Weld", hat)
| |
| 2126 | hatweld.Part0 = hat | |
| 2127 | hatweld.Part1 = head | |
| 2128 | hatweld.C0 = CFrame.new(0, -0.15, 0) | |
| 2129 | end | |
| 2130 | end | |
| 2131 | if k == "m" then | |
| 2132 | if dancing then return end | |
| 2133 | if not sitting then | |
| 2134 | dancing = true | |
| 2135 | canttouch = true | |
| 2136 | cant_touch:play() | |
| 2137 | end | |
| 2138 | end | |
| 2139 | if k == "b" then | |
| 2140 | if dancing then return end | |
| 2141 | if not sitting then | |
| 2142 | dancing = true | |
| 2143 | bronymusic = true | |
| 2144 | brony_music:play() | |
| 2145 | for _,bp in pairs(char:children()) do | |
| 2146 | if bp:IsA("BasePart") then
| |
| 2147 | bp.BrickColor = BrickColor.new("Lavender")
| |
| 2148 | end | |
| 2149 | end | |
| 2150 | hat = Instance.new("Part", char)
| |
| 2151 | hat.FormFactor = "Custom" | |
| 2152 | hat.CanCollide = false | |
| 2153 | hat.Size = head.Size | |
| 2154 | hat.Locked = true | |
| 2155 | hat.BrickColor = BrickColor.new("Lavender")
| |
| 2156 | hat:breakJoints() | |
| 2157 | local hatmesh = Instance.new("SpecialMesh", hat)
| |
| 2158 | hatmesh.MeshId = "http://www.roblox.com/asset/?id=118186643" | |
| 2159 | hatmesh.Scale = Vector3.new(.1, .2, .1) | |
| 2160 | local hatweld = Instance.new("Weld", hat)
| |
| 2161 | hatweld.Part0 = hat | |
| 2162 | hatweld.Part1 = head | |
| 2163 | hatweld.C0 = CFrame.new(0, -0.1, 0.05) | |
| 2164 | end | |
| 2165 | end | |
| 2166 | ||
| 2167 | if k == "l" then | |
| 2168 | if dancing then return end | |
| 2169 | if not sitting then | |
| 2170 | dancing = true | |
| 2171 | foxie = true | |
| 2172 | fox_say:play() | |
| 2173 | hat = Instance.new("Part", char)
| |
| 2174 | hat.FormFactor = "Custom" | |
| 2175 | hat.CanCollide = false | |
| 2176 | hat.Size = head.Size | |
| 2177 | hat.Locked = true | |
| 2178 | hat:breakJoints() | |
| 2179 | local hatmesh = Instance.new("SpecialMesh", hat)
| |
| 2180 | hatmesh.MeshId = "http://www.roblox.com/asset/?id=25266225" | |
| 2181 | hatmesh.TextureId = "http://www.roblox.com/asset/?id=25266210" | |
| 2182 | hatmesh.Scale = Vector3.new(.2, .2, .2) | |
| 2183 | local hatweld = Instance.new("Weld", hat)
| |
| 2184 | hatweld.Part0 = hat | |
| 2185 | hatweld.Part1 = head | |
| 2186 | hatweld.C0 = CFrame.new(0, -0.1, 0) | |
| 2187 | end | |
| 2188 | ||
| 2189 | end | |
| 2190 | if k == "f" then | |
| 2191 | if dancing then return end | |
| 2192 | if not sitting then | |
| 2193 | dancing = true | |
| 2194 | durka = true | |
| 2195 | durk:play() | |
| 2196 | end | |
| 2197 | end | |
| 2198 | if k == "g" then | |
| 2199 | if dancing then return end | |
| 2200 | if not sitting then | |
| 2201 | dancing = true | |
| 2202 | saxguy = true | |
| 2203 | sax_guy:play() | |
| 2204 | hat = Instance.new("Part", char)
| |
| 2205 | hat.FormFactor = "Custom" | |
| 2206 | hat.CanCollide = false | |
| 2207 | hat.Size = head.Size | |
| 2208 | hat.Locked = true | |
| 2209 | hat:breakJoints() | |
| 2210 | local hatmesh = Instance.new("SpecialMesh", hat)
| |
| 2211 | hatmesh.MeshId = "http://www.roblox.com/asset/?id=44410178" | |
| 2212 | hatmesh.TextureId = "http://www.roblox.com/asset/?id=44410320" | |
| 2213 | hatmesh.Scale = Vector3.new(.25, .25, .25) | |
| 2214 | local hatweld = Instance.new("Weld", hat)
| |
| 2215 | hatweld.Part0 = hat | |
| 2216 | hatweld.Part1 = la | |
| 2217 | hatweld.C0 = CFrame.new(-0.18, -0.05, .04) * CFrame.Angles(math.pi - math.rad(18), 0, math.pi/4) | |
| 2218 | end | |
| 2219 | end | |
| 2220 | ||
| 2221 | ||
| 2222 | ||
| 2223 | ||
| 2224 | if k == "q" then | |
| 2225 | if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 14 then return end | |
| 2226 | if sitting then return end | |
| 2227 | looking = true | |
| 2228 | rj.C0 = CFrame.new(-math.pi/6, 0,0) * CFrame.Angles(0, 0, math.pi/4) | |
| 2229 | end | |
| 2230 | if k == "e" then | |
| 2231 | if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 14 then return end | |
| 2232 | if sitting then return end | |
| 2233 | looking = true | |
| 2234 | rj.C0 = CFrame.new(math.pi/6, 0,0) * CFrame.Angles(0, 0, -math.pi/4) | |
| 2235 | end | |
| 2236 | if k == "t" then | |
| 2237 | if dancing then return end | |
| 2238 | if sitting then return end | |
| 2239 | dancing = true | |
| 2240 | aj:play() | |
| 2241 | end | |
| 2242 | if string.byte(k) == 48 or string.byte(k) == 47 then | |
| 2243 | if sitting then return end | |
| 2244 | humanoid.WalkSpeed = 18 | |
| 2245 | end | |
| 2246 | if string.byte(k) == 52 then | |
| 2247 | if sitting then return end | |
| 2248 | humanoid.WalkSpeed = 6 | |
| 2249 | end | |
| 2250 | end) | |
| 2251 | ||
| 2252 | mouse.KeyUp:connect(function(k) | |
| 2253 | if string.byte(k) == 48 or string.byte(k) == 47 then | |
| 2254 | if sitting then return end | |
| 2255 | humanoid.WalkSpeed = 11 | |
| 2256 | end | |
| 2257 | if k == "w" or k == "a" or k == "s" or k == "d" or string.byte(k) == 32 then | |
| 2258 | superannoying = false | |
| 2259 | barrelroll = false | |
| 2260 | heya = false | |
| 2261 | dubstepgun = false | |
| 2262 | youpirate = false | |
| 2263 | canttouch = false | |
| 2264 | gangnam = false | |
| 2265 | sheddy = false | |
| 2266 | durka = false | |
| 2267 | saxguy = false | |
| 2268 | foxie = false | |
| 2269 | burndem = false | |
| 2270 | bronymusic = false | |
| 2271 | aj:stop() | |
| 2272 | brony_music:stop() | |
| 2273 | fox_say:stop() | |
| 2274 | spitfire:stop() | |
| 2275 | heman:stop() | |
| 2276 | justin:stop() | |
| 2277 | jb = false | |
| 2278 | durk:stop() | |
| 2279 | restorecolors() | |
| 2280 | burn_dem:stop() | |
| 2281 | if hat then | |
| 2282 | hat:Destroy() | |
| 2283 | end | |
| 2284 | sax_guy:stop() | |
| 2285 | gangy_style:stop() | |
| 2286 | cant_touch:stop() | |
| 2287 | you_are_pirate:stop() | |
| 2288 | dubstep_gun:stop() | |
| 2289 | super_annoying:stop() | |
| 2290 | barrel_roll:stop() | |
| 2291 | dancing = false | |
| 2292 | global_wait = 0 | |
| 2293 | LightForTorso.Color = torso.BrickColor.Color | |
| 2294 | end | |
| 2295 | ||
| 2296 | ||
| 2297 | if k == "q" then | |
| 2298 | if looking then | |
| 2299 | if sitting then return end | |
| 2300 | rj.C0 = CFrame.new() | |
| 2301 | looking = false | |
| 2302 | end | |
| 2303 | end | |
| 2304 | ||
| 2305 | if k == "e" then | |
| 2306 | if looking then | |
| 2307 | if sitting then return end | |
| 2308 | rj.C0 = CFrame.new() | |
| 2309 | looking = false | |
| 2310 | end | |
| 2311 | end | |
| 2312 | end) | |
| 2313 | ||
| 2314 | ||
| 2315 | game:service'RunService'.Stepped:connect(function() | |
| 2316 | count = (count % 100) + countspeed | |
| 2317 | angle = math.pi * math.sin(math.pi*2/100*count) | |
| 2318 | ||
| 2319 | if slidecount < slidecountmax then | |
| 2320 | slidecount = slidecount + speed | |
| 2321 | end | |
| 2322 | if slidecount > slidecountmax then | |
| 2323 | slidecount = slidecount - speed | |
| 2324 | end | |
| 2325 | if global_wait == 380 then global_wait = 0 end | |
| 2326 | ||
| 2327 | sine = sine + sinespeed | |
| 2328 | if not dancing then | |
| 2329 | if not sitting then | |
| 2330 | local ray = Ray.new(rootpart.Position, Vector3.new(0, -1, 0)) | |
| 2331 | local hitz, enz = workspace:FindPartOnRay(ray, char) | |
| 2332 | if not hitz then | |
| 2333 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles((math.pi/8/5*slidecount) + math.pi + angle*0.05, 0, 0) | |
| 2334 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles((math.pi/8/5*slidecount) + math.pi + -angle*0.05, 0, 0) | |
| 2335 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(-angle*0.28, 0, 0) | |
| 2336 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(angle*0.28, 0, 0) | |
| 2337 | if not looking then | |
| 2338 | rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/8/5*slidecount, 0, 0) | |
| 2339 | end | |
| 2340 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.pi/8/5*slidecount, 0, 0) | |
| 2341 | elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then | |
| 2342 | ||
| 2343 | -- idle anim | |
| 2344 | ||
| 2345 | anim = "Idle" | |
| 2346 | if anim ~= lastanim then | |
| 2347 | if lastanim == "Walking" then | |
| 2348 | speed = 0.5 | |
| 2349 | slidecount = 1 | |
| 2350 | slidecountmax = 0 | |
| 2351 | elseif lastanim == "Running" then | |
| 2352 | speed = 2.5 | |
| 2353 | slidecount = 5 | |
| 2354 | slidecountmax = 0 | |
| 2355 | else | |
| 2356 | slidecount = 0 | |
| 2357 | slidecountmax = 0 | |
| 2358 | end | |
| 2359 | end | |
| 2360 | countspeed = 1 | |
| 2361 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(angle*0.02, 0, 0) | |
| 2362 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(-angle*0.02, 0, 0) | |
| 2363 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(-angle*0.01, 0, 0) | |
| 2364 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(angle*0.01, 0, 0) | |
| 2365 | if not looking then | |
| 2366 | rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(-math.pi/8/5*slidecount, 0, 0) | |
| 2367 | end | |
| 2368 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.pi/8/5*slidecount, 0, 0) | |
| 2369 | elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 14 then | |
| 2370 | looking = false | |
| 2371 | -- walk anim | |
| 2372 | anim = "Walking" | |
| 2373 | if anim ~= lastanim then | |
| 2374 | speed = 0.2 | |
| 2375 | slidecount = 0 | |
| 2376 | slidecountmax = 1 | |
| 2377 | if lastanim == "Running" then | |
| 2378 | slidecount = 5 | |
| 2379 | end | |
| 2380 | end | |
| 2381 | countspeed = 6 | |
| 2382 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(angle*0.3, 0, math.abs(angle*0.02)) | |
| 2383 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(-angle*0.3, 0, -math.abs(angle*0.02)) | |
| 2384 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(-angle*0.28, 0, -math.abs(angle*0.01)) | |
| 2385 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(angle*0.28, 0, math.abs(angle*0.01)) | |
| 2386 | rj.C0 = CFrame.new(0, math.abs(-angle*0.035), 0) * CFrame.Angles(-math.pi/8/5*slidecount, 0, 0) | |
| 2387 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.pi/8/5*slidecount, 0, 0) | |
| 2388 | elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 14 then | |
| 2389 | --run anim | |
| 2390 | anim = "Running" | |
| 2391 | if anim ~= lastanim then | |
| 2392 | speed = 1 | |
| 2393 | slidecount = 0 | |
| 2394 | slidecountmax = 5 | |
| 2395 | if lastanim == "Walking" then | |
| 2396 | slidecount = 1 | |
| 2397 | end | |
| 2398 | end | |
| 2399 | ||
| 2400 | looking = false | |
| 2401 | countspeed = 9 | |
| 2402 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(angle*0.4, 0, math.abs(angle*0.07)) | |
| 2403 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(-angle*0.4, 0, -math.abs(angle*0.07)) | |
| 2404 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(-angle*0.38, 0, -math.abs(angle*0.03)) | |
| 2405 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(angle*0.38, 0, math.abs(angle*0.03)) | |
| 2406 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.pi/8/5*slidecount, 0, 0) | |
| 2407 | rj.C0 = CFrame.new(0, math.abs(-angle*.055), 0) * CFrame.Angles(-math.pi/8/5*slidecount, math.sin(angle*0.05), 0) | |
| 2408 | end | |
| 2409 | ||
| 2410 | lastanim = anim | |
| 2411 | else | |
| 2412 | countspeed = 1 | |
| 2413 | local ray = Ray.new(rootpart.Position, Vector3.new(0, -2, 0)) | |
| 2414 | local hitz, enz = workspace:FindPartOnRay(ray, char) | |
| 2415 | if not hitz then | |
| 2416 | rj.C0 = CFrame.new(0, -0.5, 0) * CFrame.Angles(-math.pi/2, 0, 0) | |
| 2417 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(math.rad(30), 0, -math.pi/16) | |
| 2418 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(math.rad(30), 0, math.pi/16) | |
| 2419 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(-math.pi-math.rad(30), 0, -math.pi/10) | |
| 2420 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(-math.pi-math.rad(30), 0, math.pi/10) | |
| 2421 | else | |
| 2422 | rj.C0 = CFrame.new(0, -0.35, 0) * CFrame.Angles(math.rad(10), 0, 0) | |
| 2423 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(math.pi/2-math.rad(10), 0, -math.pi/16) | |
| 2424 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(math.pi/2-math.rad(10), 0, math.pi/16) | |
| 2425 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(-math.rad(10), 0, -math.pi/10) | |
| 2426 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(-math.rad(10), 0, math.pi/10) | |
| 2427 | end | |
| 2428 | ||
| 2429 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(angle*0.055, 0, 0) | |
| 2430 | end | |
| 2431 | else | |
| 2432 | if superannoying then | |
| 2433 | countspeed = 5 | |
| 2434 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi/2 + angle*0.2, 0, math.abs(angle*0.07)) | |
| 2435 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi/2 + angle*0.2, 0, -math.abs(angle*0.07)) | |
| 2436 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(angle*0.1, 0, -math.abs(angle*0.03)) | |
| 2437 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-angle*0.1, 0, math.abs(angle*0.03)) | |
| 2438 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2439 | rj.C0 = CFrame.new(0, math.abs(-angle*.035), 0) * CFrame.Angles(0, math.sin(angle*0.15), 0) | |
| 2440 | elseif barrelroll then | |
| 2441 | countspeed = 5 | |
| 2442 | sinespeed = 0.1 | |
| 2443 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi + angle*0.2, 0, math.abs(angle*0.07)) | |
| 2444 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi + angle*0.2, 0, -math.abs(angle*0.07)) | |
| 2445 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(0, 0, -math.abs(angle*0.03)) | |
| 2446 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(0, 0, math.abs(angle*0.03)) | |
| 2447 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2448 | rj.C0 = CFrame.new(math.sin(sine)*2.5, 0, 0) * CFrame.Angles(-math.pi/2, math.sin(sine)*4.5, 0) | |
| 2449 | elseif dubstepgun then | |
| 2450 | global_wait = (global_wait % 380) + 1 | |
| 2451 | countspeed = 5 | |
| 2452 | if global_wait < 249 - 40 then | |
| 2453 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi/2 + angle*0.2, 0, -math.abs(angle*0.27)) | |
| 2454 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi/2 + angle*0.2, 0, math.abs(angle*0.27)) | |
| 2455 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(angle*0.1, 0, -math.abs(angle*0.03)) | |
| 2456 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-angle*0.1, 0, math.abs(angle*0.03)) | |
| 2457 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2458 | rj.C0 = CFrame.new(0, math.abs(-angle*.035), 0) * CFrame.Angles(0, math.sin(angle*0.15), 0) | |
| 2459 | elseif global_wait > 249 - 40 then | |
| 2460 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi/2 + angle*0.4, 0, math.abs(angle*0.11)) | |
| 2461 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi + angle*0.2, 0, -math.abs(angle*0.11)) | |
| 2462 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(angle*0.1, 0, -math.abs(angle*0.09)) | |
| 2463 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-angle*0.1, 0, math.abs(angle*0.09)) | |
| 2464 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2465 | rj.C0 = CFrame.new(0, math.abs(-angle*.075), 0) * CFrame.Angles(0, math.pi/3 + math.sin(angle*0.15), 0) | |
| 2466 | end | |
| 2467 | elseif youpirate then | |
| 2468 | global_wait = (global_wait % 380) + 1 | |
| 2469 | countspeed = 5 | |
| 2470 | if global_wait < 79 then | |
| 2471 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi/2 + angle*0.1, 0, -math.abs(angle*0.07)) | |
| 2472 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(angle*0.2, 0, math.abs(angle*0.07)) | |
| 2473 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(angle*0.1, 0, -math.abs(angle*0.03)) | |
| 2474 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-angle*0.1, 0, math.abs(angle*0.03)) | |
| 2475 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2476 | rj.C0 = CFrame.new(0, math.abs(-angle*.02), 0) * CFrame.Angles(0, math.sin(angle*0.15), 0) | |
| 2477 | elseif global_wait < 299 then | |
| 2478 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi + angle*0.2, 0, math.abs(angle*0.11)) | |
| 2479 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi + angle*0.2, 0, -math.abs(angle*0.11)) | |
| 2480 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(angle*0.2, 0, -math.abs(angle*0.1)) | |
| 2481 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-angle*0.2, 0, math.abs(angle*0.1)) | |
| 2482 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), math.sin(angle*0.19), 0) | |
| 2483 | rj.C0 = CFrame.new(0, math.abs(-angle*.055+0.2), 0) * CFrame.Angles(0, math.sin(angle*0.15), 0) | |
| 2484 | elseif global_wait > 299 then | |
| 2485 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi/2 + angle*0.1, 0, -math.abs(angle*0.07)) | |
| 2486 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(angle*0.2, 0, math.abs(angle*0.07)) | |
| 2487 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(angle*0.1, 0, -math.abs(angle*0.03)) | |
| 2488 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-angle*0.1, 0, math.abs(angle*0.03)) | |
| 2489 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2490 | rj.C0 = CFrame.new(0, math.abs(-angle*.02), 0) * CFrame.Angles(0, math.sin(angle*0.15), 0) | |
| 2491 | end | |
| 2492 | elseif canttouch then | |
| 2493 | countspeed = 5 | |
| 2494 | global_wait = (global_wait % 160) + 1 | |
| 2495 | if global_wait == 160 then global_wait = 0 end | |
| 2496 | if global_wait < 39 then | |
| 2497 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi/2 + angle*0.2, 0, -math.abs(angle*0.07)) | |
| 2498 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi/2 + angle*0.2, 0, math.abs(angle*0.07)) | |
| 2499 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(angle*0.1, 0, -math.abs(angle*0.03)) | |
| 2500 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-angle*0.1, 0, math.abs(angle*0.03)) | |
| 2501 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2502 | rj.C0 = CFrame.new(0, math.abs(-angle*.03), 0) * CFrame.Angles(0, -math.pi/6, 0) | |
| 2503 | elseif global_wait < 79 then | |
| 2504 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi/2 + angle*0.2, 0, -math.abs(angle*0.07)) | |
| 2505 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi/2 + angle*0.2, 0, math.abs(angle*0.07)) | |
| 2506 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(angle*0.1, 0, -math.abs(angle*0.03)) | |
| 2507 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-angle*0.1, 0, math.abs(angle*0.03)) | |
| 2508 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2509 | rj.C0 = CFrame.new(0, math.abs(-angle*.03), 0) * CFrame.Angles(0, math.pi/6, 0) | |
| 2510 | elseif global_wait < 119 then | |
| 2511 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(0.01, 0, 0.17) | |
| 2512 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(0.01, 0, -0.17) | |
| 2513 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(0, -math.abs(angle*0.05), -math.abs(angle*0.06)) | |
| 2514 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(0, -math.abs(angle*0.05), math.abs(angle*0.06)) | |
| 2515 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2516 | rj.C0 = CFrame.new(0, math.abs(-angle*.02), 0) * CFrame.Angles(0, 0, 0) | |
| 2517 | torso.CFrame = torso.CFrame * CFrame.new(0.05, 0, 0) | |
| 2518 | elseif global_wait > 119 then | |
| 2519 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(0.01, 0, 0.17) | |
| 2520 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(0.01, 0, -0.17) | |
| 2521 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(0, -math.abs(angle*0.05), -math.abs(angle*0.06)) | |
| 2522 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(0, -math.abs(angle*0.05), math.abs(angle*0.06)) | |
| 2523 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2524 | rj.C0 = CFrame.new(0, math.abs(-angle*.02), 0) * CFrame.Angles(0, 0, 0) | |
| 2525 | torso.CFrame = torso.CFrame * CFrame.new(-0.05, 0, 0) | |
| 2526 | end | |
| 2527 | elseif gangnam then | |
| 2528 | countspeed = 5 | |
| 2529 | if global_wait == 180 then global_wait = 0 end | |
| 2530 | global_wait = (global_wait % 180) + 1 | |
| 2531 | if global_wait < 89 then | |
| 2532 | ls.C0 = CFrame.new(-.2,.1,-.1) * CFrame.Angles(math.pi/2.5 + math.abs(angle*0.2), 0, math.pi/3 + math.abs(angle*0.05)) | |
| 2533 | rs.C0 = CFrame.new(.2,.1,-.1) * CFrame.Angles(math.pi/2.5 + math.abs(angle*0.2), 0, -math.pi/3 + -math.abs(angle*0.05)) | |
| 2534 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, -math.abs(angle*0.03)) | |
| 2535 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-math.abs(angle*0.1), 0, math.abs(angle*0.03)) | |
| 2536 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2537 | rj.C0 = CFrame.new(0, math.abs(-angle*.035), 0) * CFrame.Angles(0, math.sin(angle*0.05), 0) | |
| 2538 | elseif global_wait > 89 then | |
| 2539 | ls.C0 = CFrame.new(-.2,.1,-.1) * CFrame.Angles(math.pi/2.5 + math.abs(angle*0.2), 0, math.pi/3 + math.abs(angle*0.05)) | |
| 2540 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi + math.sin(angle*0.1), 0, -math.sin(angle*0.1)) | |
| 2541 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, -math.abs(angle*0.03)) | |
| 2542 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-math.abs(angle*0.1), 0, math.abs(angle*0.03)) | |
| 2543 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2544 | rj.C0 = CFrame.new(0, math.abs(-angle*.035), 0) * CFrame.Angles(0, math.sin(angle*0.05), 0) | |
| 2545 | end | |
| 2546 | elseif foxie then | |
| 2547 | countspeed = 5 | |
| 2548 | global_wait = (global_wait % 380) + 2 | |
| 2549 | if global_wait < 89 then | |
| 2550 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi + math.abs(angle*0.1), 0, -math.abs(angle*0.2)) | |
| 2551 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi + math.abs(angle*0.1), 0, math.abs(angle*0.2)) | |
| 2552 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, -math.abs(angle*0.03)) | |
| 2553 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-math.abs(angle*0.1), 0, math.abs(angle*0.03)) | |
| 2554 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2555 | rj.C0 = CFrame.new(0, math.abs(-angle*.035), 0) * CFrame.Angles(0, math.rad(global_wait*4), 0) | |
| 2556 | elseif global_wait > 89 then | |
| 2557 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi/2 + math.abs(angle*0.2), 0, math.abs(angle*0.05)) | |
| 2558 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi/2 + math.abs(angle*0.2), 0, -math.abs(angle*0.05)) | |
| 2559 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, -math.abs(angle*0.03)) | |
| 2560 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-math.abs(angle*0.1), 0, math.abs(angle*0.03)) | |
| 2561 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, math.sin(angle*0.1)) | |
| 2562 | rj.C0 = CFrame.new(0, math.abs(-angle*.035), 0) * CFrame.Angles(0, math.sin(angle*0.05), 0) | |
| 2563 | end | |
| 2564 | elseif durka then | |
| 2565 | countspeed = 2 | |
| 2566 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi/2 + math.abs(angle*0.2), 0, math.abs(angle*0.07)) | |
| 2567 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(angle*0.1, 0, -math.abs(angle*0.07)) | |
| 2568 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(angle*0.05, 0, -math.abs(angle*0.03)) | |
| 2569 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-angle*0.05, 0, math.abs(angle*0.03)) | |
| 2570 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2571 | rj.C0 = CFrame.new(0, math.abs(-angle*.035), 0) * CFrame.Angles(0, math.sin(angle*0.05), 0) | |
| 2572 | elseif saxguy then | |
| 2573 | countspeed = 5 | |
| 2574 | ls.C0 = CFrame.new(-.25,.1,-.1) * CFrame.Angles(math.pi/2.5, 0, math.pi/4) | |
| 2575 | rs.C0 = CFrame.new(.25,.1,-.1) * CFrame.Angles(math.rad(60), 0, -math.pi/4) | |
| 2576 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(-math.abs(angle*0.1), 0, -0.06) | |
| 2577 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-math.abs(angle*0.1), 0, 0.06) | |
| 2578 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(0, 0, 0) | |
| 2579 | rj.C0 = CFrame.new(0, -math.abs(angle*0.01), math.abs(angle*0.01)) * CFrame.Angles(math.abs(angle*0.1), 0, 0) | |
| 2580 | elseif heya then | |
| 2581 | countspeed = 5 | |
| 2582 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi + -angle*0.2, -angle*0.1, 0) | |
| 2583 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi + angle*0.2, angle*0.1, 0) | |
| 2584 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(angle*0.05, angle*0.1, -0.06) | |
| 2585 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-angle*0.05, -angle*0.1, 0.06) | |
| 2586 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(0.2), 0, 0) | |
| 2587 | rj.C0 = CFrame.new(0, math.abs(angle*0.05), 0) * CFrame.Angles(0, math.sin(angle*0.07), 0) | |
| 2588 | elseif jb then | |
| 2589 | countspeed = 5 | |
| 2590 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi/2 + -angle*0.2, -angle*0.1, 0) | |
| 2591 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi/2 + angle*0.2, angle*0.1, 0) | |
| 2592 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(angle*0.05, angle*0.1, -0.06) | |
| 2593 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-angle*0.05, -angle*0.1, 0.06) | |
| 2594 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(0.2), 0, 0) | |
| 2595 | rj.C0 = CFrame.new(0, math.abs(angle*0.05), 0) * CFrame.Angles(0, math.abs(angle*0.1), 0) | |
| 2596 | elseif bronymusic then | |
| 2597 | countspeed = 5 | |
| 2598 | ls.C0 = CFrame.new(-.1,.1,-.15) * CFrame.Angles(math.pi/2 + -angle*0.1, -angle*0.1, 0) | |
| 2599 | rs.C0 = CFrame.new(.1,.1,-.15) * CFrame.Angles(math.pi/2 + angle*0.1, angle*0.1, 0) | |
| 2600 | lh.C0 = CFrame.new(-.1,-.25,0) * CFrame.Angles(math.pi/2 + angle*0.1, 0, 0) | |
| 2601 | rh.C0 = CFrame.new(.1,-.25,0) * CFrame.Angles(math.pi/2 + -angle*0.1, 0, 0) | |
| 2602 | neck.C0 = CFrame.new(0,.25,0) * CFrame.Angles(math.pi/2 + math.abs(angle*0.25), 0, 0) | |
| 2603 | rj.C0 = CFrame.new(0, -0.2 + math.abs(angle*0.05), 0) * CFrame.Angles(-math.rad(85), 0, 0) | |
| 2604 | elseif sheddy then | |
| 2605 | countspeed = 7 | |
| 2606 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi/4 + -angle*0.4, -angle*0.1, 0) | |
| 2607 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi/4 + angle*0.4, angle*0.1, 0) | |
| 2608 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(angle*0.05, angle*0.1, -0.06) | |
| 2609 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-angle*0.05, -angle*0.1, 0.06) | |
| 2610 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(0.2), 0, 0) | |
| 2611 | rj.C0 = CFrame.new(0, math.abs(angle*0.05), 0) * CFrame.Angles(0, math.abs(angle*0.1), 0) | |
| 2612 | elseif burndem then | |
| 2613 | countspeed = 4 | |
| 2614 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi/4 + -angle*0.4, -angle*0.1, 0) | |
| 2615 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi/4 + angle*0.4, angle*0.1, 0) | |
| 2616 | lh.C0 = CFrame.new(-.1,-.2,0) * CFrame.Angles(angle*0.05, angle*0.1, -0.06) | |
| 2617 | rh.C0 = CFrame.new(.1,-.2,0) * CFrame.Angles(-angle*0.05, -angle*0.1, 0.06) | |
| 2618 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(0.2), 0, 0) | |
| 2619 | rj.C0 = CFrame.new(0, math.abs(angle*0.05), 0) * CFrame.Angles(0, math.abs(angle*0.1), 0) | |
| 2620 | elseif aj.IsPlaying then | |
| 2621 | countspeed = 5 | |
| 2622 | ls.C0 = CFrame.new(-.3,.1,0) * CFrame.Angles(math.pi/4 + -(angle)*0.4, -angle*0.1, 0) | |
| 2623 | rs.C0 = CFrame.new(.3,.1,0) * CFrame.Angles(math.pi/4 + (angle)*0.4, -angle*0.1, 0) | |
| 2624 | lh.C0 = CFrame.new(-.1,-.2 - math.cos(count*.025)*.02,0) * CFrame.Angles(angle*0.05, 0, -0.06) | |
| 2625 | rh.C0 = CFrame.new(.1,-.2+math.cos(count*.025)*.02,0) * CFrame.Angles(-angle*0.05, 0, 0.06) | |
| 2626 | neck.C0 = CFrame.new(0,.2,0) * CFrame.Angles(math.abs(0.2), 0, 0) | |
| 2627 | rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.cos(angle*0.1), 0) | |
| 2628 | end | |
| 2629 | end | |
| 2630 | end) | |
| 2631 | ||
| 2632 | ||
| 2633 | plr.Chatted:connect(function(msg) | |
| 2634 | game:service'Chat':Chat(head, msg, 1) | |
| 2635 | if msg == "die/" then | |
| 2636 | char:breakJoints() | |
| 2637 | end | |
| 2638 | end) | |
| 2639 | ||
| 2640 | end) | |
| 2641 | if not ran and err then | |
| 2642 | print(err) | |
| 2643 | end |