Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Created by PenguinAnonymous (ttyyuu12345) Editied by Dittoide
- --What's Added To M2S with Dittoide's Edit?
- --/ Better dummy script function to improve compatibility (makes it like you are running the code inside the script.)
- --/ Removed Gui In Bottom-Left for when you are making guis.
- --/ Removed "Inserting Map Please Wait" gui when selected Workspace as Place to export.
- --Credit: PenguinAnonymous for making original script, i just wanted to iron it out to my liking.
- --Errors: Camera,Terrain,Attachment,Status,Animator,Accessory
- local runDummyScript = function(f,scri)
- if (not scri:IsA('Script')) or (not scri:IsA('LocalScript')) then return false; end;
- local Dummy_CoRoutine = coroutine.create(function()
- getfenv().script = scri
- ypcall(function() f() end)
- end)
- table.insert(cors,Dummy_CoRoutine);
- coroutine.resume(Dummy_CoRoutine);
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "M2S_Model"
- o3 = Instance.new("Model")
- o4 = Instance.new("Script")
- o5 = Instance.new("Model")
- o6 = Instance.new("Part")
- o7 = Instance.new("SpecialMesh")
- o12 = Instance.new("Sound")
- o13 = Instance.new("RemoteEvent")
- o14 = Instance.new("Sound")
- o15 = Instance.new("RemoteEvent")
- o16 = Instance.new("Sound")
- o17 = Instance.new("RemoteEvent")
- o18 = Instance.new("Sound")
- o19 = Instance.new("RemoteEvent")
- o20 = Instance.new("Sound")
- o21 = Instance.new("RemoteEvent")
- o22 = Instance.new("Sound")
- o23 = Instance.new("RemoteEvent")
- o24 = Instance.new("Sound")
- o25 = Instance.new("RemoteEvent")
- o26 = Instance.new("Sound")
- o27 = Instance.new("RemoteEvent")
- o28 = Instance.new("Sound")
- o29 = Instance.new("RemoteEvent")
- o30 = Instance.new("Decal")
- o31 = Instance.new("Part")
- o32 = Instance.new("Decal")
- o41 = Instance.new("Motor6D")
- o42 = Instance.new("Motor6D")
- o43 = Instance.new("Motor6D")
- o44 = Instance.new("Motor6D")
- o45 = Instance.new("Motor6D")
- o46 = Instance.new("Part")
- o49 = Instance.new("Part")
- o52 = Instance.new("Part")
- o54 = Instance.new("Part")
- o56 = Instance.new("Humanoid")
- o59 = Instance.new("Part")
- o61 = Instance.new("Motor6D")
- o62 = Instance.new("Script")
- o63 = Instance.new("LocalScript")
- o64 = Instance.new("Script")
- o65 = Instance.new("LocalScript")
- o66 = Instance.new("StringValue")
- o67 = Instance.new("Animation")
- o68 = Instance.new("NumberValue")
- o69 = Instance.new("Animation")
- o70 = Instance.new("NumberValue")
- o71 = Instance.new("StringValue")
- o72 = Instance.new("Animation")
- o73 = Instance.new("StringValue")
- o74 = Instance.new("Animation")
- o75 = Instance.new("StringValue")
- o76 = Instance.new("Animation")
- o77 = Instance.new("StringValue")
- o78 = Instance.new("Animation")
- o79 = Instance.new("StringValue")
- o80 = Instance.new("Animation")
- o81 = Instance.new("StringValue")
- o82 = Instance.new("Animation")
- o83 = Instance.new("StringValue")
- o84 = Instance.new("Animation")
- o85 = Instance.new("NumberValue")
- o86 = Instance.new("BodyColors")
- o87 = Instance.new("Pants")
- o89 = Instance.new("Part")
- o90 = Instance.new("SpecialMesh")
- o92 = Instance.new("Vector3Value")
- o93 = Instance.new("Weld")
- o94 = Instance.new("Shirt")
- o95 = Instance.new("Model")
- o96 = Instance.new("Script")
- o97 = Instance.new("Model")
- o98 = Instance.new("Part")
- o99 = Instance.new("Script")
- o100 = Instance.new("Model")
- o101 = Instance.new("Part")
- o102 = Instance.new("Part")
- o103 = Instance.new("CylinderMesh")
- o104 = Instance.new("Part")
- o105 = Instance.new("Decal")
- o106 = Instance.new("Part")
- o107 = Instance.new("CylinderMesh")
- o108 = Instance.new("Model")
- o109 = Instance.new("Model")
- o110 = Instance.new("Part")
- o111 = Instance.new("ClickDetector")
- o112 = Instance.new("Script")
- o113 = Instance.new("Script")
- o114 = Instance.new("Sound")
- o115 = Instance.new("Sound")
- o116 = Instance.new("IntValue")
- o117 = Instance.new("Model")
- o118 = Instance.new("Part")
- o119 = Instance.new("Part")
- o120 = Instance.new("Part")
- o121 = Instance.new("Part")
- o122 = Instance.new("Part")
- o123 = Instance.new("Part")
- o124 = Instance.new("Model")
- o125 = Instance.new("Model")
- o126 = Instance.new("Part")
- o127 = Instance.new("ClickDetector")
- o128 = Instance.new("Script")
- o129 = Instance.new("Script")
- o130 = Instance.new("Sound")
- o131 = Instance.new("Sound")
- o132 = Instance.new("IntValue")
- o133 = Instance.new("Model")
- o134 = Instance.new("Part")
- o135 = Instance.new("Part")
- o136 = Instance.new("Part")
- o137 = Instance.new("Part")
- o138 = Instance.new("Part")
- o139 = Instance.new("Part")
- o140 = Instance.new("WedgePart")
- o141 = Instance.new("Part")
- o142 = Instance.new("Part")
- o143 = Instance.new("Part")
- o144 = Instance.new("Part")
- o145 = Instance.new("Part")
- o146 = Instance.new("Part")
- o147 = Instance.new("Part")
- o148 = Instance.new("Part")
- o149 = Instance.new("Part")
- o150 = Instance.new("TrussPart")
- o151 = Instance.new("Part")
- o152 = Instance.new("TrussPart")
- o153 = Instance.new("Part")
- o154 = Instance.new("Part")
- o155 = Instance.new("WedgePart")
- o156 = Instance.new("Part")
- o157 = Instance.new("WedgePart")
- o158 = Instance.new("Part")
- o159 = Instance.new("WedgePart")
- o160 = Instance.new("WedgePart")
- o161 = Instance.new("WedgePart")
- o162 = Instance.new("Part")
- o163 = Instance.new("Part")
- o164 = Instance.new("WedgePart")
- o165 = Instance.new("WedgePart")
- o166 = Instance.new("Part")
- o167 = Instance.new("WedgePart")
- o168 = Instance.new("Part")
- o169 = Instance.new("WedgePart")
- o170 = Instance.new("WedgePart")
- o171 = Instance.new("Part")
- o172 = Instance.new("Part")
- o173 = Instance.new("WedgePart")
- o174 = Instance.new("WedgePart")
- o175 = Instance.new("WedgePart")
- o176 = Instance.new("TrussPart")
- o177 = Instance.new("Part")
- o178 = Instance.new("TrussPart")
- o179 = Instance.new("WedgePart")
- o180 = Instance.new("Part")
- o181 = Instance.new("Part")
- o182 = Instance.new("WedgePart")
- o183 = Instance.new("WedgePart")
- o184 = Instance.new("Part")
- o185 = Instance.new("Part")
- o186 = Instance.new("Decal")
- o187 = Instance.new("Part")
- o188 = Instance.new("CylinderMesh")
- o189 = Instance.new("Part")
- o190 = Instance.new("WedgePart")
- o191 = Instance.new("WedgePart")
- o192 = Instance.new("WedgePart")
- o193 = Instance.new("WedgePart")
- o194 = Instance.new("Part")
- o195 = Instance.new("CylinderMesh")
- o196 = Instance.new("Part")
- o197 = Instance.new("CylinderMesh")
- o198 = Instance.new("Part")
- o199 = Instance.new("CylinderMesh")
- o200 = Instance.new("Part")
- o201 = Instance.new("CylinderMesh")
- o202 = Instance.new("Part")
- o203 = Instance.new("CylinderMesh")
- o204 = Instance.new("Part")
- o205 = Instance.new("Part")
- o206 = Instance.new("CylinderMesh")
- o207 = Instance.new("Part")
- o208 = Instance.new("CylinderMesh")
- o209 = Instance.new("Part")
- o210 = Instance.new("Part")
- o211 = Instance.new("CylinderMesh")
- o212 = Instance.new("Part")
- o213 = Instance.new("CylinderMesh")
- o214 = Instance.new("Part")
- o215 = Instance.new("Part")
- o216 = Instance.new("CylinderMesh")
- o217 = Instance.new("Part")
- o218 = Instance.new("CylinderMesh")
- o219 = Instance.new("Part")
- o220 = Instance.new("CylinderMesh")
- o221 = Instance.new("Part")
- o222 = Instance.new("CylinderMesh")
- o223 = Instance.new("Part")
- o224 = Instance.new("CylinderMesh")
- o225 = Instance.new("Part")
- o226 = Instance.new("CylinderMesh")
- o227 = Instance.new("Part")
- o228 = Instance.new("CylinderMesh")
- o229 = Instance.new("Part")
- o230 = Instance.new("CylinderMesh")
- o231 = Instance.new("Part")
- o232 = Instance.new("CylinderMesh")
- o233 = Instance.new("Part")
- o234 = Instance.new("CylinderMesh")
- o235 = Instance.new("Part")
- o236 = Instance.new("CylinderMesh")
- o237 = Instance.new("Part")
- o238 = Instance.new("CylinderMesh")
- o239 = Instance.new("Part")
- o240 = Instance.new("CylinderMesh")
- o241 = Instance.new("Part")
- o242 = Instance.new("CylinderMesh")
- o243 = Instance.new("Part")
- o244 = Instance.new("CylinderMesh")
- o245 = Instance.new("WedgePart")
- o246 = Instance.new("Part")
- o247 = Instance.new("WedgePart")
- o248 = Instance.new("Part")
- o249 = Instance.new("Part")
- o250 = Instance.new("Part")
- o251 = Instance.new("CylinderMesh")
- o252 = Instance.new("Part")
- o253 = Instance.new("WedgePart")
- o254 = Instance.new("WedgePart")
- o255 = Instance.new("Part")
- o256 = Instance.new("WedgePart")
- o257 = Instance.new("Part")
- o258 = Instance.new("Part")
- o259 = Instance.new("Part")
- o260 = Instance.new("WedgePart")
- o261 = Instance.new("VehicleSeat")
- o262 = Instance.new("WedgePart")
- o263 = Instance.new("Part")
- o264 = Instance.new("Part")
- o265 = Instance.new("Decal")
- o266 = Instance.new("Part")
- o267 = Instance.new("WedgePart")
- o268 = Instance.new("WedgePart")
- o269 = Instance.new("Part")
- o270 = Instance.new("WedgePart")
- o271 = Instance.new("Part")
- o272 = Instance.new("CylinderMesh")
- o273 = Instance.new("Part")
- o274 = Instance.new("CylinderMesh")
- o275 = Instance.new("Part")
- o276 = Instance.new("CylinderMesh")
- o277 = Instance.new("Part")
- o278 = Instance.new("CylinderMesh")
- o279 = Instance.new("Part")
- o280 = Instance.new("CylinderMesh")
- o281 = Instance.new("Model")
- o282 = Instance.new("Model")
- o283 = Instance.new("Part")
- o284 = Instance.new("Sound")
- o285 = Instance.new("SpecialMesh")
- o286 = Instance.new("Decal")
- o287 = Instance.new("Model")
- o288 = Instance.new("Part")
- o289 = Instance.new("Script")
- o290 = Instance.new("Script")
- o291 = Instance.new("Sound")
- o292 = Instance.new("ClickDetector")
- o293 = Instance.new("IntValue")
- o294 = Instance.new("Part")
- o295 = Instance.new("CylinderMesh")
- o296 = Instance.new("Part")
- o297 = Instance.new("CylinderMesh")
- o298 = Instance.new("Part")
- o299 = Instance.new("Part")
- o300 = Instance.new("WedgePart")
- o301 = Instance.new("Part")
- o302 = Instance.new("CylinderMesh")
- o303 = Instance.new("Part")
- o304 = Instance.new("Part")
- o305 = Instance.new("CylinderMesh")
- o306 = Instance.new("Part")
- o307 = Instance.new("CylinderMesh")
- o308 = Instance.new("Part")
- o309 = Instance.new("CylinderMesh")
- o310 = Instance.new("Part")
- o311 = Instance.new("CylinderMesh")
- o312 = Instance.new("Part")
- o313 = Instance.new("CylinderMesh")
- o314 = Instance.new("Part")
- o315 = Instance.new("CylinderMesh")
- o316 = Instance.new("Part")
- o317 = Instance.new("CylinderMesh")
- o318 = Instance.new("Part")
- o319 = Instance.new("CylinderMesh")
- o320 = Instance.new("Part")
- o321 = Instance.new("CylinderMesh")
- o322 = Instance.new("Part")
- o323 = Instance.new("CylinderMesh")
- o324 = Instance.new("Part")
- o325 = Instance.new("CylinderMesh")
- o326 = Instance.new("Part")
- o327 = Instance.new("CylinderMesh")
- o328 = Instance.new("Part")
- o329 = Instance.new("CylinderMesh")
- o330 = Instance.new("Part")
- o331 = Instance.new("CylinderMesh")
- o332 = Instance.new("Part")
- o333 = Instance.new("CylinderMesh")
- o334 = Instance.new("Part")
- o335 = Instance.new("CylinderMesh")
- o336 = Instance.new("Part")
- o337 = Instance.new("CylinderMesh")
- o338 = Instance.new("Part")
- o339 = Instance.new("CylinderMesh")
- o340 = Instance.new("Part")
- o341 = Instance.new("CylinderMesh")
- o342 = Instance.new("Part")
- o343 = Instance.new("Part")
- o344 = Instance.new("CylinderMesh")
- o345 = Instance.new("Part")
- o346 = Instance.new("Part")
- o347 = Instance.new("CylinderMesh")
- o348 = Instance.new("Part")
- o349 = Instance.new("CylinderMesh")
- o350 = Instance.new("Part")
- o351 = Instance.new("CylinderMesh")
- o352 = Instance.new("Part")
- o353 = Instance.new("CylinderMesh")
- o354 = Instance.new("Part")
- o355 = Instance.new("CylinderMesh")
- o356 = Instance.new("Part")
- o357 = Instance.new("CylinderMesh")
- o358 = Instance.new("Part")
- o359 = Instance.new("CylinderMesh")
- o360 = Instance.new("Part")
- o361 = Instance.new("Part")
- o362 = Instance.new("CylinderMesh")
- o363 = Instance.new("Part")
- o364 = Instance.new("Model")
- o365 = Instance.new("Model")
- o366 = Instance.new("Part")
- o367 = Instance.new("Sound")
- o368 = Instance.new("SpecialMesh")
- o369 = Instance.new("Decal")
- o370 = Instance.new("Model")
- o371 = Instance.new("Part")
- o372 = Instance.new("Script")
- o373 = Instance.new("Script")
- o374 = Instance.new("Sound")
- o375 = Instance.new("ClickDetector")
- o376 = Instance.new("IntValue")
- o377 = Instance.new("Part")
- o378 = Instance.new("SpecialMesh")
- o379 = Instance.new("Part")
- o380 = Instance.new("SpecialMesh")
- o381 = Instance.new("Model")
- o382 = Instance.new("Script")
- o383 = Instance.new("Script")
- o384 = Instance.new("Model")
- o385 = Instance.new("Part")
- o386 = Instance.new("Part")
- o387 = Instance.new("Part")
- o388 = Instance.new("Part")
- o389 = Instance.new("WedgePart")
- o390 = Instance.new("WedgePart")
- o391 = Instance.new("WedgePart")
- o392 = Instance.new("WedgePart")
- o393 = Instance.new("WedgePart")
- o394 = Instance.new("WedgePart")
- o395 = Instance.new("Part")
- o396 = Instance.new("WedgePart")
- o397 = Instance.new("WedgePart")
- o398 = Instance.new("Part")
- o399 = Instance.new("WedgePart")
- o400 = Instance.new("WedgePart")
- o401 = Instance.new("WedgePart")
- o402 = Instance.new("Part")
- o403 = Instance.new("Part")
- o404 = Instance.new("WedgePart")
- o405 = Instance.new("Part")
- o406 = Instance.new("Part")
- o407 = Instance.new("Part")
- o408 = Instance.new("Part")
- o409 = Instance.new("WedgePart")
- o410 = Instance.new("WedgePart")
- o411 = Instance.new("Part")
- o412 = Instance.new("Part")
- o413 = Instance.new("Part")
- o414 = Instance.new("Part")
- o415 = Instance.new("Part")
- o416 = Instance.new("Part")
- o417 = Instance.new("WedgePart")
- o418 = Instance.new("WedgePart")
- o419 = Instance.new("WedgePart")
- o420 = Instance.new("WedgePart")
- o421 = Instance.new("WedgePart")
- o422 = Instance.new("Part")
- o423 = Instance.new("Part")
- o424 = Instance.new("WedgePart")
- o425 = Instance.new("Part")
- o426 = Instance.new("Part")
- o427 = Instance.new("WedgePart")
- o428 = Instance.new("Part")
- o429 = Instance.new("Part")
- o430 = Instance.new("Part")
- o431 = Instance.new("Part")
- o432 = Instance.new("Part")
- o433 = Instance.new("WedgePart")
- o434 = Instance.new("WedgePart")
- o435 = Instance.new("Part")
- o436 = Instance.new("WedgePart")
- o437 = Instance.new("Part")
- o438 = Instance.new("Part")
- o439 = Instance.new("Part")
- o440 = Instance.new("WedgePart")
- o441 = Instance.new("WedgePart")
- o442 = Instance.new("Part")
- o443 = Instance.new("SpecialMesh")
- o444 = Instance.new("VehicleSeat")
- o445 = Instance.new("WedgePart")
- o446 = Instance.new("WedgePart")
- o447 = Instance.new("WedgePart")
- o448 = Instance.new("Part")
- o449 = Instance.new("WedgePart")
- o450 = Instance.new("Part")
- o451 = Instance.new("Part")
- o452 = Instance.new("Part")
- o453 = Instance.new("Part")
- o454 = Instance.new("Part")
- o455 = Instance.new("Part")
- o456 = Instance.new("WedgePart")
- o457 = Instance.new("Part")
- o458 = Instance.new("Part")
- o459 = Instance.new("Part")
- o460 = Instance.new("CylinderMesh")
- o461 = Instance.new("Part")
- o462 = Instance.new("SpecialMesh")
- o463 = Instance.new("WedgePart")
- o464 = Instance.new("WedgePart")
- o465 = Instance.new("Part")
- o466 = Instance.new("WedgePart")
- o467 = Instance.new("Part")
- o468 = Instance.new("WedgePart")
- o469 = Instance.new("Part")
- o470 = Instance.new("Part")
- o471 = Instance.new("Part")
- o472 = Instance.new("Part")
- o473 = Instance.new("Part")
- o474 = Instance.new("Part")
- o475 = Instance.new("SpecialMesh")
- o476 = Instance.new("Part")
- o477 = Instance.new("Part")
- o478 = Instance.new("Part")
- o479 = Instance.new("Part")
- o480 = Instance.new("Part")
- o481 = Instance.new("Part")
- o482 = Instance.new("Part")
- o483 = Instance.new("Part")
- o484 = Instance.new("Part")
- o485 = Instance.new("Part")
- o486 = Instance.new("SpecialMesh")
- o487 = Instance.new("Part")
- o488 = Instance.new("SpecialMesh")
- o489 = Instance.new("Part")
- o490 = Instance.new("Part")
- o491 = Instance.new("Part")
- o492 = Instance.new("Part")
- o493 = Instance.new("Part")
- o494 = Instance.new("WedgePart")
- o495 = Instance.new("Part")
- o496 = Instance.new("Part")
- o497 = Instance.new("WedgePart")
- o498 = Instance.new("Part")
- o499 = Instance.new("WedgePart")
- o500 = Instance.new("Part")
- o501 = Instance.new("WedgePart")
- o502 = Instance.new("WedgePart")
- o503 = Instance.new("Part")
- o504 = Instance.new("WedgePart")
- o505 = Instance.new("WedgePart")
- o506 = Instance.new("WedgePart")
- o507 = Instance.new("Part")
- o508 = Instance.new("Part")
- o509 = Instance.new("Part")
- o510 = Instance.new("Part")
- o511 = Instance.new("Part")
- o512 = Instance.new("Part")
- o513 = Instance.new("Part")
- o514 = Instance.new("Part")
- o515 = Instance.new("Part")
- o516 = Instance.new("Part")
- o517 = Instance.new("WedgePart")
- o518 = Instance.new("Part")
- o519 = Instance.new("Part")
- o520 = Instance.new("Part")
- o521 = Instance.new("SpecialMesh")
- o522 = Instance.new("Part")
- o523 = Instance.new("SpecialMesh")
- o524 = Instance.new("Part")
- o525 = Instance.new("WedgePart")
- o526 = Instance.new("Part")
- o527 = Instance.new("WedgePart")
- o528 = Instance.new("WedgePart")
- o529 = Instance.new("Part")
- o530 = Instance.new("WedgePart")
- o531 = Instance.new("WedgePart")
- o532 = Instance.new("Part")
- o533 = Instance.new("Part")
- o534 = Instance.new("WedgePart")
- o535 = Instance.new("Part")
- o536 = Instance.new("Part")
- o537 = Instance.new("Part")
- o538 = Instance.new("Part")
- o539 = Instance.new("Model")
- o540 = Instance.new("Model")
- o541 = Instance.new("Model")
- o542 = Instance.new("Part")
- o543 = Instance.new("Part")
- o544 = Instance.new("Script")
- o545 = Instance.new("ClickDetector")
- o546 = Instance.new("Sound")
- o547 = Instance.new("Script")
- o548 = Instance.new("Model")
- o549 = Instance.new("Model")
- o550 = Instance.new("Part")
- o551 = Instance.new("Part")
- o552 = Instance.new("Script")
- o553 = Instance.new("ClickDetector")
- o554 = Instance.new("Sound")
- o555 = Instance.new("Script")
- o556 = Instance.new("Model")
- o557 = Instance.new("Part")
- o558 = Instance.new("Script")
- o559 = Instance.new("ClickDetector")
- o560 = Instance.new("Sound")
- o561 = Instance.new("Script")
- o562 = Instance.new("Model")
- o563 = Instance.new("Part")
- o564 = Instance.new("Model")
- o565 = Instance.new("Model")
- o566 = Instance.new("Part")
- o567 = Instance.new("Part")
- o568 = Instance.new("Script")
- o569 = Instance.new("ClickDetector")
- o570 = Instance.new("Sound")
- o571 = Instance.new("Script")
- o572 = Instance.new("Part")
- o3.Name = "Compiled scripts"
- o3.Parent = mas
- o4.Name = "CScript1"
- o4.Parent = o3
- o4.Disabled = true
- runDummyScript(function()
- --Created by PenguinAnonymous (ttyyuu12345) Editied by Dittoide
- --What's Added To M2S with Dittoide's Edit?
- --/ Better dummy script function to improve compatibility (makes it like you are running the code inside the script.)
- --/ Removed Gui In Bottom-Left for when you are making guis.
- --/ Removed "Inserting Map Please Wait" gui when selected Workspace as Place to export.
- --Credit: PenguinAnonymous for making original script, i just wanted to iron it out to my liking.
- --Errors: Camera,Terrain
- local runDummyScript = function(f,scri)
- if (not scri:IsA('Script')) or (not scri:IsA('LocalScript')) then return false; end;
- local Dummy_CoRoutine = coroutine.create(function()
- getfenv().script = scri
- ypcall(function() f() end)
- end)
- table.insert(cors,Dummy_CoRoutine);
- coroutine.resume(Dummy_CoRoutine);
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "M2S_Model"
- o3 = Instance.new("Model")
- o4 = Instance.new("Part")
- o5 = Instance.new("SpecialMesh")
- o6 = Instance.new("Part")
- o7 = Instance.new("Part")
- o8 = Instance.new("Part")
- o9 = Instance.new("Part")
- o10 = Instance.new("Part")
- o3.Parent = mas
- o4.Parent = o3
- o4.BrickColor = BrickColor.new("Dark stone grey")
- o4.Transparency = 0.30000001192093
- o4.Position = Vector3.new(-19.7996979, 32.7543106, 52)
- o4.Rotation = Vector3.new(-86.5400009, 29.9599991, -1.73000002)
- o4.Size = Vector3.new(4, 2.4000001, 2)
- o4.CFrame = CFrame.new(-19.7996979, 32.7543106, 52, 0.865938365, 0.0261758789, 0.499465615, -0.500151098, 0.0453196988, 0.864751697, 1.86264537e-09, -0.998629689, 0.052335944)
- o4.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o4.Position = Vector3.new(-19.7996979, 32.7543106, 52)
- o5.Parent = o4
- o5.MeshId = "http://www.roblox.com/asset/?id=12221720"
- o5.Scale = Vector3.new(4, 4, 4)
- o5.MeshType = Enum.MeshType.FileMesh
- o6.Parent = o3
- o6.BrickColor = BrickColor.new("Dark stone grey")
- o6.Position = Vector3.new(-26, 21.7224236, 51)
- o6.Rotation = Vector3.new(-90, -59.9899979, 90)
- o6.Size = Vector3.new(4, 9.60000038, 4)
- o6.CFrame = CFrame.new(-26, 21.7224236, 51, 0, -0.500150919, -0.865937889, 0, -0.865937889, 0.500150919, -1, 0, 0)
- o6.BottomSurface = Enum.SurfaceType.Smooth
- o6.TopSurface = Enum.SurfaceType.Smooth
- o6.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o6.Position = Vector3.new(-26, 21.7224236, 51)
- o7.Parent = o3
- o7.BrickColor = BrickColor.new("Dark stone grey")
- o7.Position = Vector3.new(-32, 16.7224045, 51)
- o7.Rotation = Vector3.new(0, 90, 0)
- o7.Size = Vector3.new(4, 9.60000038, 8)
- o7.CFrame = CFrame.new(-32, 16.7224045, 51, -0, 0, 1, -0, 1, 0, -1, 0, 0)
- o7.TopSurface = Enum.SurfaceType.Smooth
- o7.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o7.Position = Vector3.new(-32, 16.7224045, 51)
- o8.Parent = o3
- o8.BrickColor = BrickColor.new("Dark stone grey")
- o8.Position = Vector3.new(-39.0000038, 17.5224171, 51)
- o8.Rotation = Vector3.new(90, 69, -90)
- o8.Size = Vector3.new(4, 9.60000038, 4)
- o8.CFrame = CFrame.new(-39.0000038, 17.5224171, 51, 0, 0.358368039, 0.933580935, 0, 0.933580935, -0.358368039, -1, 0, 0)
- o8.BottomSurface = Enum.SurfaceType.Smooth
- o8.TopSurface = Enum.SurfaceType.Smooth
- o8.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o8.Position = Vector3.new(-39.0000038, 17.5224171, 51)
- o9.Parent = o3
- o9.BrickColor = BrickColor.new("Dark stone grey")
- o9.Position = Vector3.new(-29, 7.72241306, 51)
- o9.Rotation = Vector3.new(-90, 75, 90)
- o9.Size = Vector3.new(4, 10.8000002, 4)
- o9.CFrame = CFrame.new(-29, 7.72241306, 51, 0, -0.258819133, 0.96592629, 0, 0.96592629, 0.258819133, -1, 0, 0)
- o9.TopSurface = Enum.SurfaceType.Smooth
- o9.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o9.Position = Vector3.new(-29, 7.72241306, 51)
- o10.Parent = o3
- o10.BrickColor = BrickColor.new("Dark stone grey")
- o10.Position = Vector3.new(-34, 7.12241077, 51)
- o10.Rotation = Vector3.new(0, 90, 0)
- o10.Size = Vector3.new(4, 9.60000038, 4)
- o10.CFrame = CFrame.new(-34, 7.12241077, 51, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- o10.TopSurface = Enum.SurfaceType.Smooth
- o10.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o10.Position = Vector3.new(-34, 7.12241077, 51)
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = workspace
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
- mess_handle.Text = "Resetting"
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- v:LoadCharacter()
- end
- wait(1)
- mess_handle:Remove()
- end,o4)
- o5.Name = "timetodie23232223"
- o5.Parent = mas
- o5.Archivable = false
- o5.PrimaryPart = o6
- o6.Name = "Head"
- o6.Parent = o5
- o6.BrickColor = BrickColor.new("Pastel brown")
- o6.Position = Vector3.new(4.27117205, 18.9703922, 5.91570377)
- o6.Rotation = Vector3.new(0.429999977, -21.1999989, 0.159999996)
- o6.Locked = true
- o6.FormFactor = Enum.FormFactor.Symmetric
- o6.Size = Vector3.new(2, 1, 1)
- o6.CFrame = CFrame.new(4.27117205, 18.9703922, 5.91570377, 0.932334244, -0.00255030533, -0.361588806, -9.54365078e-06, 0.999974966, -0.00707747741, 0.361597776, 0.00660202466, 0.932310879)
- o6.TopSurface = Enum.SurfaceType.Smooth
- o6.Color = Color3.new(1, 0.8, 0.6)
- o6.Position = Vector3.new(4.27117205, 18.9703922, 5.91570377)
- o7.Parent = o6
- o7.Scale = Vector3.new(1.25, 1.25, 1.25)
- o12.Name = "GettingUp"
- o12.Parent = o6
- o12.Archivable = false
- o12.SoundId = "rbxasset://sounds/action_get_up.mp3"
- o12.Volume = 0.64999997615814
- o13.Name = "CharacterSoundEvent"
- o13.Parent = o12
- o14.Name = "Died"
- o14.Parent = o6
- o14.Archivable = false
- o14.SoundId = "rbxasset://sounds/uuhhh.mp3"
- o14.Volume = 0.64999997615814
- o15.Name = "CharacterSoundEvent"
- o15.Parent = o14
- o16.Name = "FreeFalling"
- o16.Parent = o6
- o16.Archivable = false
- o16.SoundId = "rbxasset://sounds/action_falling.mp3"
- o16.TimePosition = 0.081925541222972
- o16.Volume = 0
- o16.Looped = true
- o17.Name = "CharacterSoundEvent"
- o17.Parent = o16
- o18.Name = "Jumping"
- o18.Parent = o6
- o18.Archivable = false
- o18.SoundId = "rbxasset://sounds/action_jump.mp3"
- o18.Volume = 0.64999997615814
- o19.Name = "CharacterSoundEvent"
- o19.Parent = o18
- o20.Name = "Landing"
- o20.Parent = o6
- o20.Archivable = false
- o20.SoundId = "rbxasset://sounds/action_jump_land.mp3"
- o20.Volume = 0.61875915527344
- o21.Name = "CharacterSoundEvent"
- o21.Parent = o20
- o22.Name = "Splash"
- o22.Parent = o6
- o22.Archivable = false
- o22.SoundId = "rbxasset://sounds/impact_water.mp3"
- o22.Volume = 0.64999997615814
- o23.Name = "CharacterSoundEvent"
- o23.Parent = o22
- o24.Name = "Running"
- o24.Parent = o6
- o24.Archivable = false
- o24.Pitch = 1.8500000238419
- o24.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- o24.TimePosition = 0.10463502358318
- o24.Volume = 0.64999997615814
- o24.Looped = true
- o25.Name = "CharacterSoundEvent"
- o25.Parent = o24
- o26.Name = "Swimming"
- o26.Parent = o6
- o26.Archivable = false
- o26.Pitch = 1.6000000238419
- o26.SoundId = "rbxasset://sounds/action_swim.mp3"
- o26.Volume = 0.64999997615814
- o26.Looped = true
- o27.Name = "CharacterSoundEvent"
- o27.Parent = o26
- o28.Name = "Climbing"
- o28.Parent = o6
- o28.Archivable = false
- o28.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- o28.TimePosition = 2.0502797460022
- o28.Volume = 0.64999997615814
- o28.Looped = true
- o29.Name = "CharacterSoundEvent"
- o29.Parent = o28
- o30.Name = "face"
- o30.Parent = o6
- o30.Texture = "http://www.roblox.com/asset/?id=13038247"
- o31.Name = "Torso"
- o31.Parent = o5
- o31.BrickColor = BrickColor.new("Pastel brown")
- o31.Position = Vector3.new(4.27244759, 17.4767189, 5.91240263)
- o31.Rotation = Vector3.new(0, -21.1199989, 0)
- o31.Locked = true
- o31.FormFactor = Enum.FormFactor.Symmetric
- o31.Size = Vector3.new(2, 2, 1)
- o31.CFrame = CFrame.new(4.27244759, 17.4767189, 5.91240263, 0.932827592, -3.32776828e-09, -0.36032322, 2.74978773e-09, 1, -2.11668638e-09, 0.36032322, 9.83691573e-10, 0.932827592)
- o31.LeftSurface = Enum.SurfaceType.Weld
- o31.RightSurface = Enum.SurfaceType.Weld
- o31.Color = Color3.new(1, 0.8, 0.6)
- o31.Position = Vector3.new(4.27244759, 17.4767189, 5.91240263)
- o32.Name = "roblox"
- o32.Parent = o31
- o41.Name = "Right Shoulder"
- o41.Parent = o31
- o41.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o41.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o41.Part0 = o31
- o41.Part1 = o49
- o41.CurrentAngle = 0.0080163199454546
- o41.MaxVelocity = 0.10000000149012
- o42.Name = "Left Shoulder"
- o42.Parent = o31
- o42.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o42.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o42.Part0 = o31
- o42.Part1 = o46
- o42.CurrentAngle = -0.0055708615109324
- o42.MaxVelocity = 0.10000000149012
- o43.Name = "Right Hip"
- o43.Parent = o31
- o43.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o43.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o43.Part0 = o31
- o43.Part1 = o54
- o43.MaxVelocity = 0.10000000149012
- o44.Name = "Left Hip"
- o44.Parent = o31
- o44.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o44.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o44.Part0 = o31
- o44.Part1 = o52
- o44.MaxVelocity = 0.10000000149012
- o45.Name = "Neck"
- o45.Parent = o31
- o45.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o45.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o45.Part0 = o31
- o45.Part1 = o6
- o45.CurrentAngle = 0.0033947732299566
- o45.MaxVelocity = 0.10000000149012
- o46.Name = "Left Arm"
- o46.Parent = o5
- o46.BrickColor = BrickColor.new("Pastel brown")
- o46.Position = Vector3.new(2.87787318, 17.4596024, 5.35841894)
- o46.Rotation = Vector3.new(0.340000004, -22.4399986, 0.049999997)
- o46.CanCollide = false
- o46.Locked = true
- o46.FormFactor = Enum.FormFactor.Symmetric
- o46.Size = Vector3.new(1, 2, 1)
- o46.CFrame = CFrame.new(2.87787318, 17.4596024, 5.35841894, 0.924307168, -0.000812845305, -0.38164863, -0.00141419878, 0.999983549, -0.00555483857, 0.381646872, 0.0056741056, 0.924290895)
- o46.Color = Color3.new(1, 0.8, 0.6)
- o46.Position = Vector3.new(2.87787318, 17.4596024, 5.35841894)
- o49.Name = "Right Arm"
- o49.Parent = o5
- o49.BrickColor = BrickColor.new("Pastel brown")
- o49.Position = Vector3.new(5.67286825, 17.4916096, 6.45005751)
- o49.Rotation = Vector3.new(0.170000002, -20.9300003, 0.0700000003)
- o49.CanCollide = false
- o49.Locked = true
- o49.FormFactor = Enum.FormFactor.Symmetric
- o49.Size = Vector3.new(1, 2, 1)
- o49.CFrame = CFrame.new(5.67286825, 17.4916096, 6.45005751, 0.934021831, -0.00116504193, -0.357214272, 0.000176517278, 0.999996066, -0.00279990816, 0.35721615, 0.00255212141, 0.934018314)
- o49.Color = Color3.new(1, 0.8, 0.6)
- o49.Position = Vector3.new(5.67286825, 17.4916096, 6.45005751)
- o52.Name = "Left Leg"
- o52.Parent = o5
- o52.BrickColor = BrickColor.new("Pastel brown")
- o52.Position = Vector3.new(3.80603385, 15.4980507, 5.73224115)
- o52.Rotation = Vector3.new(0, -21.1199989, 0)
- o52.CanCollide = false
- o52.Locked = true
- o52.FormFactor = Enum.FormFactor.Symmetric
- o52.Size = Vector3.new(1, 2, 1)
- o52.CFrame = CFrame.new(3.80603385, 15.4980507, 5.73224115, 0.932827592, -3.32776828e-09, -0.36032322, 2.74978773e-09, 1, -2.11668638e-09, 0.36032322, 9.83691573e-10, 0.932827592)
- o52.BottomSurface = Enum.SurfaceType.Smooth
- o52.Color = Color3.new(1, 0.8, 0.6)
- o52.Position = Vector3.new(3.80603385, 15.4980507, 5.73224115)
- o54.Name = "Right Leg"
- o54.Parent = o5
- o54.BrickColor = BrickColor.new("Pastel brown")
- o54.Position = Vector3.new(4.73886156, 15.4974003, 6.09256411)
- o54.Rotation = Vector3.new(0, -21.1199989, 0)
- o54.CanCollide = false
- o54.Locked = true
- o54.FormFactor = Enum.FormFactor.Symmetric
- o54.Size = Vector3.new(1, 2, 1)
- o54.CFrame = CFrame.new(4.73886156, 15.4974003, 6.09256411, 0.932827592, -3.32776828e-09, -0.36032322, 2.74978773e-09, 1, -2.11668638e-09, 0.36032322, 9.83691573e-10, 0.932827592)
- o54.BottomSurface = Enum.SurfaceType.Smooth
- o54.Color = Color3.new(1, 0.8, 0.6)
- o54.Position = Vector3.new(4.73886156, 15.4974003, 6.09256411)
- o56.Parent = o5
- o56.RightLeg = o54
- o56.LeftLeg = o52
- o56.Torso = o59
- o59.Name = "HumanoidRootPart"
- o59.Parent = o5
- o59.Transparency = 1
- o59.Position = Vector3.new(4.27244759, 17.4983177, 5.91240263)
- o59.Rotation = Vector3.new(0, -21.1199989, 0)
- o59.CanCollide = false
- o59.Locked = true
- o59.FormFactor = Enum.FormFactor.Symmetric
- o59.Size = Vector3.new(2, 2, 1)
- o59.CFrame = CFrame.new(4.27244759, 17.4983177, 5.91240263, 0.932827592, -3.32776828e-09, -0.36032322, 2.74978773e-09, 1, -2.11668638e-09, 0.36032322, 9.83691573e-10, 0.932827592)
- o59.BottomSurface = Enum.SurfaceType.Smooth
- o59.TopSurface = Enum.SurfaceType.Smooth
- o59.Position = Vector3.new(4.27244759, 17.4983177, 5.91240263)
- o61.Name = "RootJoint"
- o61.Parent = o59
- o61.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o61.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o61.Part0 = o59
- o61.Part1 = o31
- o61.MaxVelocity = 0.10000000149012
- o62.Name = "Sound"
- o62.Parent = o5
- runDummyScript(function()
- --[[
- Author: @spotco
- This script creates sounds which are placed under the character head.
- These sounds are used by the "LocalSound" script.
- To modify this script, copy it to your "StarterPlayer/StarterCharacterScripts" folder keeping the same script name ("Sound").
- The default Sound script loaded for every character will then be replaced with your copy of the script.
- ]]--
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Players = game:GetService("Players")
- local SOUND_EVENT_FOLDER_NAME = "DefaultSoundEvents"
- local DEFAULT_SERVER_SOUND_EVENT_NAME = "DefaultServerSoundEvent"
- local SoundEventFolder = ReplicatedStorage:FindFirstChild(SOUND_EVENT_FOLDER_NAME)
- local DefaultServerSoundEvent = nil
- local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
- if useSoundDispatcher then
- if not SoundEventFolder then
- SoundEventFolder = Instance.new("Folder")
- SoundEventFolder.Name = SOUND_EVENT_FOLDER_NAME
- SoundEventFolder.Archivable = false
- SoundEventFolder.Parent = ReplicatedStorage
- end
- DefaultServerSoundEvent = SoundEventFolder:FindFirstChild(DEFAULT_SERVER_SOUND_EVENT_NAME)
- else
- DefaultServerSoundEvent = ReplicatedStorage:FindFirstChild(DEFAULT_SERVER_SOUND_EVENT_NAME)
- end
- if not DefaultServerSoundEvent then
- if useSoundDispatcher then
- DefaultServerSoundEvent = Instance.new("RemoteEvent", SoundEventFolder)
- else
- DefaultServerSoundEvent = Instance.new("RemoteEvent", ReplicatedStorage)
- end
- DefaultServerSoundEvent.Name = DEFAULT_SERVER_SOUND_EVENT_NAME
- DefaultServerSoundEvent.OnServerEvent:Connect(function() end)
- end
- local function CreateNewSound(name, id, looped, pitch, parent)
- local sound = Instance.new("Sound")
- sound.SoundId = id
- sound.Name = name
- sound.archivable = false
- sound.Pitch = pitch
- sound.Looped = looped
- sound.MinDistance = 5
- sound.MaxDistance = 150
- sound.Volume = 0.65
- sound.Parent = parent
- if DefaultServerSoundEvent then
- local CharacterSoundEvent = Instance.new("RemoteEvent", sound)
- CharacterSoundEvent.Name = "CharacterSoundEvent"
- CharacterSoundEvent.OnServerEvent:Connect(function(player, playing, resetPosition)
- if type(playing) ~= "boolean" then
- return
- end
- if type(resetPosition) ~= "boolean" then
- return
- end
- if player.Character ~= script.Parent then
- return
- end
- for _, p in pairs(Players:GetPlayers()) do
- if p ~= player then
- -- Connect to the dispatcher to check if the player has loaded.
- if useSoundDispatcher then
- SoundEventFolder:FindFirstChild("SoundDispatcher"):Fire(p, sound, playing, resetPosition)
- else
- DefaultServerSoundEvent:FireClient(p, sound, playing, resetPosition)
- end
- end
- end
- end)
- end
- return sound
- end
- local head = script.Parent:FindFirstChild("Head")
- if not head then
- error("Sound script parent has no child Head.")
- return
- end
- CreateNewSound("GettingUp", "rbxasset://sounds/action_get_up.mp3", false, 1, head)
- CreateNewSound("Died", "rbxasset://sounds/uuhhh.mp3", false, 1, head)
- CreateNewSound("FreeFalling", "rbxasset://sounds/action_falling.mp3", true, 1, head)
- CreateNewSound("Jumping", "rbxasset://sounds/action_jump.mp3", false, 1, head)
- CreateNewSound("Landing", "rbxasset://sounds/action_jump_land.mp3", false, 1, head)
- CreateNewSound("Splash", "rbxasset://sounds/impact_water.mp3", false, 1, head)
- CreateNewSound("Running", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1.85, head)
- CreateNewSound("Swimming", "rbxasset://sounds/action_swim.mp3", true, 1.6, head)
- CreateNewSound("Climbing", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1, head)
- end,o62)
- o63.Name = "LocalSound"
- o63.Parent = o62
- runDummyScript(function()
- --[[
- Author: @spotco
- This script runs locally for the player of the given humanoid.
- This script triggers humanoid sound play/pause actions locally.
- The Playing/TimePosition properties of Sound objects bypass FilteringEnabled, so this triggers the sound
- immediately for the player and is replicated to all other players.
- This script is optimized to reduce network traffic through minimizing the amount of property replication.
- ]]--
- --All sounds are referenced by this ID
- local SFX = {
- Died = 0;
- Running = 1;
- Swimming = 2;
- Climbing = 3,
- Jumping = 4;
- GettingUp = 5;
- FreeFalling = 6;
- FallingDown = 7;
- Landing = 8;
- Splash = 9;
- }
- local useUpdatedLocalSoundFlag = UserSettings():IsUserFeatureEnabled("UserFixCharacterSoundIssues")
- local Humanoid = nil
- local Head = nil
- --SFX ID to Sound object
- local Sounds = {}
- local SoundService = game:GetService("SoundService")
- local soundEventFolderName = "DefaultSoundEvents"
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local AddCharacterLoadedEvent = nil
- local RemoveCharacterEvent = nil
- local soundEventFolder = ReplicatedStorage:FindFirstChild(soundEventFolderName)
- local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
- if useSoundDispatcher then
- if not soundEventFolder then
- soundEventFolder = Instance.new("Folder", ReplicatedStorage)
- soundEventFolder.Name = soundEventFolderName
- soundEventFolder.Archivable = false
- end
- -- Load the RemoveCharacterEvent
- RemoveCharacterEvent = soundEventFolder:FindFirstChild("RemoveCharacterEvent")
- if RemoveCharacterEvent == nil then
- RemoveCharacterEvent = Instance.new("RemoteEvent", soundEventFolder)
- RemoveCharacterEvent.Name = "RemoveCharacterEvent"
- end
- AddCharacterLoadedEvent = soundEventFolder:FindFirstChild("AddCharacterLoadedEvent")
- if AddCharacterLoadedEvent == nil then
- AddCharacterLoadedEvent = Instance.new("RemoteEvent", soundEventFolder)
- AddCharacterLoadedEvent.Name = "AddCharacterLoadedEvent"
- end
- -- Notify the server a new character has been loaded
- AddCharacterLoadedEvent:FireServer()
- -- Notify the sound dispatcher this character has left.
- game.Players.LocalPlayer.CharacterRemoving:connect(function(character)
- RemoveCharacterEvent:FireServer(game.Players.LocalPlayer)
- end)
- end
- do
- local Figure = script.Parent.Parent
- Head = Figure:WaitForChild("Head")
- while not Humanoid do
- for _,NewHumanoid in pairs(Figure:GetChildren()) do
- if NewHumanoid:IsA("Humanoid") then
- Humanoid = NewHumanoid
- break
- end
- end
- if Humanoid then break end
- Figure.ChildAdded:wait()
- end
- Sounds[SFX.Died] = Head:WaitForChild("Died")
- Sounds[SFX.Running] = Head:WaitForChild("Running")
- Sounds[SFX.Swimming] = Head:WaitForChild("Swimming")
- Sounds[SFX.Climbing] = Head:WaitForChild("Climbing")
- Sounds[SFX.Jumping] = Head:WaitForChild("Jumping")
- Sounds[SFX.GettingUp] = Head:WaitForChild("GettingUp")
- Sounds[SFX.FreeFalling] = Head:WaitForChild("FreeFalling")
- Sounds[SFX.Landing] = Head:WaitForChild("Landing")
- Sounds[SFX.Splash] = Head:WaitForChild("Splash")
- local DefaultServerSoundEvent = nil
- if useSoundDispatcher then
- DefaultServerSoundEvent = soundEventFolder:FindFirstChild("DefaultServerSoundEvent")
- else
- DefaultServerSoundEvent = game:GetService("ReplicatedStorage"):FindFirstChild("DefaultServerSoundEvent")
- end
- if DefaultServerSoundEvent then
- DefaultServerSoundEvent.OnClientEvent:connect(function(sound, playing, resetPosition)
- if resetPosition and sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if sound.IsPlaying ~= playing then
- sound.Playing = playing
- end
- end)
- end
- end
- local IsSoundFilteringEnabled = function()
- return game.Workspace.FilteringEnabled and SoundService.RespectFilteringEnabled
- end
- local Util
- Util = {
- --Define linear relationship between (pt1x,pt2x) and (pt2x,pt2y). Evaluate this at x.
- YForLineGivenXAndTwoPts = function(x,pt1x,pt1y,pt2x,pt2y)
- --(y - y1)/(x - x1) = m
- local m = (pt1y - pt2y) / (pt1x - pt2x)
- --float b = pt1.y - m * pt1.x;
- local b = (pt1y - m * pt1x)
- return m * x + b
- end;
- --Clamps the value of "val" between the "min" and "max"
- Clamp = function(val,min,max)
- return math.min(max,math.max(min,val))
- end;
- --Gets the horizontal (x,z) velocity magnitude of the given part
- HorizontalSpeed = function(Head)
- local hVel = Head.Velocity + Vector3.new(0,-Head.Velocity.Y,0)
- return hVel.magnitude
- end;
- --Gets the vertical (y) velocity magnitude of the given part
- VerticalSpeed = function(Head)
- return math.abs(Head.Velocity.Y)
- end;
- --Setting Playing/TimePosition values directly result in less network traffic than Play/Pause/Resume/Stop
- --If these properties are enabled, use them.
- Play = function(sound)
- if IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(true, true)
- end
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Pause = function(sound)
- if IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(false, false)
- end
- if sound.IsPlaying then
- sound.Playing = false
- end
- end;
- Resume = function(sound)
- if IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(true, false)
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Stop = function(sound)
- if IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(false, true)
- end
- if sound.IsPlaying then
- sound.Playing = false
- end
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- end;
- }
- do
- -- List of all active Looped sounds
- local playingLoopedSounds = {}
- -- Last seen Enum.HumanoidStateType
- local activeState = nil
- local fallSpeed = 0
- -- Verify and set that "sound" is in "playingLoopedSounds".
- function setSoundInPlayingLoopedSounds(sound)
- for i=1, #playingLoopedSounds do
- if playingLoopedSounds[i] == sound then
- return
- end
- end
- table.insert(playingLoopedSounds,sound)
- end
- -- Stop all active looped sounds except parameter "except". If "except" is not passed, all looped sounds will be stopped.
- function stopPlayingLoopedSoundsExcept(except)
- for i=#playingLoopedSounds,1,-1 do
- if playingLoopedSounds[i] ~= except then
- Util.Pause(playingLoopedSounds[i])
- table.remove(playingLoopedSounds,i)
- end
- end
- end
- -- Table of Enum.HumanoidStateType to handling function
- local stateUpdateHandler = {
- [Enum.HumanoidStateType.Dead] = function()
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.Died]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.RunningNoPhysics] = function(speed)
- stateUpdated(Enum.HumanoidStateType.Running, speed)
- end;
- [Enum.HumanoidStateType.Running] = function(speed)
- local sound = Sounds[SFX.Running]
- stopPlayingLoopedSoundsExcept(sound)
- if(useUpdatedLocalSoundFlag and activeState == Enum.HumanoidStateType.Freefall and fallSpeed > 0.1) then
- -- Play a landing sound if the character dropped from a large distance
- local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
- local freeFallSound = Sounds[SFX.FreeFalling]
- freeFallSound.Volume = vol
- Util.Play(freeFallSound)
- fallSpeed = 0
- end
- if useUpdatedLocalSoundFlag then
- if speed ~= nil and speed > 0.5 then
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- elseif speed ~= nil then
- stopPlayingLoopedSoundsExcept()
- end
- else
- if Util.HorizontalSpeed(Head) > 0.5 then
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- else
- stopPlayingLoopedSoundsExcept()
- end
- end
- end;
- [Enum.HumanoidStateType.Swimming] = function(speed)
- local threshold
- if useUpdatedLocalSoundFlag then threshold = speed else threshold = Util.VerticalSpeed(Head) end
- if activeState ~= Enum.HumanoidStateType.Swimming and threshold > 0.1 then
- local splashSound = Sounds[SFX.Splash]
- splashSound.Volume = Util.Clamp(
- Util.YForLineGivenXAndTwoPts(
- Util.VerticalSpeed(Head),
- 100, 0.28,
- 350, 1),
- 0,1)
- Util.Play(splashSound)
- end
- do
- local sound = Sounds[SFX.Swimming]
- stopPlayingLoopedSoundsExcept(sound)
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- end
- end;
- [Enum.HumanoidStateType.Climbing] = function(speed)
- local sound = Sounds[SFX.Climbing]
- if useUpdatedLocalSoundFlag then
- if speed ~= nil and math.abs(speed) > 0.1 then
- Util.Resume(sound)
- stopPlayingLoopedSoundsExcept(sound)
- else
- Util.Pause(sound)
- stopPlayingLoopedSoundsExcept(sound)
- end
- else
- if Util.VerticalSpeed(Head) > 0.1 then
- Util.Resume(sound)
- stopPlayingLoopedSoundsExcept(sound)
- else
- stopPlayingLoopedSoundsExcept()
- end
- end
- setSoundInPlayingLoopedSounds(sound)
- end;
- [Enum.HumanoidStateType.Jumping] = function()
- if activeState == Enum.HumanoidStateType.Jumping then
- return
- end
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.Jumping]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.GettingUp] = function()
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.GettingUp]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.Freefall] = function()
- if activeState == Enum.HumanoidStateType.Freefall then
- return
- end
- local sound = Sounds[SFX.FreeFalling]
- sound.Volume = 0
- stopPlayingLoopedSoundsExcept()
- fallSpeed = math.max(fallSpeed, math.abs(Head.Velocity.y))
- end;
- [Enum.HumanoidStateType.FallingDown] = function()
- stopPlayingLoopedSoundsExcept()
- end;
- [Enum.HumanoidStateType.Landed] = function()
- stopPlayingLoopedSoundsExcept()
- if Util.VerticalSpeed(Head) > 75 then
- local landingSound = Sounds[SFX.Landing]
- landingSound.Volume = Util.Clamp(
- Util.YForLineGivenXAndTwoPts(
- Util.VerticalSpeed(Head),
- 50, 0,
- 100, 1),
- 0,1)
- Util.Play(landingSound)
- end
- end;
- [Enum.HumanoidStateType.Seated] = function()
- stopPlayingLoopedSoundsExcept()
- end;
- }
- -- Handle state event fired or OnChange fired
- function stateUpdated(state, speed)
- if stateUpdateHandler[state] ~= nil then
- if useUpdatedLocalSoundFlag and (state == Enum.HumanoidStateType.Running
- or state == Enum.HumanoidStateType.Climbing
- or state == Enum.HumanoidStateType.Swimming
- or state == Enum.HumanoidStateType.RunningNoPhysics) then
- stateUpdateHandler[state](speed)
- else
- stateUpdateHandler[state]()
- end
- end
- activeState = state
- end
- Humanoid.Died:connect( function() stateUpdated(Enum.HumanoidStateType.Dead) end)
- Humanoid.Running:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Running, speed) end)
- Humanoid.Swimming:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Swimming, speed) end)
- Humanoid.Climbing:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Climbing, speed) end)
- Humanoid.Jumping:connect( function() stateUpdated(Enum.HumanoidStateType.Jumping) end)
- Humanoid.GettingUp:connect( function() stateUpdated(Enum.HumanoidStateType.GettingUp) end)
- Humanoid.FreeFalling:connect( function() stateUpdated(Enum.HumanoidStateType.Freefall) end)
- Humanoid.FallingDown:connect( function() stateUpdated(Enum.HumanoidStateType.FallingDown) end)
- -- required for proper handling of Landed event
- Humanoid.StateChanged:connect(function(old, new)
- stateUpdated(new)
- end)
- function onUpdate(stepDeltaSeconds, tickSpeedSeconds)
- local stepScale = stepDeltaSeconds / tickSpeedSeconds
- do
- local sound = Sounds[SFX.FreeFalling]
- if activeState == Enum.HumanoidStateType.Freefall then
- if Head.Velocity.Y < 0 and Util.VerticalSpeed(Head) > 75 then
- Util.Resume(sound)
- --Volume takes 1.1 seconds to go from volume 0 to 1
- local ANIMATION_LENGTH_SECONDS = 1.1
- local normalizedIncrement = tickSpeedSeconds / ANIMATION_LENGTH_SECONDS
- sound.Volume = Util.Clamp(sound.Volume + normalizedIncrement * stepScale, 0, 1)
- else
- sound.Volume = 0
- end
- else
- Util.Pause(sound)
- end
- end
- do
- local sound = Sounds[SFX.Running]
- if activeState == Enum.HumanoidStateType.Running then
- if Util.HorizontalSpeed(Head) < 0.5 then
- Util.Pause(sound)
- end
- end
- end
- end
- local lastTick = tick()
- local TICK_SPEED_SECONDS = 0.25
- while true do
- onUpdate(tick() - lastTick,TICK_SPEED_SECONDS)
- lastTick = tick()
- wait(TICK_SPEED_SECONDS)
- end
- end
- end,o63)
- o64.Name = "Health"
- o64.Parent = o5
- runDummyScript(function()
- -- Gradually regenerates the Humanoid's Health over time.
- local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
- local REGEN_STEP = 1 -- Wait this long between each regeneration step.
- --------------------------------------------------------------------------------
- local Character = script.Parent
- local Humanoid = Character:WaitForChild'Humanoid'
- --------------------------------------------------------------------------------
- while true do
- while Humanoid.Health < Humanoid.MaxHealth do
- local dt = wait(REGEN_STEP)
- local dh = dt*REGEN_RATE*Humanoid.MaxHealth
- Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
- end
- Humanoid.HealthChanged:Wait()
- end
- end,o64)
- o65.Name = "Animate"
- o65.Parent = o5
- runDummyScript(function()
- local Figure = script.Parent
- local Torso = Figure:WaitForChild("Torso")
- local RightShoulder = Torso:WaitForChild("Right Shoulder")
- local LeftShoulder = Torso:WaitForChild("Left Shoulder")
- local RightHip = Torso:WaitForChild("Right Hip")
- local LeftHip = Torso:WaitForChild("Left Hip")
- local Neck = Torso:WaitForChild("Neck")
- local Humanoid = Figure:WaitForChild("Humanoid")
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimInstance = nil
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local animTable = {}
- local animNames = {
- idle = {
- { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
- { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
- },
- run = {
- { id = "run.xml", weight = 10 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
- -- { id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
- },
- dance1 = {
- { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
- },
- }
- local dances = {"dance1", "dance2", "dance3"}
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- function configureAnimationSet(name, fileList)
- if (animTable[name] ~= nil) then
- for _, connection in pairs(animTable[name].connections) do
- connection:disconnect()
- end
- end
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- animTable[name].connections = {}
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- -- print("Loading anims " .. name)
- table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
- table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- if (childPart:IsA("Animation")) then
- table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- Setup animation objects
- function scriptChildModified(child)
- local fileList = animNames[child.Name]
- if (fileList ~= nil) then
- configureAnimationSet(child.Name, fileList)
- end
- end
- script.ChildAdded:connect(scriptChildModified)
- script.ChildRemoved:connect(scriptChildModified)
- for name, fileList in pairs(animNames) do
- configureAnimationSet(name, fileList)
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.3
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.3
- local jumpMaxLimbVelocity = 0.75
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- currentAnimInstance = nil
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- return oldAnim
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- function keyFrameReachedFunc(frameName)
- if (frameName == "End") then
- local repeatAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
- repeatAnim = "idle"
- end
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.0, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- switch animation
- if (anim ~= currentAnimInstance) then
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop(transitionTime)
- currentAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- -- load it to the humanoid; get AnimationTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- currentAnimTrack.Priority = Enum.AnimationPriority.Core
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- currentAnimInstance = anim
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolAnimTrack = nil
- local toolAnimInstance = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid, priority)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- if (toolAnimInstance ~= anim) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- -- load it to the humanoid; get AnimationTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- if priority then
- toolAnimTrack.Priority = priority
- end
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- toolAnimInstance = anim
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- toolAnimInstance = nil
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed > 0.01 then
- playAnimation("walk", 0.1, Humanoid)
- if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
- setAnimationSpeed(speed / 14.5)
- end
- pose = "Running"
- else
- if emoteNames[currentAnim] == nil then
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / 12.0)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed > 0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
- return
- end
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- playAnimation("sit", 0.5, Humanoid)
- return
- elseif (pose == "Running") then
- playAnimation("walk", 0.1, Humanoid)
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- -- print("Wha " .. pose)
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- if (setAngles) then
- local desiredAngle = amplitude * math.sin(time * frequency)
- RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
- LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
- RightHip:SetDesiredAngle(-desiredAngle)
- LeftHip:SetDesiredAngle(-desiredAngle)
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool and tool:FindFirstChild("Handle") then
- local animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- stopToolAnimations()
- toolAnim = "None"
- toolAnimInstance = nil
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- -- setup emote chat hook
- game:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
- local emote = ""
- if msg == "/e dance" then
- emote = dances[math.random(1, #dances)]
- elseif (string.sub(msg, 1, 3) == "/e ") then
- emote = string.sub(msg, 4)
- elseif (string.sub(msg, 1, 7) == "/emote ") then
- emote = string.sub(msg, 8)
- end
- if (pose == "Standing" and emoteNames[emote] ~= nil) then
- playAnimation(emote, 0.1, Humanoid)
- end
- end)
- -- main program
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent ~= nil do
- local _, time = wait(0.1)
- move(time)
- end
- end,o65)
- o66.Name = "idle"
- o66.Parent = o65
- o67.Name = "Animation1"
- o67.Parent = o66
- o67.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- o68.Name = "Weight"
- o68.Parent = o67
- o68.Value = 9
- o69.Name = "Animation2"
- o69.Parent = o66
- o69.AnimationId = "http://www.roblox.com/asset/?id=180435792"
- o70.Name = "Weight"
- o70.Parent = o69
- o70.Value = 1
- o71.Name = "walk"
- o71.Parent = o65
- o72.Name = "WalkAnim"
- o72.Parent = o71
- o72.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- o73.Name = "run"
- o73.Parent = o65
- o74.Name = "RunAnim"
- o74.Parent = o73
- o74.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- o75.Name = "jump"
- o75.Parent = o65
- o76.Name = "JumpAnim"
- o76.Parent = o75
- o76.AnimationId = "http://www.roblox.com/asset/?id=125750702"
- o77.Name = "climb"
- o77.Parent = o65
- o78.Name = "ClimbAnim"
- o78.Parent = o77
- o78.AnimationId = "http://www.roblox.com/asset/?id=180436334"
- o79.Name = "toolnone"
- o79.Parent = o65
- o80.Name = "ToolNoneAnim"
- o80.Parent = o79
- o80.AnimationId = "http://www.roblox.com/asset/?id=182393478"
- o81.Name = "fall"
- o81.Parent = o65
- o82.Name = "FallAnim"
- o82.Parent = o81
- o82.AnimationId = "http://www.roblox.com/asset/?id=180436148"
- o83.Name = "sit"
- o83.Parent = o65
- o84.Name = "SitAnim"
- o84.Parent = o83
- o84.AnimationId = "http://www.roblox.com/asset/?id=178130996"
- o85.Name = "ScaleDampeningPercent"
- o85.Parent = o65
- o85.Value = 0.39999997615814
- o86.Parent = o5
- o86.HeadColor = BrickColor.new("Pastel brown")
- o86.LeftArmColor = BrickColor.new("Pastel brown")
- o86.LeftLegColor = BrickColor.new("Pastel brown")
- o86.RightArmColor = BrickColor.new("Pastel brown")
- o86.RightLegColor = BrickColor.new("Pastel brown")
- o86.TorsoColor = BrickColor.new("Pastel brown")
- o87.Name = "Pants"
- o87.Parent = o5
- o87.PantsTemplate = "http://www.roblox.com/asset/?id=1439542143"
- o89.Name = "Handle"
- o89.Parent = mas
- o89.Position = Vector3.new(4.26113749, 19.3688087, 5.9416008)
- o89.Rotation = Vector3.new(0.409999996, -21.1899986, 0.149999991)
- o89.CanCollide = false
- o89.Locked = true
- o89.FormFactor = Enum.FormFactor.Custom
- o89.Size = Vector3.new(1.45002651, 2.35999823, 1.24000001)
- o89.CFrame = CFrame.new(4.26113749, 19.3688087, 5.9416008, 0.932404339, -0.00241823541, -0.361408919, -7.89341357e-06, 0.999977529, -0.00671136798, 0.361416966, 0.00626056409, 0.932383358)
- o89.BottomSurface = Enum.SurfaceType.Smooth
- o89.TopSurface = Enum.SurfaceType.Smooth
- o89.Position = Vector3.new(4.26113749, 19.3688087, 5.9416008)
- o90.Parent = o89
- o90.MeshId = "http://www.roblox.com/asset/?id=188565062 "
- o90.TextureId = "http://www.roblox.com/asset/?id=188565095 "
- o90.MeshType = Enum.MeshType.FileMesh
- o92.Name = "OriginalSize"
- o92.Parent = o89
- o92.Value = Vector3.new(1.45002651, 2.35999823, 1.24000001)
- o93.Name = "AccessoryWeld"
- o93.Parent = o89
- o93.C0 = CFrame.new(8.65748007e-09, 0.199999809, -0.0252722446, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o93.C1 = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o93.Part0 = o89
- o93.Part1 = o6
- o94.Name = "Shirt"
- o94.Parent = o5
- o94.ShirtTemplate = "http://www.roblox.com/asset/?id=1439532842"
- o95.Name = "Compiled scripts"
- o95.Parent = mas
- o96.Name = "CScript1"
- o96.Parent = o95
- o96.Disabled = true
- runDummyScript(function()
- --Created by PenguinAnonymous (ttyyuu12345) Editied by Dittoide
- --What's Added To M2S with Dittoide's Edit?
- --/ Better dummy script function to improve compatibility (makes it like you are running the code inside the script.)
- --/ Removed Gui In Bottom-Left for when you are making guis.
- --/ Removed "Inserting Map Please Wait" gui when selected Workspace as Place to export.
- --Credit: PenguinAnonymous for making original script, i just wanted to iron it out to my liking.
- --Errors: Camera,Terrain,Attachment,Status,Animator,Accessory
- local runDummyScript = function(f,scri)
- if (not scri:IsA('Script')) or (not scri:IsA('LocalScript')) then return false; end;
- local Dummy_CoRoutine = coroutine.create(function()
- getfenv().script = scri
- ypcall(function() f() end)
- end)
- table.insert(cors,Dummy_CoRoutine);
- coroutine.resume(Dummy_CoRoutine);
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "M2S_Model"
- o3 = Instance.new("Model")
- o4 = Instance.new("Script")
- o5 = Instance.new("Model")
- o6 = Instance.new("Model")
- o7 = Instance.new("Part")
- o8 = Instance.new("SpecialMesh")
- o9 = Instance.new("Part")
- o10 = Instance.new("Part")
- o11 = Instance.new("Part")
- o12 = Instance.new("Part")
- o13 = Instance.new("Part")
- o14 = Instance.new("Model")
- o15 = Instance.new("Part")
- o16 = Instance.new("SpecialMesh")
- o21 = Instance.new("Sound")
- o22 = Instance.new("RemoteEvent")
- o23 = Instance.new("Sound")
- o24 = Instance.new("RemoteEvent")
- o25 = Instance.new("Sound")
- o26 = Instance.new("RemoteEvent")
- o27 = Instance.new("Sound")
- o28 = Instance.new("RemoteEvent")
- o29 = Instance.new("Sound")
- o30 = Instance.new("RemoteEvent")
- o31 = Instance.new("Sound")
- o32 = Instance.new("RemoteEvent")
- o33 = Instance.new("Sound")
- o34 = Instance.new("RemoteEvent")
- o35 = Instance.new("Sound")
- o36 = Instance.new("RemoteEvent")
- o37 = Instance.new("Sound")
- o38 = Instance.new("RemoteEvent")
- o39 = Instance.new("Decal")
- o40 = Instance.new("Part")
- o41 = Instance.new("Decal")
- o50 = Instance.new("Motor6D")
- o51 = Instance.new("Motor6D")
- o52 = Instance.new("Motor6D")
- o53 = Instance.new("Motor6D")
- o54 = Instance.new("Motor6D")
- o55 = Instance.new("Part")
- o58 = Instance.new("Part")
- o61 = Instance.new("Part")
- o63 = Instance.new("Part")
- o65 = Instance.new("Humanoid")
- o68 = Instance.new("Part")
- o70 = Instance.new("Motor6D")
- o71 = Instance.new("Script")
- o72 = Instance.new("LocalScript")
- o73 = Instance.new("Script")
- o74 = Instance.new("LocalScript")
- o75 = Instance.new("StringValue")
- o76 = Instance.new("Animation")
- o77 = Instance.new("NumberValue")
- o78 = Instance.new("Animation")
- o79 = Instance.new("NumberValue")
- o80 = Instance.new("StringValue")
- o81 = Instance.new("Animation")
- o82 = Instance.new("StringValue")
- o83 = Instance.new("Animation")
- o84 = Instance.new("StringValue")
- o85 = Instance.new("Animation")
- o86 = Instance.new("StringValue")
- o87 = Instance.new("Animation")
- o88 = Instance.new("StringValue")
- o89 = Instance.new("Animation")
- o90 = Instance.new("StringValue")
- o91 = Instance.new("Animation")
- o92 = Instance.new("StringValue")
- o93 = Instance.new("Animation")
- o94 = Instance.new("NumberValue")
- o95 = Instance.new("BodyColors")
- o96 = Instance.new("Pants")
- o98 = Instance.new("Part")
- o99 = Instance.new("SpecialMesh")
- o101 = Instance.new("Vector3Value")
- o102 = Instance.new("Weld")
- o103 = Instance.new("Shirt")
- o3.Name = "Compiled scripts"
- o3.Parent = mas
- o4.Name = "CScript1"
- o4.Parent = o3
- o4.Disabled = true
- runDummyScript(function()
- --Created by PenguinAnonymous (ttyyuu12345) Editied by Dittoide
- --What's Added To M2S with Dittoide's Edit?
- --/ Better dummy script function to improve compatibility (makes it like you are running the code inside the script.)
- --/ Removed Gui In Bottom-Left for when you are making guis.
- --/ Removed "Inserting Map Please Wait" gui when selected Workspace as Place to export.
- --Credit: PenguinAnonymous for making original script, i just wanted to iron it out to my liking.
- --Errors: Camera,Terrain
- local runDummyScript = function(f,scri)
- if (not scri:IsA('Script')) or (not scri:IsA('LocalScript')) then return false; end;
- local Dummy_CoRoutine = coroutine.create(function()
- getfenv().script = scri
- ypcall(function() f() end)
- end)
- table.insert(cors,Dummy_CoRoutine);
- coroutine.resume(Dummy_CoRoutine);
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "M2S_Model"
- o3 = Instance.new("Model")
- o4 = Instance.new("Part")
- o5 = Instance.new("SpecialMesh")
- o6 = Instance.new("Part")
- o7 = Instance.new("Part")
- o8 = Instance.new("Part")
- o9 = Instance.new("Part")
- o10 = Instance.new("Part")
- o3.Parent = mas
- o4.Parent = o3
- o4.BrickColor = BrickColor.new("Dark stone grey")
- o4.Transparency = 0.30000001192093
- o4.Position = Vector3.new(-19.7996979, 32.7543106, 52)
- o4.Rotation = Vector3.new(-86.5400009, 29.9599991, -1.73000002)
- o4.Size = Vector3.new(4, 2.4000001, 2)
- o4.CFrame = CFrame.new(-19.7996979, 32.7543106, 52, 0.865938365, 0.0261758789, 0.499465615, -0.500151098, 0.0453196988, 0.864751697, 1.86264537e-09, -0.998629689, 0.052335944)
- o4.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o4.Position = Vector3.new(-19.7996979, 32.7543106, 52)
- o5.Parent = o4
- o5.MeshId = "http://www.roblox.com/asset/?id=12221720"
- o5.Scale = Vector3.new(4, 4, 4)
- o5.MeshType = Enum.MeshType.FileMesh
- o6.Parent = o3
- o6.BrickColor = BrickColor.new("Dark stone grey")
- o6.Position = Vector3.new(-26, 21.7224236, 51)
- o6.Rotation = Vector3.new(-90, -59.9899979, 90)
- o6.Size = Vector3.new(4, 9.60000038, 4)
- o6.CFrame = CFrame.new(-26, 21.7224236, 51, 0, -0.500150919, -0.865937889, 0, -0.865937889, 0.500150919, -1, 0, 0)
- o6.BottomSurface = Enum.SurfaceType.Smooth
- o6.TopSurface = Enum.SurfaceType.Smooth
- o6.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o6.Position = Vector3.new(-26, 21.7224236, 51)
- o7.Parent = o3
- o7.BrickColor = BrickColor.new("Dark stone grey")
- o7.Position = Vector3.new(-32, 16.7224045, 51)
- o7.Rotation = Vector3.new(0, 90, 0)
- o7.Size = Vector3.new(4, 9.60000038, 8)
- o7.CFrame = CFrame.new(-32, 16.7224045, 51, -0, 0, 1, -0, 1, 0, -1, 0, 0)
- o7.TopSurface = Enum.SurfaceType.Smooth
- o7.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o7.Position = Vector3.new(-32, 16.7224045, 51)
- o8.Parent = o3
- o8.BrickColor = BrickColor.new("Dark stone grey")
- o8.Position = Vector3.new(-39.0000038, 17.5224171, 51)
- o8.Rotation = Vector3.new(90, 69, -90)
- o8.Size = Vector3.new(4, 9.60000038, 4)
- o8.CFrame = CFrame.new(-39.0000038, 17.5224171, 51, 0, 0.358368039, 0.933580935, 0, 0.933580935, -0.358368039, -1, 0, 0)
- o8.BottomSurface = Enum.SurfaceType.Smooth
- o8.TopSurface = Enum.SurfaceType.Smooth
- o8.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o8.Position = Vector3.new(-39.0000038, 17.5224171, 51)
- o9.Parent = o3
- o9.BrickColor = BrickColor.new("Dark stone grey")
- o9.Position = Vector3.new(-29, 7.72241306, 51)
- o9.Rotation = Vector3.new(-90, 75, 90)
- o9.Size = Vector3.new(4, 10.8000002, 4)
- o9.CFrame = CFrame.new(-29, 7.72241306, 51, 0, -0.258819133, 0.96592629, 0, 0.96592629, 0.258819133, -1, 0, 0)
- o9.TopSurface = Enum.SurfaceType.Smooth
- o9.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o9.Position = Vector3.new(-29, 7.72241306, 51)
- o10.Parent = o3
- o10.BrickColor = BrickColor.new("Dark stone grey")
- o10.Position = Vector3.new(-34, 7.12241077, 51)
- o10.Rotation = Vector3.new(0, 90, 0)
- o10.Size = Vector3.new(4, 9.60000038, 4)
- o10.CFrame = CFrame.new(-34, 7.12241077, 51, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- o10.TopSurface = Enum.SurfaceType.Smooth
- o10.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o10.Position = Vector3.new(-34, 7.12241077, 51)
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = workspace
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
- mess_handle.Text = "Resetting"
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- v:LoadCharacter()
- end
- wait(1)
- mess_handle:Remove()
- end,o4)
- o5.Parent = mas
- o6.Parent = o5
- o7.Parent = o6
- o7.BrickColor = BrickColor.new("Dark stone grey")
- o7.Transparency = 0.30000001192093
- o7.Position = Vector3.new(-19.7996979, 32.7543106, 52)
- o7.Rotation = Vector3.new(-86.5400009, 29.9599991, -1.73000002)
- o7.Anchored = true
- o7.Size = Vector3.new(4, 2.4000001, 2)
- o7.CFrame = CFrame.new(-19.7996979, 32.7543106, 52, 0.865948319, 0.0261648297, 0.499448657, -0.500133574, 0.0452957153, 0.864762843, 3.50177288e-06, -0.998630941, 0.0523096323)
- o7.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o7.Position = Vector3.new(-19.7996979, 32.7543106, 52)
- o8.Parent = o7
- o8.MeshId = "http://www.roblox.com/asset/?id=12221720"
- o8.Scale = Vector3.new(4, 4, 4)
- o8.MeshType = Enum.MeshType.FileMesh
- o9.Parent = o6
- o9.BrickColor = BrickColor.new("Dark stone grey")
- o9.Position = Vector3.new(-26, 21.7224236, 51)
- o9.Rotation = Vector3.new(-90, -59.9899979, 90)
- o9.Anchored = true
- o9.Size = Vector3.new(4, 9.60000038, 4)
- o9.CFrame = CFrame.new(-26, 21.7224236, 51, 3.40938568e-05, -0.500193477, -0.86591363, -9.14931297e-06, -0.86591363, 0.500193477, -1, -9.14931297e-06, -3.40938568e-05)
- o9.BottomSurface = Enum.SurfaceType.Smooth
- o9.TopSurface = Enum.SurfaceType.Smooth
- o9.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o9.Position = Vector3.new(-26, 21.7224236, 51)
- o10.Parent = o6
- o10.BrickColor = BrickColor.new("Dark stone grey")
- o10.Position = Vector3.new(-32, 16.7224045, 51)
- o10.Rotation = Vector3.new(0, 90, 0)
- o10.Anchored = true
- o10.Size = Vector3.new(4, 9.60000038, 8)
- o10.CFrame = CFrame.new(-32, 16.7224045, 51, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o10.TopSurface = Enum.SurfaceType.Smooth
- o10.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o10.Position = Vector3.new(-32, 16.7224045, 51)
- o11.Parent = o6
- o11.BrickColor = BrickColor.new("Dark stone grey")
- o11.Position = Vector3.new(-39.0000038, 17.5224171, 51)
- o11.Rotation = Vector3.new(90.0099945, 69, -90.0099945)
- o11.Anchored = true
- o11.Size = Vector3.new(4, 9.60000038, 4)
- o11.CFrame = CFrame.new(-39.0000038, 17.5224171, 51, -4.99486923e-05, 0.358418405, 0.933561087, 9.2536211e-06, 0.933561087, -0.358418405, -1, -9.2536211e-06, -4.99486923e-05)
- o11.BottomSurface = Enum.SurfaceType.Smooth
- o11.TopSurface = Enum.SurfaceType.Smooth
- o11.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o11.Position = Vector3.new(-39.0000038, 17.5224171, 51)
- o12.Parent = o6
- o12.BrickColor = BrickColor.new("Dark stone grey")
- o12.Position = Vector3.new(-29, 7.72241306, 51)
- o12.Rotation = Vector3.new(-90, 75, 90)
- o12.Anchored = true
- o12.Size = Vector3.new(4, 10.8000002, 4)
- o12.CFrame = CFrame.new(-29, 7.72241306, 51, -1.26361847e-05, -0.258770168, 0.965938866, -1.68383121e-06, 0.965938926, 0.258770168, -0.99999994, 1.68383121e-06, -1.26361847e-05)
- o12.TopSurface = Enum.SurfaceType.Smooth
- o12.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o12.Position = Vector3.new(-29, 7.72241306, 51)
- o13.Parent = o6
- o13.BrickColor = BrickColor.new("Dark stone grey")
- o13.Position = Vector3.new(-34, 7.12241077, 51)
- o13.Rotation = Vector3.new(0, 90, 0)
- o13.Anchored = true
- o13.Size = Vector3.new(4, 9.60000038, 4)
- o13.CFrame = CFrame.new(-34, 7.12241077, 51, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o13.TopSurface = Enum.SurfaceType.Smooth
- o13.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o13.Position = Vector3.new(-34, 7.12241077, 51)
- o14.Name = "timetodie23232223"
- o14.Parent = mas
- o14.Archivable = false
- o14.PrimaryPart = o15
- o15.Name = "Head"
- o15.Parent = o14
- o15.BrickColor = BrickColor.new("Pastel brown")
- o15.Position = Vector3.new(-24.0668049, 6.47494841, 40.683567)
- o15.Rotation = Vector3.new(-0.269999981, -34.9199982, -0.159999996)
- o15.Locked = true
- o15.FormFactor = Enum.FormFactor.Symmetric
- o15.Size = Vector3.new(2, 1, 1)
- o15.CFrame = CFrame.new(-24.0668049, 6.47494841, 40.683567, 0.819974363, 0.00224036095, -0.572395802, -1.41710725e-05, 0.99999243, 0.00389366131, 0.572400212, -0.00318458513, 0.819968224)
- o15.TopSurface = Enum.SurfaceType.Smooth
- o15.Color = Color3.new(1, 0.8, 0.6)
- o15.Position = Vector3.new(-24.0668049, 6.47494841, 40.683567)
- o16.Parent = o15
- o16.Scale = Vector3.new(1.25, 1.25, 1.25)
- o21.Name = "GettingUp"
- o21.Parent = o15
- o21.Archivable = false
- o21.SoundId = "rbxasset://sounds/action_get_up.mp3"
- o21.Volume = 0.64999997615814
- o22.Name = "CharacterSoundEvent"
- o22.Parent = o21
- o23.Name = "Died"
- o23.Parent = o15
- o23.Archivable = false
- o23.SoundId = "rbxasset://sounds/uuhhh.mp3"
- o23.Volume = 0.64999997615814
- o24.Name = "CharacterSoundEvent"
- o24.Parent = o23
- o25.Name = "FreeFalling"
- o25.Parent = o15
- o25.Archivable = false
- o25.SoundId = "rbxasset://sounds/action_falling.mp3"
- o25.TimePosition = 0.20340387445407
- o25.Volume = 1
- o25.Looped = true
- o26.Name = "CharacterSoundEvent"
- o26.Parent = o25
- o27.Name = "Jumping"
- o27.Parent = o15
- o27.Archivable = false
- o27.SoundId = "rbxasset://sounds/action_jump.mp3"
- o27.Volume = 0.64999997615814
- o28.Name = "CharacterSoundEvent"
- o28.Parent = o27
- o29.Name = "Landing"
- o29.Parent = o15
- o29.Archivable = false
- o29.SoundId = "rbxasset://sounds/action_jump_land.mp3"
- o29.Volume = 1
- o30.Name = "CharacterSoundEvent"
- o30.Parent = o29
- o31.Name = "Splash"
- o31.Parent = o15
- o31.Archivable = false
- o31.SoundId = "rbxasset://sounds/impact_water.mp3"
- o31.Volume = 0.64999997615814
- o32.Name = "CharacterSoundEvent"
- o32.Parent = o31
- o33.Name = "Running"
- o33.Parent = o15
- o33.Archivable = false
- o33.Pitch = 1.8500000238419
- o33.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- o33.TimePosition = 0.85750264926479
- o33.Volume = 0.64999997615814
- o33.Looped = true
- o34.Name = "CharacterSoundEvent"
- o34.Parent = o33
- o35.Name = "Swimming"
- o35.Parent = o15
- o35.Archivable = false
- o35.Pitch = 1.6000000238419
- o35.SoundId = "rbxasset://sounds/action_swim.mp3"
- o35.Volume = 0.64999997615814
- o35.Looped = true
- o36.Name = "CharacterSoundEvent"
- o36.Parent = o35
- o37.Name = "Climbing"
- o37.Parent = o15
- o37.Archivable = false
- o37.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- o37.Volume = 0.64999997615814
- o37.Looped = true
- o38.Name = "CharacterSoundEvent"
- o38.Parent = o37
- o39.Name = "face"
- o39.Parent = o15
- o39.Texture = "http://www.roblox.com/asset/?id=13038247"
- o40.Name = "Torso"
- o40.Parent = o14
- o40.BrickColor = BrickColor.new("Pastel brown")
- o40.Position = Vector3.new(-24.0679245, 4.97538948, 40.6851578)
- o40.Rotation = Vector3.new(0, -35.1300011, 0)
- o40.Locked = true
- o40.FormFactor = Enum.FormFactor.Symmetric
- o40.Size = Vector3.new(2, 2, 1)
- o40.CFrame = CFrame.new(-24.0679245, 4.97538948, 40.6851578, 0.817877471, -1.04487619e-07, -0.575392425, 5.639804e-08, 1, -1.01428057e-07, 0.575392425, 5.05047169e-08, 0.817877471)
- o40.LeftSurface = Enum.SurfaceType.Weld
- o40.RightSurface = Enum.SurfaceType.Weld
- o40.Color = Color3.new(1, 0.8, 0.6)
- o40.Position = Vector3.new(-24.0679245, 4.97538948, 40.6851578)
- o41.Name = "roblox"
- o41.Parent = o40
- o50.Name = "Right Shoulder"
- o50.Parent = o40
- o50.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o50.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o50.Part0 = o40
- o50.Part1 = o58
- o50.CurrentAngle = 0.0067748897708952
- o50.MaxVelocity = 0.10000000149012
- o51.Name = "Left Shoulder"
- o51.Parent = o40
- o51.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o51.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o51.Part0 = o40
- o51.Part1 = o55
- o51.CurrentAngle = -0.0048912507481873
- o51.MaxVelocity = 0.10000000149012
- o52.Name = "Right Hip"
- o52.Parent = o40
- o52.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o52.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o52.Part0 = o40
- o52.Part1 = o63
- o52.MaxVelocity = 0.10000000149012
- o53.Name = "Left Hip"
- o53.Parent = o40
- o53.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o53.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o53.Part0 = o40
- o53.Part1 = o61
- o53.MaxVelocity = 0.10000000149012
- o54.Name = "Neck"
- o54.Parent = o40
- o54.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o54.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o54.Part0 = o40
- o54.Part1 = o15
- o54.CurrentAngle = 0.0017011311138049
- o54.MaxVelocity = 0.10000000149012
- o55.Name = "Left Arm"
- o55.Parent = o14
- o55.BrickColor = BrickColor.new("Pastel brown")
- o55.Position = Vector3.new(-25.2920303, 4.99553108, 39.8180618)
- o55.Rotation = Vector3.new(0.0799999982, -35.6100006, 0.0299999993)
- o55.CanCollide = false
- o55.Locked = true
- o55.FormFactor = Enum.FormFactor.Symmetric
- o55.Size = Vector3.new(1, 2, 1)
- o55.CFrame = CFrame.new(-25.2920303, 4.99553108, 39.8180618, 0.812950552, -0.000495347544, -0.582332551, -0.000223319279, 0.999999285, -0.00116239686, 0.582332671, 0.00107502041, 0.812949896)
- o55.Color = Color3.new(1, 0.8, 0.6)
- o55.Position = Vector3.new(-25.2920303, 4.99553108, 39.8180618)
- o58.Name = "Right Arm"
- o58.Parent = o14
- o58.BrickColor = BrickColor.new("Pastel brown")
- o58.Position = Vector3.new(-22.8415451, 5.00299072, 41.5513611)
- o58.Rotation = Vector3.new(-0.189999998, -35.2900009, 0.049999997)
- o58.CanCollide = false
- o58.Locked = true
- o58.FormFactor = Enum.FormFactor.Symmetric
- o58.Size = Vector3.new(1, 2, 1)
- o58.CFrame = CFrame.new(-22.8415451, 5.00299072, 41.5513611, 0.816229939, -0.000772229396, -0.577726662, 0.00288561243, 0.999992073, 0.00274024741, 0.577719927, -0.0039037643, 0.816225767)
- o58.Color = Color3.new(1, 0.8, 0.6)
- o58.Position = Vector3.new(-22.8415451, 5.00299072, 41.5513611)
- o61.Name = "Left Leg"
- o61.Parent = o14
- o61.BrickColor = BrickColor.new("Pastel brown")
- o61.Position = Vector3.new(-24.4768639, 2.99952984, 40.3974609)
- o61.Rotation = Vector3.new(0, -35.1300011, 0)
- o61.CanCollide = false
- o61.Locked = true
- o61.FormFactor = Enum.FormFactor.Symmetric
- o61.Size = Vector3.new(1, 2, 1)
- o61.CFrame = CFrame.new(-24.4768639, 2.99952984, 40.3974609, 0.817877471, -1.04487619e-07, -0.575392425, 5.639804e-08, 1, -1.01428057e-07, 0.575392425, 5.05047169e-08, 0.817877471)
- o61.BottomSurface = Enum.SurfaceType.Smooth
- o61.Color = Color3.new(1, 0.8, 0.6)
- o61.Position = Vector3.new(-24.4768639, 2.99952984, 40.3974609)
- o63.Name = "Right Leg"
- o63.Parent = o14
- o63.BrickColor = BrickColor.new("Pastel brown")
- o63.Position = Vector3.new(-23.6589851, 2.99616575, 40.9728546)
- o63.Rotation = Vector3.new(0, -35.1300011, 0)
- o63.CanCollide = false
- o63.Locked = true
- o63.FormFactor = Enum.FormFactor.Symmetric
- o63.Size = Vector3.new(1, 2, 1)
- o63.CFrame = CFrame.new(-23.6589851, 2.99616575, 40.9728546, 0.817877471, -1.04487619e-07, -0.575392425, 5.639804e-08, 1, -1.01428057e-07, 0.575392425, 5.05047169e-08, 0.817877471)
- o63.BottomSurface = Enum.SurfaceType.Smooth
- o63.Color = Color3.new(1, 0.8, 0.6)
- o63.Position = Vector3.new(-23.6589851, 2.99616575, 40.9728546)
- o65.Parent = o14
- o65.RightLeg = o63
- o65.LeftLeg = o61
- o65.Torso = o68
- o68.Name = "HumanoidRootPart"
- o68.Parent = o14
- o68.Transparency = 1
- o68.Position = Vector3.new(-24.0679245, 5, 40.6851578)
- o68.Rotation = Vector3.new(0, -35.1300011, 0)
- o68.CanCollide = false
- o68.Locked = true
- o68.FormFactor = Enum.FormFactor.Symmetric
- o68.Size = Vector3.new(2, 2, 1)
- o68.CFrame = CFrame.new(-24.0679245, 5, 40.6851578, 0.817877471, -1.04487619e-07, -0.575392425, 5.639804e-08, 1, -1.01428057e-07, 0.575392425, 5.05047169e-08, 0.817877471)
- o68.BottomSurface = Enum.SurfaceType.Smooth
- o68.TopSurface = Enum.SurfaceType.Smooth
- o68.Position = Vector3.new(-24.0679245, 5, 40.6851578)
- o70.Name = "RootJoint"
- o70.Parent = o68
- o70.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o70.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o70.Part0 = o68
- o70.Part1 = o40
- o70.MaxVelocity = 0.10000000149012
- o71.Name = "Sound"
- o71.Parent = o14
- runDummyScript(function()
- --[[
- Author: @spotco
- This script creates sounds which are placed under the character head.
- These sounds are used by the "LocalSound" script.
- To modify this script, copy it to your "StarterPlayer/StarterCharacterScripts" folder keeping the same script name ("Sound").
- The default Sound script loaded for every character will then be replaced with your copy of the script.
- ]]--
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Players = game:GetService("Players")
- local SOUND_EVENT_FOLDER_NAME = "DefaultSoundEvents"
- local DEFAULT_SERVER_SOUND_EVENT_NAME = "DefaultServerSoundEvent"
- local SoundEventFolder = ReplicatedStorage:FindFirstChild(SOUND_EVENT_FOLDER_NAME)
- local DefaultServerSoundEvent = nil
- local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
- if useSoundDispatcher then
- if not SoundEventFolder then
- SoundEventFolder = Instance.new("Folder")
- SoundEventFolder.Name = SOUND_EVENT_FOLDER_NAME
- SoundEventFolder.Archivable = false
- SoundEventFolder.Parent = ReplicatedStorage
- end
- DefaultServerSoundEvent = SoundEventFolder:FindFirstChild(DEFAULT_SERVER_SOUND_EVENT_NAME)
- else
- DefaultServerSoundEvent = ReplicatedStorage:FindFirstChild(DEFAULT_SERVER_SOUND_EVENT_NAME)
- end
- if not DefaultServerSoundEvent then
- if useSoundDispatcher then
- DefaultServerSoundEvent = Instance.new("RemoteEvent", SoundEventFolder)
- else
- DefaultServerSoundEvent = Instance.new("RemoteEvent", ReplicatedStorage)
- end
- DefaultServerSoundEvent.Name = DEFAULT_SERVER_SOUND_EVENT_NAME
- DefaultServerSoundEvent.OnServerEvent:Connect(function() end)
- end
- local function CreateNewSound(name, id, looped, pitch, parent)
- local sound = Instance.new("Sound")
- sound.SoundId = id
- sound.Name = name
- sound.archivable = false
- sound.Pitch = pitch
- sound.Looped = looped
- sound.MinDistance = 5
- sound.MaxDistance = 150
- sound.Volume = 0.65
- sound.Parent = parent
- if DefaultServerSoundEvent then
- local CharacterSoundEvent = Instance.new("RemoteEvent", sound)
- CharacterSoundEvent.Name = "CharacterSoundEvent"
- CharacterSoundEvent.OnServerEvent:Connect(function(player, playing, resetPosition)
- if type(playing) ~= "boolean" then
- return
- end
- if type(resetPosition) ~= "boolean" then
- return
- end
- if player.Character ~= script.Parent then
- return
- end
- for _, p in pairs(Players:GetPlayers()) do
- if p ~= player then
- -- Connect to the dispatcher to check if the player has loaded.
- if useSoundDispatcher then
- SoundEventFolder:FindFirstChild("SoundDispatcher"):Fire(p, sound, playing, resetPosition)
- else
- DefaultServerSoundEvent:FireClient(p, sound, playing, resetPosition)
- end
- end
- end
- end)
- end
- return sound
- end
- local head = script.Parent:FindFirstChild("Head")
- if not head then
- error("Sound script parent has no child Head.")
- return
- end
- CreateNewSound("GettingUp", "rbxasset://sounds/action_get_up.mp3", false, 1, head)
- CreateNewSound("Died", "rbxasset://sounds/uuhhh.mp3", false, 1, head)
- CreateNewSound("FreeFalling", "rbxasset://sounds/action_falling.mp3", true, 1, head)
- CreateNewSound("Jumping", "rbxasset://sounds/action_jump.mp3", false, 1, head)
- CreateNewSound("Landing", "rbxasset://sounds/action_jump_land.mp3", false, 1, head)
- CreateNewSound("Splash", "rbxasset://sounds/impact_water.mp3", false, 1, head)
- CreateNewSound("Running", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1.85, head)
- CreateNewSound("Swimming", "rbxasset://sounds/action_swim.mp3", true, 1.6, head)
- CreateNewSound("Climbing", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1, head)
- end,o71)
- o72.Name = "LocalSound"
- o72.Parent = o71
- runDummyScript(function()
- --[[
- Author: @spotco
- This script runs locally for the player of the given humanoid.
- This script triggers humanoid sound play/pause actions locally.
- The Playing/TimePosition properties of Sound objects bypass FilteringEnabled, so this triggers the sound
- immediately for the player and is replicated to all other players.
- This script is optimized to reduce network traffic through minimizing the amount of property replication.
- ]]--
- --All sounds are referenced by this ID
- local SFX = {
- Died = 0;
- Running = 1;
- Swimming = 2;
- Climbing = 3,
- Jumping = 4;
- GettingUp = 5;
- FreeFalling = 6;
- FallingDown = 7;
- Landing = 8;
- Splash = 9;
- }
- local useUpdatedLocalSoundFlag = UserSettings():IsUserFeatureEnabled("UserFixCharacterSoundIssues")
- local Humanoid = nil
- local Head = nil
- --SFX ID to Sound object
- local Sounds = {}
- local SoundService = game:GetService("SoundService")
- local soundEventFolderName = "DefaultSoundEvents"
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local AddCharacterLoadedEvent = nil
- local RemoveCharacterEvent = nil
- local soundEventFolder = ReplicatedStorage:FindFirstChild(soundEventFolderName)
- local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
- if useSoundDispatcher then
- if not soundEventFolder then
- soundEventFolder = Instance.new("Folder", ReplicatedStorage)
- soundEventFolder.Name = soundEventFolderName
- soundEventFolder.Archivable = false
- end
- -- Load the RemoveCharacterEvent
- RemoveCharacterEvent = soundEventFolder:FindFirstChild("RemoveCharacterEvent")
- if RemoveCharacterEvent == nil then
- RemoveCharacterEvent = Instance.new("RemoteEvent", soundEventFolder)
- RemoveCharacterEvent.Name = "RemoveCharacterEvent"
- end
- AddCharacterLoadedEvent = soundEventFolder:FindFirstChild("AddCharacterLoadedEvent")
- if AddCharacterLoadedEvent == nil then
- AddCharacterLoadedEvent = Instance.new("RemoteEvent", soundEventFolder)
- AddCharacterLoadedEvent.Name = "AddCharacterLoadedEvent"
- end
- -- Notify the server a new character has been loaded
- AddCharacterLoadedEvent:FireServer()
- -- Notify the sound dispatcher this character has left.
- game.Players.LocalPlayer.CharacterRemoving:connect(function(character)
- RemoveCharacterEvent:FireServer(game.Players.LocalPlayer)
- end)
- end
- do
- local Figure = script.Parent.Parent
- Head = Figure:WaitForChild("Head")
- while not Humanoid do
- for _,NewHumanoid in pairs(Figure:GetChildren()) do
- if NewHumanoid:IsA("Humanoid") then
- Humanoid = NewHumanoid
- break
- end
- end
- if Humanoid then break end
- Figure.ChildAdded:wait()
- end
- Sounds[SFX.Died] = Head:WaitForChild("Died")
- Sounds[SFX.Running] = Head:WaitForChild("Running")
- Sounds[SFX.Swimming] = Head:WaitForChild("Swimming")
- Sounds[SFX.Climbing] = Head:WaitForChild("Climbing")
- Sounds[SFX.Jumping] = Head:WaitForChild("Jumping")
- Sounds[SFX.GettingUp] = Head:WaitForChild("GettingUp")
- Sounds[SFX.FreeFalling] = Head:WaitForChild("FreeFalling")
- Sounds[SFX.Landing] = Head:WaitForChild("Landing")
- Sounds[SFX.Splash] = Head:WaitForChild("Splash")
- local DefaultServerSoundEvent = nil
- if useSoundDispatcher then
- DefaultServerSoundEvent = soundEventFolder:FindFirstChild("DefaultServerSoundEvent")
- else
- DefaultServerSoundEvent = game:GetService("ReplicatedStorage"):FindFirstChild("DefaultServerSoundEvent")
- end
- if DefaultServerSoundEvent then
- DefaultServerSoundEvent.OnClientEvent:connect(function(sound, playing, resetPosition)
- if resetPosition and sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if sound.IsPlaying ~= playing then
- sound.Playing = playing
- end
- end)
- end
- end
- local IsSoundFilteringEnabled = function()
- return game.Workspace.FilteringEnabled and SoundService.RespectFilteringEnabled
- end
- local Util
- Util = {
- --Define linear relationship between (pt1x,pt2x) and (pt2x,pt2y). Evaluate this at x.
- YForLineGivenXAndTwoPts = function(x,pt1x,pt1y,pt2x,pt2y)
- --(y - y1)/(x - x1) = m
- local m = (pt1y - pt2y) / (pt1x - pt2x)
- --float b = pt1.y - m * pt1.x;
- local b = (pt1y - m * pt1x)
- return m * x + b
- end;
- --Clamps the value of "val" between the "min" and "max"
- Clamp = function(val,min,max)
- return math.min(max,math.max(min,val))
- end;
- --Gets the horizontal (x,z) velocity magnitude of the given part
- HorizontalSpeed = function(Head)
- local hVel = Head.Velocity + Vector3.new(0,-Head.Velocity.Y,0)
- return hVel.magnitude
- end;
- --Gets the vertical (y) velocity magnitude of the given part
- VerticalSpeed = function(Head)
- return math.abs(Head.Velocity.Y)
- end;
- --Setting Playing/TimePosition values directly result in less network traffic than Play/Pause/Resume/Stop
- --If these properties are enabled, use them.
- Play = function(sound)
- if IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(true, true)
- end
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Pause = function(sound)
- if IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(false, false)
- end
- if sound.IsPlaying then
- sound.Playing = false
- end
- end;
- Resume = function(sound)
- if IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(true, false)
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Stop = function(sound)
- if IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(false, true)
- end
- if sound.IsPlaying then
- sound.Playing = false
- end
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- end;
- }
- do
- -- List of all active Looped sounds
- local playingLoopedSounds = {}
- -- Last seen Enum.HumanoidStateType
- local activeState = nil
- local fallSpeed = 0
- -- Verify and set that "sound" is in "playingLoopedSounds".
- function setSoundInPlayingLoopedSounds(sound)
- for i=1, #playingLoopedSounds do
- if playingLoopedSounds[i] == sound then
- return
- end
- end
- table.insert(playingLoopedSounds,sound)
- end
- -- Stop all active looped sounds except parameter "except". If "except" is not passed, all looped sounds will be stopped.
- function stopPlayingLoopedSoundsExcept(except)
- for i=#playingLoopedSounds,1,-1 do
- if playingLoopedSounds[i] ~= except then
- Util.Pause(playingLoopedSounds[i])
- table.remove(playingLoopedSounds,i)
- end
- end
- end
- -- Table of Enum.HumanoidStateType to handling function
- local stateUpdateHandler = {
- [Enum.HumanoidStateType.Dead] = function()
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.Died]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.RunningNoPhysics] = function(speed)
- stateUpdated(Enum.HumanoidStateType.Running, speed)
- end;
- [Enum.HumanoidStateType.Running] = function(speed)
- local sound = Sounds[SFX.Running]
- stopPlayingLoopedSoundsExcept(sound)
- if(useUpdatedLocalSoundFlag and activeState == Enum.HumanoidStateType.Freefall and fallSpeed > 0.1) then
- -- Play a landing sound if the character dropped from a large distance
- local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
- local freeFallSound = Sounds[SFX.FreeFalling]
- freeFallSound.Volume = vol
- Util.Play(freeFallSound)
- fallSpeed = 0
- end
- if useUpdatedLocalSoundFlag then
- if speed ~= nil and speed > 0.5 then
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- elseif speed ~= nil then
- stopPlayingLoopedSoundsExcept()
- end
- else
- if Util.HorizontalSpeed(Head) > 0.5 then
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- else
- stopPlayingLoopedSoundsExcept()
- end
- end
- end;
- [Enum.HumanoidStateType.Swimming] = function(speed)
- local threshold
- if useUpdatedLocalSoundFlag then threshold = speed else threshold = Util.VerticalSpeed(Head) end
- if activeState ~= Enum.HumanoidStateType.Swimming and threshold > 0.1 then
- local splashSound = Sounds[SFX.Splash]
- splashSound.Volume = Util.Clamp(
- Util.YForLineGivenXAndTwoPts(
- Util.VerticalSpeed(Head),
- 100, 0.28,
- 350, 1),
- 0,1)
- Util.Play(splashSound)
- end
- do
- local sound = Sounds[SFX.Swimming]
- stopPlayingLoopedSoundsExcept(sound)
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- end
- end;
- [Enum.HumanoidStateType.Climbing] = function(speed)
- local sound = Sounds[SFX.Climbing]
- if useUpdatedLocalSoundFlag then
- if speed ~= nil and math.abs(speed) > 0.1 then
- Util.Resume(sound)
- stopPlayingLoopedSoundsExcept(sound)
- else
- Util.Pause(sound)
- stopPlayingLoopedSoundsExcept(sound)
- end
- else
- if Util.VerticalSpeed(Head) > 0.1 then
- Util.Resume(sound)
- stopPlayingLoopedSoundsExcept(sound)
- else
- stopPlayingLoopedSoundsExcept()
- end
- end
- setSoundInPlayingLoopedSounds(sound)
- end;
- [Enum.HumanoidStateType.Jumping] = function()
- if activeState == Enum.HumanoidStateType.Jumping then
- return
- end
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.Jumping]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.GettingUp] = function()
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.GettingUp]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.Freefall] = function()
- if activeState == Enum.HumanoidStateType.Freefall then
- return
- end
- local sound = Sounds[SFX.FreeFalling]
- sound.Volume = 0
- stopPlayingLoopedSoundsExcept()
- fallSpeed = math.max(fallSpeed, math.abs(Head.Velocity.y))
- end;
- [Enum.HumanoidStateType.FallingDown] = function()
- stopPlayingLoopedSoundsExcept()
- end;
- [Enum.HumanoidStateType.Landed] = function()
- stopPlayingLoopedSoundsExcept()
- if Util.VerticalSpeed(Head) > 75 then
- local landingSound = Sounds[SFX.Landing]
- landingSound.Volume = Util.Clamp(
- Util.YForLineGivenXAndTwoPts(
- Util.VerticalSpeed(Head),
- 50, 0,
- 100, 1),
- 0,1)
- Util.Play(landingSound)
- end
- end;
- [Enum.HumanoidStateType.Seated] = function()
- stopPlayingLoopedSoundsExcept()
- end;
- }
- -- Handle state event fired or OnChange fired
- function stateUpdated(state, speed)
- if stateUpdateHandler[state] ~= nil then
- if useUpdatedLocalSoundFlag and (state == Enum.HumanoidStateType.Running
- or state == Enum.HumanoidStateType.Climbing
- or state == Enum.HumanoidStateType.Swimming
- or state == Enum.HumanoidStateType.RunningNoPhysics) then
- stateUpdateHandler[state](speed)
- else
- stateUpdateHandler[state]()
- end
- end
- activeState = state
- end
- Humanoid.Died:connect( function() stateUpdated(Enum.HumanoidStateType.Dead) end)
- Humanoid.Running:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Running, speed) end)
- Humanoid.Swimming:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Swimming, speed) end)
- Humanoid.Climbing:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Climbing, speed) end)
- Humanoid.Jumping:connect( function() stateUpdated(Enum.HumanoidStateType.Jumping) end)
- Humanoid.GettingUp:connect( function() stateUpdated(Enum.HumanoidStateType.GettingUp) end)
- Humanoid.FreeFalling:connect( function() stateUpdated(Enum.HumanoidStateType.Freefall) end)
- Humanoid.FallingDown:connect( function() stateUpdated(Enum.HumanoidStateType.FallingDown) end)
- -- required for proper handling of Landed event
- Humanoid.StateChanged:connect(function(old, new)
- stateUpdated(new)
- end)
- function onUpdate(stepDeltaSeconds, tickSpeedSeconds)
- local stepScale = stepDeltaSeconds / tickSpeedSeconds
- do
- local sound = Sounds[SFX.FreeFalling]
- if activeState == Enum.HumanoidStateType.Freefall then
- if Head.Velocity.Y < 0 and Util.VerticalSpeed(Head) > 75 then
- Util.Resume(sound)
- --Volume takes 1.1 seconds to go from volume 0 to 1
- local ANIMATION_LENGTH_SECONDS = 1.1
- local normalizedIncrement = tickSpeedSeconds / ANIMATION_LENGTH_SECONDS
- sound.Volume = Util.Clamp(sound.Volume + normalizedIncrement * stepScale, 0, 1)
- else
- sound.Volume = 0
- end
- else
- Util.Pause(sound)
- end
- end
- do
- local sound = Sounds[SFX.Running]
- if activeState == Enum.HumanoidStateType.Running then
- if Util.HorizontalSpeed(Head) < 0.5 then
- Util.Pause(sound)
- end
- end
- end
- end
- local lastTick = tick()
- local TICK_SPEED_SECONDS = 0.25
- while true do
- onUpdate(tick() - lastTick,TICK_SPEED_SECONDS)
- lastTick = tick()
- wait(TICK_SPEED_SECONDS)
- end
- end
- end,o72)
- o73.Name = "Health"
- o73.Parent = o14
- runDummyScript(function()
- -- Gradually regenerates the Humanoid's Health over time.
- local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
- local REGEN_STEP = 1 -- Wait this long between each regeneration step.
- --------------------------------------------------------------------------------
- local Character = script.Parent
- local Humanoid = Character:WaitForChild'Humanoid'
- --------------------------------------------------------------------------------
- while true do
- while Humanoid.Health < Humanoid.MaxHealth do
- local dt = wait(REGEN_STEP)
- local dh = dt*REGEN_RATE*Humanoid.MaxHealth
- Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
- end
- Humanoid.HealthChanged:Wait()
- end
- end,o73)
- o74.Name = "Animate"
- o74.Parent = o14
- runDummyScript(function()
- local Figure = script.Parent
- local Torso = Figure:WaitForChild("Torso")
- local RightShoulder = Torso:WaitForChild("Right Shoulder")
- local LeftShoulder = Torso:WaitForChild("Left Shoulder")
- local RightHip = Torso:WaitForChild("Right Hip")
- local LeftHip = Torso:WaitForChild("Left Hip")
- local Neck = Torso:WaitForChild("Neck")
- local Humanoid = Figure:WaitForChild("Humanoid")
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimInstance = nil
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local animTable = {}
- local animNames = {
- idle = {
- { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
- { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
- },
- run = {
- { id = "run.xml", weight = 10 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
- -- { id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
- },
- dance1 = {
- { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
- },
- }
- local dances = {"dance1", "dance2", "dance3"}
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- function configureAnimationSet(name, fileList)
- if (animTable[name] ~= nil) then
- for _, connection in pairs(animTable[name].connections) do
- connection:disconnect()
- end
- end
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- animTable[name].connections = {}
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- -- print("Loading anims " .. name)
- table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
- table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- if (childPart:IsA("Animation")) then
- table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- Setup animation objects
- function scriptChildModified(child)
- local fileList = animNames[child.Name]
- if (fileList ~= nil) then
- configureAnimationSet(child.Name, fileList)
- end
- end
- script.ChildAdded:connect(scriptChildModified)
- script.ChildRemoved:connect(scriptChildModified)
- for name, fileList in pairs(animNames) do
- configureAnimationSet(name, fileList)
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.3
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.3
- local jumpMaxLimbVelocity = 0.75
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- currentAnimInstance = nil
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- return oldAnim
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- function keyFrameReachedFunc(frameName)
- if (frameName == "End") then
- local repeatAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
- repeatAnim = "idle"
- end
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.0, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- switch animation
- if (anim ~= currentAnimInstance) then
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop(transitionTime)
- currentAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- -- load it to the humanoid; get AnimationTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- currentAnimTrack.Priority = Enum.AnimationPriority.Core
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- currentAnimInstance = anim
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolAnimTrack = nil
- local toolAnimInstance = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid, priority)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- if (toolAnimInstance ~= anim) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- -- load it to the humanoid; get AnimationTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- if priority then
- toolAnimTrack.Priority = priority
- end
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- toolAnimInstance = anim
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- toolAnimInstance = nil
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed > 0.01 then
- playAnimation("walk", 0.1, Humanoid)
- if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
- setAnimationSpeed(speed / 14.5)
- end
- pose = "Running"
- else
- if emoteNames[currentAnim] == nil then
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / 12.0)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed > 0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
- return
- end
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- playAnimation("sit", 0.5, Humanoid)
- return
- elseif (pose == "Running") then
- playAnimation("walk", 0.1, Humanoid)
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- -- print("Wha " .. pose)
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- if (setAngles) then
- local desiredAngle = amplitude * math.sin(time * frequency)
- RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
- LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
- RightHip:SetDesiredAngle(-desiredAngle)
- LeftHip:SetDesiredAngle(-desiredAngle)
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool and tool:FindFirstChild("Handle") then
- local animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- stopToolAnimations()
- toolAnim = "None"
- toolAnimInstance = nil
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- -- setup emote chat hook
- game:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
- local emote = ""
- if msg == "/e dance" then
- emote = dances[math.random(1, #dances)]
- elseif (string.sub(msg, 1, 3) == "/e ") then
- emote = string.sub(msg, 4)
- elseif (string.sub(msg, 1, 7) == "/emote ") then
- emote = string.sub(msg, 8)
- end
- if (pose == "Standing" and emoteNames[emote] ~= nil) then
- playAnimation(emote, 0.1, Humanoid)
- end
- end)
- -- main program
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent ~= nil do
- local _, time = wait(0.1)
- move(time)
- end
- end,o74)
- o75.Name = "idle"
- o75.Parent = o74
- o76.Name = "Animation1"
- o76.Parent = o75
- o76.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- o77.Name = "Weight"
- o77.Parent = o76
- o77.Value = 9
- o78.Name = "Animation2"
- o78.Parent = o75
- o78.AnimationId = "http://www.roblox.com/asset/?id=180435792"
- o79.Name = "Weight"
- o79.Parent = o78
- o79.Value = 1
- o80.Name = "walk"
- o80.Parent = o74
- o81.Name = "WalkAnim"
- o81.Parent = o80
- o81.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- o82.Name = "run"
- o82.Parent = o74
- o83.Name = "RunAnim"
- o83.Parent = o82
- o83.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- o84.Name = "jump"
- o84.Parent = o74
- o85.Name = "JumpAnim"
- o85.Parent = o84
- o85.AnimationId = "http://www.roblox.com/asset/?id=125750702"
- o86.Name = "climb"
- o86.Parent = o74
- o87.Name = "ClimbAnim"
- o87.Parent = o86
- o87.AnimationId = "http://www.roblox.com/asset/?id=180436334"
- o88.Name = "toolnone"
- o88.Parent = o74
- o89.Name = "ToolNoneAnim"
- o89.Parent = o88
- o89.AnimationId = "http://www.roblox.com/asset/?id=182393478"
- o90.Name = "fall"
- o90.Parent = o74
- o91.Name = "FallAnim"
- o91.Parent = o90
- o91.AnimationId = "http://www.roblox.com/asset/?id=180436148"
- o92.Name = "sit"
- o92.Parent = o74
- o93.Name = "SitAnim"
- o93.Parent = o92
- o93.AnimationId = "http://www.roblox.com/asset/?id=178130996"
- o94.Name = "ScaleDampeningPercent"
- o94.Parent = o74
- o94.Value = 0.39999997615814
- o95.Parent = o14
- o95.HeadColor = BrickColor.new("Pastel brown")
- o95.LeftArmColor = BrickColor.new("Pastel brown")
- o95.LeftLegColor = BrickColor.new("Pastel brown")
- o95.RightArmColor = BrickColor.new("Pastel brown")
- o95.RightLegColor = BrickColor.new("Pastel brown")
- o95.TorsoColor = BrickColor.new("Pastel brown")
- o96.Name = "Pants"
- o96.Parent = o14
- o96.PantsTemplate = "http://www.roblox.com/asset/?id=1439542143"
- o98.Name = "Handle"
- o98.Parent = mas
- o98.Position = Vector3.new(-24.0806046, 6.87327433, 40.703331)
- o98.Rotation = Vector3.new(-0.239999995, -34.9300003, -0.140000001)
- o98.CanCollide = false
- o98.Locked = true
- o98.FormFactor = Enum.FormFactor.Custom
- o98.Size = Vector3.new(1.45002651, 2.35999823, 1.24000001)
- o98.CFrame = CFrame.new(-24.0806046, 6.87327433, 40.703331, 0.81987673, 0.00198863354, -0.572536647, -1.19155866e-05, 0.99999404, 0.00345628988, 0.572540045, -0.00282691, 0.819871843)
- o98.BottomSurface = Enum.SurfaceType.Smooth
- o98.TopSurface = Enum.SurfaceType.Smooth
- o98.Position = Vector3.new(-24.0806046, 6.87327433, 40.703331)
- o99.Parent = o98
- o99.MeshId = "http://www.roblox.com/asset/?id=188565062 "
- o99.TextureId = "http://www.roblox.com/asset/?id=188565095 "
- o99.MeshType = Enum.MeshType.FileMesh
- o101.Name = "OriginalSize"
- o101.Parent = o98
- o101.Value = Vector3.new(1.45002651, 2.35999823, 1.24000001)
- o102.Name = "AccessoryWeld"
- o102.Parent = o98
- o102.C0 = CFrame.new(8.65748007e-09, 0.199999809, -0.0252722446, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o102.C1 = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o102.Part0 = o98
- o102.Part1 = o15
- o103.Name = "Shirt"
- o103.Parent = o14
- o103.ShirtTemplate = "http://www.roblox.com/asset/?id=1439532842"
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = workspace
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
- mess_handle.Text = "Resetting"
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- v:LoadCharacter()
- end
- wait(1)
- mess_handle:Remove()
- end,o96)
- o97.Parent = mas
- o98.Name = "Infected"
- o98.Parent = o97
- o98.BrickColor = BrickColor.new("Bright violet")
- o98.Position = Vector3.new(-28, 9.27394962, 73)
- o98.Rotation = Vector3.new(0, -90, 0)
- o98.Anchored = true
- o98.FormFactor = Enum.FormFactor.Plate
- o98.Size = Vector3.new(4, 1.20000005, 4)
- o98.CFrame = CFrame.new(-28, 9.27394962, 73, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o98.TopSurface = Enum.SurfaceType.Smooth
- o98.Color = Color3.new(0.419608, 0.196078, 0.486275)
- o98.Position = Vector3.new(-28, 9.27394962, 73)
- o99.Name = "Regen"
- o99.Parent = o98
- runDummyScript(function()
- --Made by darkwings125, just group with the model to get it to work. This button also works for planes.
- --Do not change anything besides the lines mentioned below.
- model = script.Parent.Parent--Indicates that the script interacts with the model the button is grouped with.
- messageText = ""--If you want a message to appear upon pressing, type it here.
- message = Instance.new("Message")
- message.Text = messageText
- backup = model:clone()
- enabled = true
- function regenerate()
- message.Parent = game.Workspace
- model:remove()
- wait(0.1)--Change this number to display the regen message as long as you want in seconds.
- model = backup:clone()
- model.Parent = game.Workspace
- model:makeJoints()
- message.Parent = nil
- script.Disabled = true
- script.Parent.BrickColor = BrickColor.new(26)--Black
- wait(5)--Change this number to change the time in between regenerations via the button, in seconds..
- script.Parent.BrickColor = BrickColor.new(104)--Purple
- script.Disabled = false
- end
- function onHit(hit)
- if (hit.Parent:FindFirstChild("Humanoid") ~= nil) and enabled then
- regenerate()
- end
- end
- script.Parent.Touched:connect(onHit)
- --And it's done. If there's anything wrong with this button, PM me. -EdduTheArdo
- end,o99)
- o100.Name = "GoldenMechV2"
- o100.Parent = o97
- o101.Parent = o100
- o101.BrickColor = BrickColor.new("Really black")
- o101.Position = Vector3.new(-43.4783554, 7.46022511, 44.9495049)
- o101.Rotation = Vector3.new(-179.959991, -3.31999993, 179.899994)
- o101.FormFactor = Enum.FormFactor.Symmetric
- o101.Size = Vector3.new(7, 3, 7)
- o101.CFrame = CFrame.new(-43.4783554, 7.46022511, 44.9495049, -0.99831754, -0.00174688792, -0.0579567961, -0.00179327442, 0.999998093, 0.000748362683, 0.0579553805, 0.000851036049, -0.998318791)
- o101.BottomSurface = Enum.SurfaceType.Smooth
- o101.TopSurface = Enum.SurfaceType.Smooth
- o101.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o101.Position = Vector3.new(-43.4783554, 7.46022511, 44.9495049)
- o102.Parent = o100
- o102.BrickColor = BrickColor.new("Bright red")
- o102.Position = Vector3.new(-22.9255829, 33.2069778, 32.2562599)
- o102.Rotation = Vector3.new(-89.9499969, -0.099999994, -86.6800003)
- o102.FormFactor = Enum.FormFactor.Symmetric
- o102.Size = Vector3.new(2, 6, 2)
- o102.CFrame = CFrame.new(-22.9255829, 33.2069778, 32.2562599, 0.0579567961, 0.99831754, -0.00174688792, -0.000748362683, 0.00179327442, 0.999998093, 0.998318791, -0.0579553805, 0.000851036049)
- o102.BottomSurface = Enum.SurfaceType.Weld
- o102.TopSurface = Enum.SurfaceType.Smooth
- o102.Color = Color3.new(0.768628, 0.156863, 0.109804)
- o102.Position = Vector3.new(-22.9255829, 33.2069778, 32.2562599)
- o103.Parent = o102
- o103.Scale = Vector3.new(0.600000024, 1, 0.600000024)
- o104.Parent = o100
- o104.BrickColor = BrickColor.new("Bright red")
- o104.Position = Vector3.new(-48.0344276, 40.1448364, 53.7528191)
- o104.Rotation = Vector3.new(1.76999998, -86.6800003, 1.73000002)
- o104.FormFactor = Enum.FormFactor.Symmetric
- o104.Size = Vector3.new(10, 8, 3)
- o104.CFrame = CFrame.new(-48.0344276, 40.1448364, 53.7528191, 0.0579567961, -0.00174688792, -0.99831754, -0.000748362683, 0.999998093, -0.00179327442, 0.998318791, 0.000851036049, 0.0579553805)
- o104.BottomSurface = Enum.SurfaceType.Weld
- o104.TopSurface = Enum.SurfaceType.Smooth
- o104.Color = Color3.new(0.768628, 0.156863, 0.109804)
- o104.Position = Vector3.new(-48.0344276, 40.1448364, 53.7528191)
- o105.Parent = o104
- o105.Texture = "http://www.roblox.com/asset/?id=26729786"
- o105.Face = Enum.NormalId.Back
- o106.Parent = o100
- o106.BrickColor = BrickColor.new("Bright red")
- o106.Position = Vector3.new(-29.1571808, 31.1582794, 76.6905899)
- o106.Rotation = Vector3.new(-89.9499969, -0.099999994, -86.6800003)
- o106.FormFactor = Enum.FormFactor.Symmetric
- o106.Size = Vector3.new(2, 10, 2)
- o106.CFrame = CFrame.new(-29.1571808, 31.1582794, 76.6905899, 0.0579567961, 0.99831754, -0.00174688792, -0.000748362683, 0.00179327442, 0.999998093, 0.998318791, -0.0579553805, 0.000851036049)
- o106.BottomSurface = Enum.SurfaceType.Weld
- o106.TopSurface = Enum.SurfaceType.Smooth
- o106.Color = Color3.new(0.768628, 0.156863, 0.109804)
- o106.Position = Vector3.new(-29.1571808, 31.1582794, 76.6905899)
- o107.Parent = o106
- o107.Scale = Vector3.new(0.600000024, 1, 0.600000024)
- o108.Name = "Missile"
- o108.Parent = o100
- o109.Name = "Button"
- o109.Parent = o108
- o110.Name = "Button"
- o110.Parent = o109
- o110.BrickColor = BrickColor.new("Bright green")
- o110.Reflectance = 0.5
- o110.Position = Vector3.new(-46.6083717, 57.1597786, 39.1583672)
- o110.Rotation = Vector3.new(90.0499954, 0.099999994, 86.6800003)
- o110.FormFactor = Enum.FormFactor.Plate
- o110.Size = Vector3.new(3, 0.400000006, 2)
- o110.CFrame = CFrame.new(-46.6083717, 57.1597786, 39.1583672, 0.0579567961, -0.99831754, 0.00174688792, -0.000748362683, -0.00179327442, -0.999998093, 0.998318791, 0.0579553805, -0.000851036049)
- o110.BottomSurface = Enum.SurfaceType.Weld
- o110.TopSurface = Enum.SurfaceType.Smooth
- o110.Color = Color3.new(0.294118, 0.592157, 0.294118)
- o110.Position = Vector3.new(-46.6083717, 57.1597786, 39.1583672)
- o111.Parent = o110
- o111.MaxActivationDistance = 50
- o112.Name = "Missile"
- o112.Parent = o110
- runDummyScript(function()
- -- Cannon by TankLeadfoot
- local b = Instance.new("Part")
- b.Name = "Missile"
- b.Size = Vector3.new(2, 2, 6)
- b.Color = Color3.new(0, 0, 0)
- b.CanCollide = true
- b.Anchored = false
- b.Shape = 1
- b.formFactor = 0
- b.BackSurface = 0
- b.BottomSurface = 0
- b.FrontSurface = 0
- b.LeftSurface = 0
- b.RightSurface = 0
- b.TopSurface = 0
- local m = Instance.new("SpecialMesh")
- m.MeshType = 3
- m.Parent = b
- while (script:findFirstChild("Explosion") == nil) do wait(0.1) end
- script.Explosion:Clone().Parent = b
- while (script:findFirstChild("Swoosh") == nil) do wait(0.1) end
- script.Swoosh:Clone().Parent = b
- while (script:findFirstChild("Missile") == nil) do wait(0.1) end
- script.Missile:Clone().Parent = b
- while (b:findFirstChild("Swoosh") == nil) do wait(0.1) end
- b.Swoosh:Play()
- local Lock = nil
- script.Parent.BrickColor = BrickColor.new(37)
- script.Parent.ClickDetector.MouseClick:connect(function()
- if (Lock == nil) and (script.Parent.Parent.Parent.Missiles:findFirstChild("Missile"..script.Parent.Clip.Value) ~= nil) then
- Lock = true
- script.Parent.BrickColor = BrickColor.new(21)
- b.CFrame = script.Parent.Parent.Parent.Missiles:findFirstChild("Missile"..script.Parent.Clip.Value).CFrame + (script.Parent.Parent.Parent.Missiles.Missile1.CFrame.lookVector).unit * 5
- b.Velocity = (script.Parent.Parent.Parent.Missiles.Missile1.CFrame.lookVector).unit * 500
- b:Clone().Parent = game.Workspace
- script.Parent.Clip.Value = script.Parent.Clip.Value - 1
- if (script.Parent.Clip.Value <= 0) then
- script.Parent.Clip.Value = 6
- script.Parent.BrickColor = BrickColor.new(4)
- wait(360)
- else
- wait(2)
- end
- script.Parent.BrickColor = BrickColor.new(37)
- Lock = nil
- end
- end)
- end,o112)
- o113.Name = "Missile"
- o113.Parent = o112
- runDummyScript(function()
- -- Cannon Ball by TankLeadfoot
- local b = Instance.new("Explosion")
- b.Name = "Boom"
- b.BlastRadius = 50
- local Lock = nil
- function onTouch(hit)
- if (Lock == nil) then
- Lock = true
- script.Parent.Anchored = true
- script.Parent.CanCollide = false
- script.Parent.Transparency = 1
- if (script.Parent:findFirstChild("Explosion") ~= nil) then
- script.Parent.Explosion:Play()
- end
- b.Position = script.Parent.Position
- b:Clone().Parent = script.Parent
- wait(1)
- script.Parent:Remove()
- end
- end
- script.Parent.Touched:connect(onTouch)
- end,o113)
- o114.Name = "Explosion"
- o114.Parent = o112
- o114.SoundId = "rbxasset://sounds/collide.wav"
- o114.Volume = 1
- o115.Name = "Swoosh"
- o115.Parent = o112
- o115.SoundId = "rbxasset://sounds/Rocket whoosh 01.wav"
- o115.Volume = 1
- o115.Looped = true
- o116.Name = "Clip"
- o116.Parent = o110
- o116.Value = 4
- o117.Name = "Missiles"
- o117.Parent = o108
- o118.Name = "Missile6"
- o118.Parent = o117
- o118.Transparency = 1
- o118.Position = Vector3.new(-37.3524323, 58.6738472, 41.6272049)
- o118.Rotation = Vector3.new(1.76999998, -86.6800003, 1.73000002)
- o118.CanCollide = false
- o118.FormFactor = Enum.FormFactor.Symmetric
- o118.Size = Vector3.new(1, 1, 1)
- o118.CFrame = CFrame.new(-37.3524323, 58.6738472, 41.6272049, 0.0579567961, -0.00174688792, -0.99831754, -0.000748362683, 0.999998093, -0.00179327442, 0.998318791, 0.000851036049, 0.0579553805)
- o118.BackSurface = Enum.SurfaceType.Weld
- o118.BottomSurface = Enum.SurfaceType.Smooth
- o118.TopSurface = Enum.SurfaceType.Smooth
- o118.Position = Vector3.new(-37.3524323, 58.6738472, 41.6272049)
- o119.Name = "Missile5"
- o119.Parent = o117
- o119.BrickColor = BrickColor.new("Bright red")
- o119.Transparency = 1
- o119.Position = Vector3.new(-37.5263062, 58.6760941, 38.6322479)
- o119.Rotation = Vector3.new(1.76999998, -86.6800003, 1.73000002)
- o119.CanCollide = false
- o119.FormFactor = Enum.FormFactor.Symmetric
- o119.Size = Vector3.new(1, 1, 1)
- o119.CFrame = CFrame.new(-37.5263062, 58.6760941, 38.6322479, 0.0579567961, -0.00174688792, -0.99831754, -0.000748362683, 0.999998093, -0.00179327442, 0.998318791, 0.000851036049, 0.0579553805)
- o119.BackSurface = Enum.SurfaceType.Weld
- o119.BottomSurface = Enum.SurfaceType.Smooth
- o119.TopSurface = Enum.SurfaceType.Smooth
- o119.Color = Color3.new(0.768628, 0.156863, 0.109804)
- o119.Position = Vector3.new(-37.5263062, 58.6760941, 38.6322479)
- o120.Name = "Missile4"
- o120.Parent = o117
- o120.Transparency = 1
- o120.Position = Vector3.new(-37.7001762, 58.6783371, 35.6372948)
- o120.Rotation = Vector3.new(1.76999998, -86.6800003, 1.73000002)
- o120.CanCollide = false
- o120.FormFactor = Enum.FormFactor.Symmetric
- o120.Size = Vector3.new(1, 1, 1)
- o120.CFrame = CFrame.new(-37.7001762, 58.6783371, 35.6372948, 0.0579567961, -0.00174688792, -0.99831754, -0.000748362683, 0.999998093, -0.00179327442, 0.998318791, 0.000851036049, 0.0579553805)
- o120.BackSurface = Enum.SurfaceType.Weld
- o120.BottomSurface = Enum.SurfaceType.Smooth
- o120.TopSurface = Enum.SurfaceType.Smooth
- o120.Position = Vector3.new(-37.7001762, 58.6783371, 35.6372948)
- o121.Name = "Missile3"
- o121.Parent = o117
- o121.Transparency = 1
- o121.Position = Vector3.new(-37.3471947, 55.6738548, 41.6246529)
- o121.Rotation = Vector3.new(1.76999998, -86.6800003, 1.73000002)
- o121.CanCollide = false
- o121.FormFactor = Enum.FormFactor.Symmetric
- o121.Size = Vector3.new(1, 1, 1)
- o121.CFrame = CFrame.new(-37.3471947, 55.6738548, 41.6246529, 0.0579567961, -0.00174688792, -0.99831754, -0.000748362683, 0.999998093, -0.00179327442, 0.998318791, 0.000851036049, 0.0579553805)
- o121.BackSurface = Enum.SurfaceType.Weld
- o121.BottomSurface = Enum.SurfaceType.Smooth
- o121.TopSurface = Enum.SurfaceType.Smooth
- o121.Position = Vector3.new(-37.3471947, 55.6738548, 41.6246529)
- o122.Name = "Missile2"
- o122.Parent = o117
- o122.Transparency = 1
- o122.Position = Vector3.new(-37.5210648, 55.6760979, 38.6296959)
- o122.Rotation = Vector3.new(1.76999998, -86.6800003, 1.73000002)
- o122.CanCollide = false
- o122.FormFactor = Enum.FormFactor.Symmetric
- o122.Size = Vector3.new(1, 1, 1)
- o122.CFrame = CFrame.new(-37.5210648, 55.6760979, 38.6296959, 0.0579567961, -0.00174688792, -0.99831754, -0.000748362683, 0.999998093, -0.00179327442, 0.998318791, 0.000851036049, 0.0579553805)
- o122.BackSurface = Enum.SurfaceType.Weld
- o122.BottomSurface = Enum.SurfaceType.Smooth
- o122.TopSurface = Enum.SurfaceType.Smooth
- o122.Position = Vector3.new(-37.5210648, 55.6760979, 38.6296959)
- o123.Name = "Missile1"
- o123.Parent = o117
- o123.Transparency = 1
- o123.Position = Vector3.new(-37.6949348, 55.6783447, 35.6347389)
- o123.Rotation = Vector3.new(1.76999998, -86.6800003, 1.73000002)
- o123.CanCollide = false
- o123.FormFactor = Enum.FormFactor.Symmetric
- o123.Size = Vector3.new(1, 1, 1)
- o123.CFrame = CFrame.new(-37.6949348, 55.6783447, 35.6347389, 0.0579567961, -0.00174688792, -0.99831754, -0.000748362683, 0.999998093, -0.00179327442, 0.998318791, 0.000851036049, 0.0579553805)
- o123.BackSurface = Enum.SurfaceType.Weld
- o123.BottomSurface = Enum.SurfaceType.Smooth
- o123.TopSurface = Enum.SurfaceType.Smooth
- o123.Position = Vector3.new(-37.6949348, 55.6783447, 35.6347389)
- o124.Name = "Missile"
- o124.Parent = o100
- o125.Name = "Button"
- o125.Parent = o124
- o126.Name = "Button"
- o126.Parent = o125
- o126.BrickColor = BrickColor.new("Bright green")
- o126.Reflectance = 0.5
- o126.Position = Vector3.new(-44.9276237, 57.1380806, 68.1096191)
- o126.Rotation = Vector3.new(90.0499954, 0.099999994, 86.6800003)
- o126.FormFactor = Enum.FormFactor.Plate
- o126.Size = Vector3.new(3, 0.400000006, 2)
- o126.CFrame = CFrame.new(-44.9276237, 57.1380806, 68.1096191, 0.0579567961, -0.99831754, 0.00174688792, -0.000748362683, -0.00179327442, -0.999998093, 0.998318791, 0.0579553805, -0.000851036049)
- o126.BottomSurface = Enum.SurfaceType.Weld
- o126.TopSurface = Enum.SurfaceType.Smooth
- o126.Color = Color3.new(0.294118, 0.592157, 0.294118)
- o126.Position = Vector3.new(-44.9276237, 57.1380806, 68.1096191)
- o127.Parent = o126
- o127.MaxActivationDistance = 50
- o128.Name = "Missile"
- o128.Parent = o126
- runDummyScript(function()
- -- Cannon by TankLeadfoot
- local b = Instance.new("Part")
- b.Name = "Missile"
- b.Size = Vector3.new(2, 2, 6)
- b.Color = Color3.new(0, 0, 0)
- b.CanCollide = true
- b.Anchored = false
- b.Shape = 1
- b.formFactor = 0
- b.BackSurface = 0
- b.BottomSurface = 0
- b.FrontSurface = 0
- b.LeftSurface = 0
- b.RightSurface = 0
- b.TopSurface = 0
- local m = Instance.new("SpecialMesh")
- m.MeshType = 3
- m.Parent = b
- while (script:findFirstChild("Explosion") == nil) do wait(0.1) end
- script.Explosion:Clone().Parent = b
- while (script:findFirstChild("Swoosh") == nil) do wait(0.1) end
- script.Swoosh:Clone().Parent = b
- while (script:findFirstChild("Missile") == nil) do wait(0.1) end
- script.Missile:Clone().Parent = b
- while (b:findFirstChild("Swoosh") == nil) do wait(0.1) end
- b.Swoosh:Play()
- local Lock = nil
- script.Parent.BrickColor = BrickColor.new(37)
- script.Parent.ClickDetector.MouseClick:connect(function()
- if (Lock == nil) and (script.Parent.Parent.Parent.Missiles:findFirstChild("Missile"..script.Parent.Clip.Value) ~= nil) then
- Lock = true
- script.Parent.BrickColor = BrickColor.new(21)
- b.CFrame = script.Parent.Parent.Parent.Missiles:findFirstChild("Missile"..script.Parent.Clip.Value).CFrame + (script.Parent.Parent.Parent.Missiles.Missile1.CFrame.lookVector).unit * 5
- b.Velocity = (script.Parent.Parent.Parent.Missiles.Missile1.CFrame.lookVector).unit * 500
- b:Clone().Parent = game.Workspace
- script.Parent.Clip.Value = script.Parent.Clip.Value - 1
- if (script.Parent.Clip.Value <= 0) then
- script.Parent.Clip.Value = 6
- script.Parent.BrickColor = BrickColor.new(4)
- wait(360)
- else
- wait(2)
- end
- script.Parent.BrickColor = BrickColor.new(37)
- Lock = nil
- end
- end)
- end,o128)
- o129.Name = "Missile"
- o129.Parent = o128
- runDummyScript(function()
- -- Cannon Ball by TankLeadfoot
- local b = Instance.new("Explosion")
- b.Name = "Boom"
- b.BlastRadius = 50
- local Lock = nil
- function onTouch(hit)
- if (Lock == nil) then
- Lock = true
- script.Parent.Anchored = true
- script.Parent.CanCollide = false
- script.Parent.Transparency = 1
- if (script.Parent:findFirstChild("Explosion") ~= nil) then
- script.Parent.Explosion:Play()
- end
- b.Position = script.Parent.Position
- b:Clone().Parent = script.Parent
- wait(1)
- script.Parent:Remove()
- end
- end
- script.Parent.Touched:connect(onTouch)
- end,o129)
- o130.Name = "Explosion"
- o130.Parent = o128
- o130.SoundId = "rbxasset://sounds/collide.wav"
- o130.Volume = 1
- o131.Name = "Swoosh"
- o131.Parent = o128
- o131.SoundId = "rbxasset://sounds/Rocket whoosh 01.wav"
- o131.Volume = 1
- o131.Looped = true
- o132.Name = "Clip"
- o132.Parent = o126
- o132.Value = 4
- o133.Name = "Missiles"
- o133.Parent = o124
- o134.Name = "Missile6"
- o134.Parent = o133
- o134.Transparency = 1
- o134.Position = Vector3.new(-35.6716843, 58.6521492, 70.5784607)
- o134.Rotation = Vector3.new(1.76999998, -86.6800003, 1.73000002)
- o134.CanCollide = false
- o134.FormFactor = Enum.FormFactor.Symmetric
- o134.Size = Vector3.new(1, 1, 1)
- o134.CFrame = CFrame.new(-35.6716843, 58.6521492, 70.5784607, 0.0579567961, -0.00174688792, -0.99831754, -0.000748362683, 0.999998093, -0.00179327442, 0.998318791, 0.000851036049, 0.0579553805)
- o134.BackSurface = Enum.SurfaceType.Weld
- o134.BottomSurface = Enum.SurfaceType.Smooth
- o134.TopSurface = Enum.SurfaceType.Smooth
- o134.Position = Vector3.new(-35.6716843, 58.6521492, 70.5784607)
- o135.Name = "Missile5"
- o135.Parent = o133
- o135.Transparency = 1
- o135.Position = Vector3.new(-35.8455582, 58.6543961, 67.5835037)
- o135.Rotation = Vector3.new(1.76999998, -86.6800003, 1.73000002)
- o135.CanCollide = false
- o135.FormFactor = Enum.FormFactor.Symmetric
- o135.Size = Vector3.new(1, 1, 1)
- o135.CFrame = CFrame.new(-35.8455582, 58.6543961, 67.5835037, 0.0579567961, -0.00174688792, -0.99831754, -0.000748362683, 0.999998093, -0.00179327442, 0.998318791, 0.000851036049, 0.0579553805)
- o135.BackSurface = Enum.SurfaceType.Weld
- o135.BottomSurface = Enum.SurfaceType.Smooth
- o135.TopSurface = Enum.SurfaceType.Smooth
- o135.Position = Vector3.new(-35.8455582, 58.6543961, 67.5835037)
- o136.Name = "Missile4"
- o136.Parent = o133
- o136.BrickColor = BrickColor.new("Bright red")
- o136.Transparency = 1
- o136.Position = Vector3.new(-36.0194283, 58.6566391, 64.5885468)
- o136.Rotation = Vector3.new(1.76999998, -86.6800003, 1.73000002)
- o136.CanCollide = false
- o136.FormFactor = Enum.FormFactor.Symmetric
- o136.Size = Vector3.new(1, 1, 1)
- o136.CFrame = CFrame.new(-36.0194283, 58.6566391, 64.5885468, 0.0579567961, -0.00174688792, -0.99831754, -0.000748362683, 0.999998093, -0.00179327442, 0.998318791, 0.000851036049, 0.0579553805)
- o136.BackSurface = Enum.SurfaceType.Weld
- o136.BottomSurface = Enum.SurfaceType.Smooth
- o136.TopSurface = Enum.SurfaceType.Smooth
- o136.Color = Color3.new(0.768628, 0.156863, 0.109804)
- o136.Position = Vector3.new(-36.0194283, 58.6566391, 64.5885468)
- o137.Name = "Missile3"
- o137.Parent = o133
- o137.Transparency = 1
- o137.Position = Vector3.new(-35.6664467, 55.6521568, 70.5759048)
- o137.Rotation = Vector3.new(1.76999998, -86.6800003, 1.73000002)
- o137.CanCollide = false
- o137.FormFactor = Enum.FormFactor.Symmetric
- o137.Size = Vector3.new(1, 1, 1)
- o137.CFrame = CFrame.new(-35.6664467, 55.6521568, 70.5759048, 0.0579567961, -0.00174688792, -0.99831754, -0.000748362683, 0.999998093, -0.00179327442, 0.998318791, 0.000851036049, 0.0579553805)
- o137.BackSurface = Enum.SurfaceType.Weld
- o137.BottomSurface = Enum.SurfaceType.Smooth
- o137.TopSurface = Enum.SurfaceType.Smooth
- o137.Position = Vector3.new(-35.6664467, 55.6521568, 70.5759048)
- o138.Name = "Missile2"
- o138.Parent = o133
- o138.Transparency = 1
- o138.Position = Vector3.new(-35.8403168, 55.6543999, 67.5809479)
- o138.Rotation = Vector3.new(1.76999998, -86.6800003, 1.73000002)
- o138.CanCollide = false
- o138.FormFactor = Enum.FormFactor.Symmetric
- o138.Size = Vector3.new(1, 1, 1)
- o138.CFrame = CFrame.new(-35.8403168, 55.6543999, 67.5809479, 0.0579567961, -0.00174688792, -0.99831754, -0.000748362683, 0.999998093, -0.00179327442, 0.998318791, 0.000851036049, 0.0579553805)
- o138.BackSurface = Enum.SurfaceType.Weld
- o138.BottomSurface = Enum.SurfaceType.Smooth
- o138.TopSurface = Enum.SurfaceType.Smooth
- o138.Position = Vector3.new(-35.8403168, 55.6543999, 67.5809479)
- o139.Name = "Missile1"
- o139.Parent = o133
- o139.Transparency = 1
- o139.Position = Vector3.new(-36.0141869, 55.6566467, 64.5859909)
- o139.Rotation = Vector3.new(1.76999998, -86.6800003, 1.73000002)
- o139.CanCollide = false
- o139.FormFactor = Enum.FormFactor.Symmetric
- o139.Size = Vector3.new(1, 1, 1)
- o139.CFrame = CFrame.new(-36.0141869, 55.6566467, 64.5859909, 0.0579567961, -0.00174688792, -0.99831754, -0.000748362683, 0.999998093, -0.00179327442, 0.998318791, 0.000851036049, 0.0579553805)
- o139.BackSurface = Enum.SurfaceType.Weld
- o139.BottomSurface = Enum.SurfaceType.Smooth
- o139.TopSurface = Enum.SurfaceType.Smooth
- o139.Position = Vector3.new(-36.0141869, 55.6566467, 64.5859909)
- o140.Parent = o100
- o140.BrickColor = BrickColor.new("Bright red")
- o140.Position = Vector3.new(-43.6037216, 29.4613075, 43.4707489)
- o140.Rotation = Vector3.new(0.0399999991, 3.31999993, 0.099999994)
- o140.FormFactor = Enum.FormFactor.Symmetric
- o140.Size = Vector3.new(7, 3, 4)
- o140.CFrame = CFrame.new(-43.6037216, 29.4613075, 43.4707489, 0.99831754, -0.00174688792, 0.0579567961, 0.00179327442, 0.999998093, -0.000748362683, -0.0579553805, 0.000851036049, 0.998318791)
- o140.BackSurface = Enum.SurfaceType.Weld
- o140.BottomSurface = Enum.SurfaceType.Weld
- o140.Color = Color3.new(0.768628, 0.156863, 0.109804)
- o140.Position = Vector3.new(-43.6037216, 29.4613075, 43.4707489)
- o141.Parent = o100
- o141.BrickColor = BrickColor.new("Bright red")
- o141.Position = Vector3.new(-30.4933071, 3.49379253, 44.1926575)
- o141.Rotation = Vector3.new(90.8499985, 13.5499992, 86.5800018)
- o141.FormFactor = Enum.FormFactor.Symmetric
- o141.Shape = Enum.PartType.Cylinder
- o141.Size = Vector3.new(3, 3, 3)
- o141.CFrame = CFrame.new(-30.4933071, 3.49379253, 44.1926575, 0.057942111, -0.970421553, 0.234360203, -0.000789284939, -0.234799057, -0.972043633, 0.998319626, 0.0561372824, -0.0143706929)
- o141.BottomSurface = Enum.SurfaceType.Smooth
- o141.LeftSurface = Enum.SurfaceType.Hinge
- o141.RightSurface = Enum.SurfaceType.Hinge
- o141.TopSurface = Enum.SurfaceType.Smooth
- o141.Color = Color3.new(0.768628, 0.156863, 0.109804)
- o141.Position = Vector3.new(-30.4933071, 3.49379253, 44.1926575)
- o142.Parent = o100
- o142.BrickColor = BrickColor.new("Bright red")
- o142.Position = Vector3.new(-29.5079994, 3.49877977, 61.1640854)
- o142.Rotation = Vector3.new(88.5699997, -24.2600002, 86.3600006)
- o142.FormFactor = Enum.FormFactor.Symmetric
- o142.Shape = Enum.PartType.Cylinder
- o142.Size = Vector3.new(3, 3, 3)
- o142.CFrame = CFrame.new(-29.5079994, 3.49877977, 61.1640854, 0.057957951, -0.909877658, -0.410808414, -0.00118278491, 0.411437273, -0.911437333, 0.998318315, 0.0533109382, 0.0227698702)
- o142.BottomSurface = Enum.SurfaceType.Smooth
- o142.LeftSurface = Enum.SurfaceType.Hinge
- o142.RightSurface = Enum.SurfaceType.Hinge
- o142.TopSurface = Enum.SurfaceType.Smooth
- o142.Color = Color3.new(0.768628, 0.156863, 0.109804)
- o142.Position = Vector3.new(-29.5079994, 3.49877977, 61.1640854)
- o143.Parent = o100
- o143.BrickColor = BrickColor.new("Bright red")
- o143.Position = Vector3.new(-35.4849129, 3.49484396, 44.4824371)
- o143.Rotation = Vector3.new(92.1399994, 32.1199989, 86.0800018)
- o143.FormFactor = Enum.FormFactor.Symmetric
- o143.Shape = Enum.PartType.Cylinder
- o143.Size = Vector3.new(3, 3, 3)
- o143.CFrame = CFrame.new(-35.4849129, 3.49484396, 44.4824371, 0.0579487942, -0.844944894, 0.531704843, -0.000840289518, -0.532640934, -0.846340895, 0.998319209, 0.0485976487, -0.0315758958)
- o143.BottomSurface = Enum.SurfaceType.Smooth
- o143.LeftSurface = Enum.SurfaceType.Hinge
- o143.RightSurface = Enum.SurfaceType.Hinge
- o143.TopSurface = Enum.SurfaceType.Smooth
- o143.Color = Color3.new(0.768628, 0.156863, 0.109804)
- o143.Position = Vector3.new(-35.4849129, 3.49484396, 44.4824371)
- o144.Parent = o100
- o144.BrickColor = BrickColor.new("Bright red")
- o144.Position = Vector3.new(-34.4996338, 3.48213696, 61.4538383)
- o144.Rotation = Vector3.new(95.3399963, 57.8199997, 83.75)
- o144.FormFactor = Enum.FormFactor.Symmetric
- o144.Shape = Enum.PartType.Cylinder
- o144.Size = Vector3.new(3, 3, 3)
- o144.CFrame = CFrame.new(-34.4996338, 3.48213696, 61.4538383, 0.0579573996, -0.52945894, 0.846353412, -0.000790686347, -0.847802579, -0.530311346, 0.998318732, 0.0300662667, -0.049555067)
- o144.BottomSurface = Enum.SurfaceType.Smooth
- o144.LeftSurface = Enum.SurfaceType.Hinge
- o144.RightSurface = Enum.SurfaceType.Hinge
- o144.TopSurface = Enum.SurfaceType.Smooth
- o144.Color = Color3.new(0.768628, 0.156863, 0.109804)
- o144.Position = Vector3.new(-34.4996338, 3.48213696, 61.4538383)
- o145.Parent = o100
- o145.BrickColor = BrickColor.new("Bright red")
- o145.Position = Vector3.new(-39.4781761, 3.487674, 44.7142754)
- o145.Rotation = Vector3.new(122.129997, 83.7599945, 57.7599983)
- o145.FormFactor = Enum.FormFactor.Symmetric
- o145.Shape = Enum.PartType.Cylinder
- o145.Size = Vector3.new(3, 3, 3)
- o145.CFrame = CFrame.new(-39.4781761, 3.487674, 44.7142754, 0.0579589233, -0.0918883085, 0.99408114, -0.000783773605, -0.995758891, -0.0919976979, 0.998318672, 0.00455295295, -0.0577851348)
- o145.BottomSurface = Enum.SurfaceType.Smooth
- o145.LeftSurface = Enum.SurfaceType.Hinge
- o145.RightSurface = Enum.SurfaceType.Hinge
- o145.TopSurface = Enum.SurfaceType.Smooth
- o145.Color = Color3.new(0.768628, 0.156863, 0.109804)
- o145.Position = Vector3.new(-39.4781761, 3.487674, 44.7142754)
- o146.Parent = o100
- o146.BrickColor = BrickColor.new("Bright red")
- o146.Position = Vector3.new(-38.492897, 3.47495151, 61.6856308)
- o146.Rotation = Vector3.new(-89.5400009, -7.08999968, -86.6500015)
- o146.FormFactor = Enum.FormFactor.Symmetric
- o146.Shape = Enum.PartType.Cylinder
- o146.Size = Vector3.new(3, 3, 3)
- o146.CFrame = CFrame.new(-38.492897, 3.47495151, 61.6856308, 0.0579508133, 0.990654528, -0.123471893, -0.000766836922, 0.123723879, 0.992316365, 0.998319149, -0.0574108586, 0.00792957004)
- o146.BottomSurface = Enum.SurfaceType.Smooth
- o146.LeftSurface = Enum.SurfaceType.Hinge
- o146.RightSurface = Enum.SurfaceType.Hinge
- o146.TopSurface = Enum.SurfaceType.Smooth
- o146.Color = Color3.new(0.768628, 0.156863, 0.109804)
- o146.Position = Vector3.new(-38.492897, 3.47495151, 61.6856308)
- o147.Parent = o100
- o147.BrickColor = BrickColor.new("Really black")
- o147.Position = Vector3.new(-42.1205292, 4.46479177, 42.3642235)
- o147.Rotation = Vector3.new(-179.959991, -3.31999993, 179.899994)
- o147.FormFactor = Enum.FormFactor.Symmetric
- o147.Size = Vector3.new(24, 3, 2)
- o147.CFrame = CFrame.new(-42.1205292, 4.46479177, 42.3642235, -0.99831754, -0.00174688792, -0.0579567961, -0.00179327442, 0.999998093, 0.000748362683, 0.0579553805, 0.000851036049, -0.998318791)
- o147.BackSurface = Enum.SurfaceType.Weld
- o147.BottomSurface = Enum.SurfaceType.Smooth
- o147.TopSurface = Enum.SurfaceType.Weld
- o147.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o147.Position = Vector3.new(-42.1205292, 4.46479177, 42.3642235)
- o148.Parent = o100
- o148.BrickColor = BrickColor.new("Bright red")
- o148.Position = Vector3.new(-44.4697685, 3.4786973, 45.0040512)
- o148.Rotation = Vector3.new(80.2299957, -71.1800003, 79.6500015)
- o148.FormFactor = Enum.FormFactor.Symmetric
- o148.Shape = Enum.PartType.Cylinder
- o148.Size = Vector3.new(3, 3, 3)
- o148.CFrame = CFrame.new(-44.4697685, 3.4786973, 45.0040512, 0.057945665, -0.317266703, -0.946564376, -0.000719263277, 0.948144019, -0.317840219, 0.998319507, 0.0190982912, 0.0547126345)
- o148.BottomSurface = Enum.SurfaceType.Smooth
- o148.LeftSurface = Enum.SurfaceType.Hinge
- o148.RightSurface = Enum.SurfaceType.Hinge
- o148.TopSurface = Enum.SurfaceType.Smooth
- o148.Color = Color3.new(0.768628, 0.156863, 0.109804)
- o148.Position = Vector3.new(-44.4697685, 3.4786973, 45.0040512)
- o149.Parent = o100
- o149.BrickColor = BrickColor.new("Really black")
- o149.Position = Vector3.new(-41.8307457, 4.46105003, 47.3558159)
- o149.Rotation = Vector3.new(-179.959991, -3.31999993, 179.899994)
- o149.FormFactor = Enum.FormFactor.Symmetric
- o149.Size = Vector3.new(24, 3, 2)
- o149.CFrame = CFrame.new(-41.8307457, 4.46105003, 47.3558159, -0.99831754, -0.00174688792, -0.0579567961, -0.00179327442, 0.999998093, 0.000748362683, 0.0579553805, 0.000851036049, -0.998318791)
- o149.BottomSurface = Enum.SurfaceType.Smooth
- o149.FrontSurface = Enum.SurfaceType.Weld
- o149.TopSurface = Enum.SurfaceType.Weld
- o149.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o149.Position = Vector3.new(-41.8307457, 4.46105003, 47.3558159)
- o150.Parent = o100
- o150.BrickColor = BrickColor.new("Bright red")
- o150.Position = Vector3.new(-39.8707466, 17.9500961, 64.2807693)
- o150.Rotation = Vector3.new(-179.959991, -3.31999993, 179.899994)
- o150.Size = Vector3.new(2, 18, 2)
- o150.CFrame = CFrame.new(-39.8707466, 17.9500961, 64.2807693, -0.99831754, -0.00174688792, -0.0579567961, -0.00179327442, 0.999998093, 0.000748362683, 0.0579553805, 0.000851036049, -0.998318791)
- o150.BackSurface = Enum.SurfaceType.Smooth
- o150.BottomSurface = Enum.SurfaceType.Weld
- o150.FrontSurface = Enum.SurfaceType.Smooth
- o150.LeftSurface = Enum.SurfaceType.Smooth
- o150.RightSurface = Enum.SurfaceType.Smooth
- o150.TopSurface = Enum.SurfaceType.Weld
- o150.Color = Color3.new(0.768628, 0.156863, 0.109804)
- o150.Position = Vector3.new(-39.8707466, 17.9500961, 64.2807693)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement