LelXD

Zombie spawner

Feb 11th, 2016
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 51.75 KB | None | 0 0
  1. --Created with ttyyuu12345's compiler
  2. --Errors:
  3. Create = function(itemClass,tabl)
  4. local item = Instance.new(itemClass)
  5. for i,v in pairs(tabl) do
  6. local a,b = ypcall(function() return item[i] end)
  7. if a then
  8. item[i] = tabl[i]
  9. end
  10. end
  11. return item
  12. end
  13. function runDummyScript(f,scri)
  14. local oldenv = getfenv(f)
  15. local newenv = setmetatable({}, {
  16. __index = function(_, k)
  17. if k:lower() == 'script' then
  18. return scri
  19. else
  20. return oldenv[k]
  21. end
  22. end
  23. })
  24. setfenv(f, newenv)
  25. ypcall(function() f() end)
  26. end
  27. cors = {}
  28. mas = Instance.new("Model",game:GetService("Lighting"))
  29. mas.Name = "CompiledModel"
  30. o1 = Create("Model",{
  31. ["Parent"] = mas,
  32. ["PrimaryPart"] = o168,
  33. })
  34. o2 = Create("Model",{
  35. ["Name"] = "Zombie",
  36. ["Parent"] = o1,
  37. ["PrimaryPart"] = o6,
  38. })
  39. o3 = Create("BodyColors",{
  40. ["Parent"] = o2,
  41. ["HeadColor"] = BrickColor.new("Bright yellow"),
  42. ["LeftArmColor"] = BrickColor.new("Medium stone grey"),
  43. ["LeftLegColor"] = BrickColor.new("Brick yellow"),
  44. ["RightArmColor"] = BrickColor.new("Medium stone grey"),
  45. ["RightLegColor"] = BrickColor.new("Brick yellow"),
  46. ["TorsoColor"] = BrickColor.new("Bright red"),
  47. })
  48. o4 = Create("IntValue",{
  49. ["Name"] = "Mode",
  50. ["Parent"] = o2,
  51. })
  52. o5 = Create("Part",{
  53. ["Name"] = "Right Arm",
  54. ["Parent"] = o2,
  55. ["BrickColor"] = BrickColor.new("Medium green"),
  56. ["Position"] = Vector3.new(-8.10000038, 4.4704051, -11.6999998),
  57. ["Rotation"] = Vector3.new(180, -0, -180),
  58. ["RotVelocity"] = Vector3.new(7.44785669e-025, 3.67559805e-022, 7.28629797e-025),
  59. ["Velocity"] = Vector3.new(3.64904782e-020, -0.00107575336, 3.7031548e-020),
  60. ["CFrame"] = CFrame.new(-8.10000038, 4.4704051, -11.6999998, -1, 0, -0, -0, 1, -0, -0, 0, -1),
  61. ["FormFactor"] = Enum.FormFactor.Symmetric,
  62. ["Size"] = Vector3.new(1, 2, 1),
  63. ["Color"] = Color3.new(0.631373, 0.768628, 0.54902),
  64. })
  65. o6 = Create("Part",{
  66. ["Name"] = "Head",
  67. ["Parent"] = o2,
  68. ["BrickColor"] = BrickColor.new("Medium green"),
  69. ["Position"] = Vector3.new(-6.5999999, 5.96738625, -11.6182976),
  70. ["Rotation"] = Vector3.new(-175.307953, 6.34260746e-026, 180),
  71. ["CFrame"] = CFrame.new(-6.5999999, 5.96738625, -11.6182976, -1, -9.08568706e-029, 1.10699381e-027, 6.01853108e-036, 0.996648669, 0.0818002522, 2.22143231e-027, 0.0818002522, -0.996648669),
  72. ["FormFactor"] = Enum.FormFactor.Symmetric,
  73. ["Size"] = Vector3.new(2, 1, 1),
  74. ["TopSurface"] = Enum.SurfaceType.Smooth,
  75. ["Color"] = Color3.new(0.631373, 0.768628, 0.54902),
  76. })
  77. o7 = Create("SpecialMesh",{
  78. ["Parent"] = o6,
  79. ["Scale"] = Vector3.new(1.25, 1.25, 1.25),
  80. })
  81. o8 = Create("Sound",{
  82. ["Parent"] = o6,
  83. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  84. })
  85. o9 = Create("Sound",{
  86. ["Parent"] = o6,
  87. ["SoundId"] = "rbxasset://sounds/splat.wav",
  88. })
  89. o10 = Create("Sound",{
  90. ["Parent"] = o6,
  91. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  92. })
  93. o11 = Create("Sound",{
  94. ["Parent"] = o6,
  95. ["SoundId"] = "rbxasset://sounds/hit.wav",
  96. })
  97. o12 = Create("Sound",{
  98. ["Parent"] = o6,
  99. ["SoundId"] = "rbxasset://sounds/button.wav",
  100. })
  101. o13 = Create("Sound",{
  102. ["Parent"] = o6,
  103. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  104. ["Looped"] = true,
  105. })
  106. o14 = Create("Sound",{
  107. ["Parent"] = o6,
  108. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  109. })
  110. o15 = Create("Sound",{
  111. ["Parent"] = o6,
  112. ["SoundId"] = "rbxasset://sounds/splat.wav",
  113. })
  114. o16 = Create("Sound",{
  115. ["Parent"] = o6,
  116. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  117. })
  118. o17 = Create("Sound",{
  119. ["Parent"] = o6,
  120. ["SoundId"] = "rbxasset://sounds/hit.wav",
  121. })
  122. o18 = Create("Sound",{
  123. ["Parent"] = o6,
  124. ["SoundId"] = "rbxasset://sounds/button.wav",
  125. })
  126. o19 = Create("Sound",{
  127. ["Parent"] = o6,
  128. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  129. ["Looped"] = true,
  130. })
  131. o20 = Create("Sound",{
  132. ["Parent"] = o6,
  133. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  134. })
  135. o21 = Create("Sound",{
  136. ["Parent"] = o6,
  137. ["SoundId"] = "rbxasset://sounds/splat.wav",
  138. })
  139. o22 = Create("Sound",{
  140. ["Parent"] = o6,
  141. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  142. })
  143. o23 = Create("Sound",{
  144. ["Parent"] = o6,
  145. ["SoundId"] = "rbxasset://sounds/hit.wav",
  146. })
  147. o24 = Create("Sound",{
  148. ["Parent"] = o6,
  149. ["SoundId"] = "rbxasset://sounds/button.wav",
  150. })
  151. o25 = Create("Sound",{
  152. ["Parent"] = o6,
  153. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  154. ["Looped"] = true,
  155. })
  156. o26 = Create("Sound",{
  157. ["Parent"] = o6,
  158. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  159. })
  160. o27 = Create("Sound",{
  161. ["Parent"] = o6,
  162. ["SoundId"] = "rbxasset://sounds/splat.wav",
  163. })
  164. o28 = Create("Sound",{
  165. ["Parent"] = o6,
  166. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  167. })
  168. o29 = Create("Sound",{
  169. ["Parent"] = o6,
  170. ["SoundId"] = "rbxasset://sounds/hit.wav",
  171. })
  172. o30 = Create("Sound",{
  173. ["Parent"] = o6,
  174. ["SoundId"] = "rbxasset://sounds/button.wav",
  175. })
  176. o31 = Create("Sound",{
  177. ["Parent"] = o6,
  178. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  179. ["Looped"] = true,
  180. })
  181. o32 = Create("Sound",{
  182. ["Parent"] = o6,
  183. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  184. })
  185. o33 = Create("Sound",{
  186. ["Parent"] = o6,
  187. ["SoundId"] = "rbxasset://sounds/splat.wav",
  188. })
  189. o34 = Create("Sound",{
  190. ["Parent"] = o6,
  191. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  192. })
  193. o35 = Create("Sound",{
  194. ["Parent"] = o6,
  195. ["SoundId"] = "rbxasset://sounds/hit.wav",
  196. })
  197. o36 = Create("Sound",{
  198. ["Parent"] = o6,
  199. ["SoundId"] = "rbxasset://sounds/button.wav",
  200. })
  201. o37 = Create("Sound",{
  202. ["Parent"] = o6,
  203. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  204. ["Looped"] = true,
  205. })
  206. o38 = Create("Sound",{
  207. ["Parent"] = o6,
  208. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  209. })
  210. o39 = Create("Sound",{
  211. ["Parent"] = o6,
  212. ["SoundId"] = "rbxasset://sounds/splat.wav",
  213. })
  214. o40 = Create("Sound",{
  215. ["Parent"] = o6,
  216. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  217. })
  218. o41 = Create("Sound",{
  219. ["Parent"] = o6,
  220. ["SoundId"] = "rbxasset://sounds/hit.wav",
  221. })
  222. o42 = Create("Sound",{
  223. ["Parent"] = o6,
  224. ["SoundId"] = "rbxasset://sounds/button.wav",
  225. })
  226. o43 = Create("Sound",{
  227. ["Parent"] = o6,
  228. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  229. ["Looped"] = true,
  230. })
  231. o44 = Create("Sound",{
  232. ["Parent"] = o6,
  233. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  234. })
  235. o45 = Create("Sound",{
  236. ["Parent"] = o6,
  237. ["SoundId"] = "rbxasset://sounds/splat.wav",
  238. })
  239. o46 = Create("Sound",{
  240. ["Parent"] = o6,
  241. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  242. })
  243. o47 = Create("Sound",{
  244. ["Parent"] = o6,
  245. ["SoundId"] = "rbxasset://sounds/hit.wav",
  246. })
  247. o48 = Create("Sound",{
  248. ["Parent"] = o6,
  249. ["SoundId"] = "rbxasset://sounds/button.wav",
  250. })
  251. o49 = Create("Sound",{
  252. ["Parent"] = o6,
  253. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  254. ["Looped"] = true,
  255. })
  256. o50 = Create("Sound",{
  257. ["Parent"] = o6,
  258. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  259. })
  260. o51 = Create("Sound",{
  261. ["Parent"] = o6,
  262. ["SoundId"] = "rbxasset://sounds/splat.wav",
  263. })
  264. o52 = Create("Sound",{
  265. ["Parent"] = o6,
  266. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  267. })
  268. o53 = Create("Sound",{
  269. ["Parent"] = o6,
  270. ["SoundId"] = "rbxasset://sounds/hit.wav",
  271. })
  272. o54 = Create("Sound",{
  273. ["Parent"] = o6,
  274. ["SoundId"] = "rbxasset://sounds/button.wav",
  275. })
  276. o55 = Create("Sound",{
  277. ["Parent"] = o6,
  278. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  279. ["Looped"] = true,
  280. })
  281. o56 = Create("Sound",{
  282. ["Parent"] = o6,
  283. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  284. })
  285. o57 = Create("Sound",{
  286. ["Parent"] = o6,
  287. ["SoundId"] = "rbxasset://sounds/splat.wav",
  288. })
  289. o58 = Create("Sound",{
  290. ["Parent"] = o6,
  291. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  292. })
  293. o59 = Create("Sound",{
  294. ["Parent"] = o6,
  295. ["SoundId"] = "rbxasset://sounds/hit.wav",
  296. })
  297. o60 = Create("Sound",{
  298. ["Parent"] = o6,
  299. ["SoundId"] = "rbxasset://sounds/button.wav",
  300. })
  301. o61 = Create("Sound",{
  302. ["Parent"] = o6,
  303. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  304. ["Looped"] = true,
  305. })
  306. o62 = Create("Sound",{
  307. ["Parent"] = o6,
  308. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  309. })
  310. o63 = Create("Sound",{
  311. ["Parent"] = o6,
  312. ["SoundId"] = "rbxasset://sounds/splat.wav",
  313. })
  314. o64 = Create("Sound",{
  315. ["Parent"] = o6,
  316. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  317. })
  318. o65 = Create("Sound",{
  319. ["Parent"] = o6,
  320. ["SoundId"] = "rbxasset://sounds/hit.wav",
  321. })
  322. o66 = Create("Sound",{
  323. ["Parent"] = o6,
  324. ["SoundId"] = "rbxasset://sounds/button.wav",
  325. })
  326. o67 = Create("Sound",{
  327. ["Parent"] = o6,
  328. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  329. ["Looped"] = true,
  330. })
  331. o68 = Create("Sound",{
  332. ["Parent"] = o6,
  333. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  334. })
  335. o69 = Create("Sound",{
  336. ["Parent"] = o6,
  337. ["SoundId"] = "rbxasset://sounds/splat.wav",
  338. })
  339. o70 = Create("Sound",{
  340. ["Parent"] = o6,
  341. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  342. })
  343. o71 = Create("Sound",{
  344. ["Parent"] = o6,
  345. ["SoundId"] = "rbxasset://sounds/hit.wav",
  346. })
  347. o72 = Create("Sound",{
  348. ["Parent"] = o6,
  349. ["SoundId"] = "rbxasset://sounds/button.wav",
  350. })
  351. o73 = Create("Sound",{
  352. ["Parent"] = o6,
  353. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  354. ["Looped"] = true,
  355. })
  356. o74 = Create("Sound",{
  357. ["Parent"] = o6,
  358. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  359. })
  360. o75 = Create("Sound",{
  361. ["Parent"] = o6,
  362. ["SoundId"] = "rbxasset://sounds/splat.wav",
  363. })
  364. o76 = Create("Sound",{
  365. ["Parent"] = o6,
  366. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  367. })
  368. o77 = Create("Sound",{
  369. ["Parent"] = o6,
  370. ["SoundId"] = "rbxasset://sounds/hit.wav",
  371. })
  372. o78 = Create("Sound",{
  373. ["Parent"] = o6,
  374. ["SoundId"] = "rbxasset://sounds/button.wav",
  375. })
  376. o79 = Create("Sound",{
  377. ["Parent"] = o6,
  378. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  379. ["Looped"] = true,
  380. })
  381. o80 = Create("Sound",{
  382. ["Parent"] = o6,
  383. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  384. })
  385. o81 = Create("Sound",{
  386. ["Parent"] = o6,
  387. ["SoundId"] = "rbxasset://sounds/splat.wav",
  388. })
  389. o82 = Create("Sound",{
  390. ["Parent"] = o6,
  391. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  392. })
  393. o83 = Create("Sound",{
  394. ["Parent"] = o6,
  395. ["SoundId"] = "rbxasset://sounds/hit.wav",
  396. })
  397. o84 = Create("Sound",{
  398. ["Parent"] = o6,
  399. ["SoundId"] = "rbxasset://sounds/button.wav",
  400. })
  401. o85 = Create("Sound",{
  402. ["Parent"] = o6,
  403. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  404. ["Looped"] = true,
  405. })
  406. o86 = Create("Sound",{
  407. ["Parent"] = o6,
  408. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  409. })
  410. o87 = Create("Sound",{
  411. ["Parent"] = o6,
  412. ["SoundId"] = "rbxasset://sounds/splat.wav",
  413. })
  414. o88 = Create("Sound",{
  415. ["Parent"] = o6,
  416. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  417. })
  418. o89 = Create("Sound",{
  419. ["Parent"] = o6,
  420. ["SoundId"] = "rbxasset://sounds/hit.wav",
  421. })
  422. o90 = Create("Sound",{
  423. ["Parent"] = o6,
  424. ["SoundId"] = "rbxasset://sounds/button.wav",
  425. })
  426. o91 = Create("Sound",{
  427. ["Parent"] = o6,
  428. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  429. ["Looped"] = true,
  430. })
  431. o92 = Create("Sound",{
  432. ["Parent"] = o6,
  433. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  434. })
  435. o93 = Create("Sound",{
  436. ["Parent"] = o6,
  437. ["SoundId"] = "rbxasset://sounds/splat.wav",
  438. })
  439. o94 = Create("Sound",{
  440. ["Parent"] = o6,
  441. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  442. })
  443. o95 = Create("Sound",{
  444. ["Parent"] = o6,
  445. ["SoundId"] = "rbxasset://sounds/hit.wav",
  446. })
  447. o96 = Create("Sound",{
  448. ["Parent"] = o6,
  449. ["SoundId"] = "rbxasset://sounds/button.wav",
  450. })
  451. o97 = Create("Sound",{
  452. ["Parent"] = o6,
  453. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  454. ["Looped"] = true,
  455. })
  456. o98 = Create("Sound",{
  457. ["Parent"] = o6,
  458. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  459. })
  460. o99 = Create("Sound",{
  461. ["Parent"] = o6,
  462. ["SoundId"] = "rbxasset://sounds/splat.wav",
  463. })
  464. o100 = Create("Sound",{
  465. ["Parent"] = o6,
  466. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  467. })
  468. o101 = Create("Sound",{
  469. ["Parent"] = o6,
  470. ["SoundId"] = "rbxasset://sounds/hit.wav",
  471. })
  472. o102 = Create("Sound",{
  473. ["Parent"] = o6,
  474. ["SoundId"] = "rbxasset://sounds/button.wav",
  475. })
  476. o103 = Create("Sound",{
  477. ["Parent"] = o6,
  478. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  479. ["Looped"] = true,
  480. })
  481. o104 = Create("Sound",{
  482. ["Parent"] = o6,
  483. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  484. })
  485. o105 = Create("Sound",{
  486. ["Parent"] = o6,
  487. ["SoundId"] = "rbxasset://sounds/splat.wav",
  488. })
  489. o106 = Create("Sound",{
  490. ["Parent"] = o6,
  491. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  492. })
  493. o107 = Create("Sound",{
  494. ["Parent"] = o6,
  495. ["SoundId"] = "rbxasset://sounds/hit.wav",
  496. })
  497. o108 = Create("Sound",{
  498. ["Parent"] = o6,
  499. ["SoundId"] = "rbxasset://sounds/button.wav",
  500. })
  501. o109 = Create("Sound",{
  502. ["Parent"] = o6,
  503. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  504. ["Looped"] = true,
  505. })
  506. o110 = Create("Sound",{
  507. ["Parent"] = o6,
  508. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  509. })
  510. o111 = Create("Sound",{
  511. ["Parent"] = o6,
  512. ["SoundId"] = "rbxasset://sounds/splat.wav",
  513. })
  514. o112 = Create("Sound",{
  515. ["Parent"] = o6,
  516. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  517. })
  518. o113 = Create("Sound",{
  519. ["Parent"] = o6,
  520. ["SoundId"] = "rbxasset://sounds/hit.wav",
  521. })
  522. o114 = Create("Sound",{
  523. ["Parent"] = o6,
  524. ["SoundId"] = "rbxasset://sounds/button.wav",
  525. })
  526. o115 = Create("Sound",{
  527. ["Parent"] = o6,
  528. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  529. ["Looped"] = true,
  530. })
  531. o116 = Create("Sound",{
  532. ["Parent"] = o6,
  533. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  534. })
  535. o117 = Create("Sound",{
  536. ["Parent"] = o6,
  537. ["SoundId"] = "rbxasset://sounds/splat.wav",
  538. })
  539. o118 = Create("Sound",{
  540. ["Parent"] = o6,
  541. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  542. })
  543. o119 = Create("Sound",{
  544. ["Parent"] = o6,
  545. ["SoundId"] = "rbxasset://sounds/hit.wav",
  546. })
  547. o120 = Create("Sound",{
  548. ["Parent"] = o6,
  549. ["SoundId"] = "rbxasset://sounds/button.wav",
  550. })
  551. o121 = Create("Sound",{
  552. ["Parent"] = o6,
  553. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  554. ["Looped"] = true,
  555. })
  556. o122 = Create("Sound",{
  557. ["Parent"] = o6,
  558. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  559. })
  560. o123 = Create("Sound",{
  561. ["Parent"] = o6,
  562. ["SoundId"] = "rbxasset://sounds/splat.wav",
  563. })
  564. o124 = Create("Sound",{
  565. ["Parent"] = o6,
  566. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  567. })
  568. o125 = Create("Sound",{
  569. ["Parent"] = o6,
  570. ["SoundId"] = "rbxasset://sounds/hit.wav",
  571. })
  572. o126 = Create("Sound",{
  573. ["Parent"] = o6,
  574. ["SoundId"] = "rbxasset://sounds/button.wav",
  575. })
  576. o127 = Create("Sound",{
  577. ["Parent"] = o6,
  578. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  579. ["Looped"] = true,
  580. })
  581. o128 = Create("Sound",{
  582. ["Parent"] = o6,
  583. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  584. })
  585. o129 = Create("Sound",{
  586. ["Parent"] = o6,
  587. ["SoundId"] = "rbxasset://sounds/splat.wav",
  588. })
  589. o130 = Create("Sound",{
  590. ["Parent"] = o6,
  591. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  592. })
  593. o131 = Create("Sound",{
  594. ["Parent"] = o6,
  595. ["SoundId"] = "rbxasset://sounds/hit.wav",
  596. })
  597. o132 = Create("Sound",{
  598. ["Parent"] = o6,
  599. ["SoundId"] = "rbxasset://sounds/button.wav",
  600. })
  601. o133 = Create("Sound",{
  602. ["Parent"] = o6,
  603. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  604. ["Looped"] = true,
  605. })
  606. o134 = Create("Sound",{
  607. ["Parent"] = o6,
  608. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  609. })
  610. o135 = Create("Sound",{
  611. ["Parent"] = o6,
  612. ["SoundId"] = "rbxasset://sounds/splat.wav",
  613. })
  614. o136 = Create("Sound",{
  615. ["Parent"] = o6,
  616. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  617. })
  618. o137 = Create("Sound",{
  619. ["Parent"] = o6,
  620. ["SoundId"] = "rbxasset://sounds/hit.wav",
  621. })
  622. o138 = Create("Sound",{
  623. ["Parent"] = o6,
  624. ["SoundId"] = "rbxasset://sounds/button.wav",
  625. })
  626. o139 = Create("Sound",{
  627. ["Parent"] = o6,
  628. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  629. ["Looped"] = true,
  630. })
  631. o140 = Create("Sound",{
  632. ["Parent"] = o6,
  633. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  634. })
  635. o141 = Create("Sound",{
  636. ["Parent"] = o6,
  637. ["SoundId"] = "rbxasset://sounds/splat.wav",
  638. })
  639. o142 = Create("Sound",{
  640. ["Parent"] = o6,
  641. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  642. })
  643. o143 = Create("Sound",{
  644. ["Parent"] = o6,
  645. ["SoundId"] = "rbxasset://sounds/hit.wav",
  646. })
  647. o144 = Create("Sound",{
  648. ["Parent"] = o6,
  649. ["SoundId"] = "rbxasset://sounds/button.wav",
  650. })
  651. o145 = Create("Sound",{
  652. ["Parent"] = o6,
  653. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  654. ["Looped"] = true,
  655. })
  656. o146 = Create("Sound",{
  657. ["Parent"] = o6,
  658. ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
  659. })
  660. o147 = Create("Sound",{
  661. ["Parent"] = o6,
  662. ["SoundId"] = "rbxasset://sounds/splat.wav",
  663. })
  664. o148 = Create("Sound",{
  665. ["Parent"] = o6,
  666. ["SoundId"] = "rbxasset://sounds/swoosh.wav",
  667. })
  668. o149 = Create("Sound",{
  669. ["Parent"] = o6,
  670. ["SoundId"] = "rbxasset://sounds/hit.wav",
  671. })
  672. o150 = Create("Sound",{
  673. ["Parent"] = o6,
  674. ["SoundId"] = "rbxasset://sounds/button.wav",
  675. })
  676. o151 = Create("Sound",{
  677. ["Parent"] = o6,
  678. ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
  679. ["Looped"] = true,
  680. })
  681. o152 = Create("Part",{
  682. ["Name"] = "Left Leg",
  683. ["Parent"] = o2,
  684. ["BrickColor"] = BrickColor.new("Reddish brown"),
  685. ["Position"] = Vector3.new(-6.0999999, 2.47911358, -11.9046011),
  686. ["Rotation"] = Vector3.new(-175.307953, 1.26414217e-039, -180),
  687. ["CFrame"] = CFrame.new(-6.0999999, 2.47911358, -11.9046011, -1, 0, 2.20634443e-041, 0, 0.996648729, 0.0818002596, 1.11071615e-027, 0.0818002596, -0.996648729),
  688. ["CanCollide"] = false,
  689. ["FormFactor"] = Enum.FormFactor.Symmetric,
  690. ["Size"] = Vector3.new(1, 2, 1),
  691. ["BottomSurface"] = Enum.SurfaceType.Smooth,
  692. ["Color"] = Color3.new(0.411765, 0.25098, 0.156863),
  693. })
  694. o153 = Create("Part",{
  695. ["Name"] = "Right Leg",
  696. ["Parent"] = o2,
  697. ["BrickColor"] = BrickColor.new("Reddish brown"),
  698. ["Position"] = Vector3.new(-7.0999999, 2.47911358, -11.9046011),
  699. ["Rotation"] = Vector3.new(-175.307953, 1.26414217e-039, -180),
  700. ["CFrame"] = CFrame.new(-7.0999999, 2.47911358, -11.9046011, -1, 0, 2.20634443e-041, 0, 0.996648729, 0.0818002596, 1.11071615e-027, 0.0818002596, -0.996648729),
  701. ["CanCollide"] = false,
  702. ["FormFactor"] = Enum.FormFactor.Symmetric,
  703. ["Size"] = Vector3.new(1, 2, 1),
  704. ["BottomSurface"] = Enum.SurfaceType.Smooth,
  705. ["Color"] = Color3.new(0.411765, 0.25098, 0.156863),
  706. })
  707. o154 = Create("Humanoid",{
  708. ["Name"] = "Zombie",
  709. ["Parent"] = o2,
  710. ["RightLeg"] = o153,
  711. ["LeftLeg"] = o152,
  712. ["Torso"] = o159,
  713. })
  714. o155 = Create("Part",{
  715. ["Name"] = "Left Arm",
  716. ["Parent"] = o2,
  717. ["BrickColor"] = BrickColor.new("Medium green"),
  718. ["Position"] = Vector3.new(-5.0999999, 4.47241116, -11.7410002),
  719. ["Rotation"] = Vector3.new(-175.307953, 1.26414217e-039, -180),
  720. ["CFrame"] = CFrame.new(-5.0999999, 4.47241116, -11.7410002, -1, 0, 2.20634443e-041, 0, 0.996648729, 0.0818002596, 1.11071615e-027, 0.0818002596, -0.996648729),
  721. ["FormFactor"] = Enum.FormFactor.Symmetric,
  722. ["Size"] = Vector3.new(1, 2, 1),
  723. ["Color"] = Color3.new(0.631373, 0.768628, 0.54902),
  724. })
  725. o156 = Create("Script",{
  726. ["Name"] = "README",
  727. ["Parent"] = o2,
  728. ["Disabled"] = true,
  729. })
  730. table.insert(cors,coroutine.create(function()
  731. wait()
  732. runDummyScript(function()
  733. --[[
  734.  
  735. ROBOTS v1
  736.  
  737. User Manual
  738.  
  739. ---------------------------------------------------------------------
  740. Before you start:
  741. 1. If you want to let the robot use weapons then get the Robot Weapon Hub from the toolbox.
  742. 2. Look at the list of names in commander. Change these names to change who can command
  743. your robot. Delete "Commander" if you want everyone to be able to control it.
  744. 3. Delete the robot spawn pad if you dont want the robot to come back when dead.
  745.  
  746.  
  747. The robot is only half done, I was going to add the ability to fire rockets, patrol set points, kill
  748. one team only and so on. I got fed up of making stuff for it, and Im only releasing it now as
  749. so many people have patiently been waiting for it. Its likely Ill update it in the future.
  750.  
  751.  
  752. HOW TO USE IT:
  753. It listens to what you type (if you are one of the people it is listening to)
  754. Change the name of the robot to whatever you want, and it will do what you say when you say its name.
  755.  
  756. Commands:
  757.  
  758. {Robot Name} dance
  759. go home
  760. run
  761. climb
  762. jump
  763. zombie
  764. disco
  765. float
  766. punch
  767. kick
  768. fly
  769.  
  770. heal
  771. defend
  772.  
  773. stop
  774.  
  775. follow {Player Name}
  776. follow all
  777. kill {Player Name}
  778. kill all
  779.  
  780.  
  781. equip sword
  782. rocket
  783. slingshot
  784. pbg
  785. superball
  786. trowel
  787. bomb
  788.  
  789. unequip
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. e.g.:
  797. Yellow kill miked
  798.  
  799.  
  800.  
  801. Also you can type it however you like, just include the keywords:
  802. e.g.:
  803. Yellow my best friend in the world, can you do me a favour and kill that miked guy?
  804.  
  805.  
  806.  
  807. Its not case sensitive too:
  808. e.g.:
  809. YelLOW KiLl MiKeD
  810.  
  811.  
  812.  
  813.  
  814. Also if you have lots of robots do this to get al their attention:
  815.  
  816. Everyone kill miked
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831. --]]
  832.  
  833.  
  834.  
  835. end,o156)
  836. end))
  837. o157 = Create("Script",{
  838. ["Parent"] = o2,
  839. })
  840. table.insert(cors,coroutine.create(function()
  841. wait()
  842. runDummyScript(function()
  843. local larm = script.Parent:FindFirstChild("Left Arm")
  844. local rarm = script.Parent:FindFirstChild("Right Arm")
  845.  
  846. function findNearestTorso(pos)
  847. local list = game.Workspace:children()
  848. local torso = nil
  849. local dist = 1000
  850. local temp = nil
  851. local human = nil
  852. local temp2 = nil
  853. for x = 1, #list do
  854. temp2 = list[x]
  855. if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  856. temp = temp2:findFirstChild("Torso")
  857. human = temp2:findFirstChild("Humanoid")
  858. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  859. if (temp.Position - pos).magnitude < dist then
  860. torso = temp
  861. dist = (temp.Position - pos).magnitude
  862. end
  863. end
  864. end
  865. end
  866. return torso
  867. end
  868.  
  869. function Hit(hit)
  870. local human = hit.Parent:FindFirstChild("Humanoid")
  871. if human ~= nil then
  872. human.Health = human.Health -8
  873. end
  874. end
  875.  
  876. larm.Touched:connect(Hit)
  877. rarm.Touched:connect(Hit)
  878.  
  879. while true do
  880. wait(0.1)
  881. local target = findNearestTorso(script.Parent.Torso.Position)
  882. if target ~= nil then
  883. script.Parent.Zombie:MoveTo(target.Position, target)
  884. end
  885. end
  886.  
  887. end,o157)
  888. end))
  889. o158 = Create("Script",{
  890. ["Name"] = "Robot",
  891. ["Parent"] = o2,
  892. })
  893. table.insert(cors,coroutine.create(function()
  894. wait()
  895. runDummyScript(function()
  896. model = script.Parent
  897. backup = model:Clone()
  898. regentime = 1 --5 minutes
  899.  
  900. ------------------
  901. --SPAWNING--
  902. ------------------
  903.  
  904. miked=script.Parent
  905.  
  906. itlh=miked.Torso:findFirstChild("Left Hip")
  907. itlh.Part0=miked.Torso
  908. itlh.Part1=miked:findFirstChild("Left Leg")
  909. itlh.C0=CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  910.  
  911. itrh=miked.Torso:findFirstChild("Right Hip")
  912. itrh.Part0=miked.Torso
  913. itrh.Part1=miked:findFirstChild("Right Leg")
  914. itrh.C0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  915.  
  916. itls=miked.Torso:findFirstChild("Left Shoulder")
  917. itls.Part1=miked.Torso
  918. itls.C0=CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  919. itls.Part0=miked:findFirstChild("Left Arm")
  920.  
  921. itrs=miked.Torso:findFirstChild("Right Shoulder")
  922. itrs.Part1=miked.Torso
  923. itrs.C0=CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  924. itrs.Part0=miked:findFirstChild("Right Arm")
  925.  
  926. miked.Head:makeJoints()
  927. ------------------
  928. ------------------
  929.  
  930.  
  931. function waitForChild(parent, childName)
  932. while true do
  933. local child = parent:findFirstChild(childName)
  934. if child then
  935. return child
  936. end
  937. parent.ChildAdded:wait()
  938. end
  939. end
  940.  
  941. local Figure = script.Parent
  942. local Torso = waitForChild(Figure, "Torso")
  943. local RightShoulder = waitForChild(Torso, "Right Shoulder")
  944. local LeftShoulder = waitForChild(Torso, "Left Shoulder")
  945. local RightHip = waitForChild(Torso, "Right Hip")
  946. local LeftHip = waitForChild(Torso, "Left Hip")
  947. local Neck = waitForChild(Torso, "Neck")
  948. local Humanoid = waitForChild(Figure, "Zombie")
  949. local pose = "Standing"
  950.  
  951. local toolAnim = "None"
  952. local toolAnimTime = 0
  953.  
  954. local isSeated = false
  955.  
  956.  
  957. function onRunning(speed)
  958. if isSeated then return end
  959.  
  960. if speed>0 then
  961. pose = "Running"
  962. else
  963. pose = "Standing"
  964. end
  965. end
  966.  
  967. function onDied()
  968. pose = "Dead"
  969. wait(regentime)
  970. wait(1)
  971. model:remove()
  972. model = backup:Clone()
  973. wait(3)
  974. model.Parent = game.Workspace
  975. model:MakeJoints()
  976. end
  977.  
  978. function onJumping()
  979. isSeated = false
  980. pose = "Jumping"
  981. end
  982.  
  983. function onClimbing()
  984. pose = "Climbing"
  985. end
  986.  
  987. function onGettingUp()
  988. pose = "GettingUp"
  989. end
  990.  
  991. function onFreeFall()
  992. pose = "FreeFall"
  993. end
  994.  
  995. function onDancing()
  996. pose = "Dancing"
  997. end
  998.  
  999. function onFallingDown()
  1000. pose = "FallingDown"
  1001. end
  1002.  
  1003. function onSeated()
  1004. isSeated = true
  1005. pose = "Seated"
  1006. end
  1007.  
  1008.  
  1009.  
  1010. function moveJump()
  1011. RightShoulder.MaxVelocity = 0.5
  1012. LeftShoulder.MaxVelocity = 0.5
  1013. RightShoulder.DesiredAngle = -3.14
  1014. LeftShoulder.DesiredAngle = -3.14
  1015. RightHip.DesiredAngle = 0
  1016. LeftHip.DesiredAngle = 0
  1017. end
  1018.  
  1019. function moveFreeFall()
  1020. RightShoulder.MaxVelocity = 0.5
  1021. LeftShoulder.MaxVelocity = 0.5
  1022. RightShoulder.DesiredAngle = -1
  1023. LeftShoulder.DesiredAngle = -1
  1024. RightHip.DesiredAngle = 0
  1025. LeftHip.DesiredAngle = 0
  1026. end
  1027.  
  1028. function moveFloat()
  1029. RightShoulder.MaxVelocity = 0.5
  1030. LeftShoulder.MaxVelocity = 0.5
  1031. RightShoulder.DesiredAngle = -1.57
  1032. LeftShoulder.DesiredAngle = 1.57
  1033. RightHip.DesiredAngle = 1.57
  1034. LeftHip.DesiredAngle = -1.57
  1035. end
  1036.  
  1037. function moveBoogy()
  1038. while pose=="Boogy" do
  1039. wait(.5)
  1040. RightShoulder.MaxVelocity = 1
  1041. LeftShoulder.MaxVelocity = 1
  1042. RightShoulder.DesiredAngle = -3.14
  1043. LeftShoulder.DesiredAngle = 0
  1044. RightHip.DesiredAngle = 1.57
  1045. LeftHip.DesiredAngle = 0
  1046. wait(.5)
  1047. RightShoulder.MaxVelocity = 1
  1048. LeftShoulder.MaxVelocity = 1
  1049. RightShoulder.DesiredAngle = 0
  1050. LeftShoulder.DesiredAngle = -3.14
  1051. RightHip.DesiredAngle = 0
  1052. LeftHip.DesiredAngle = 1.57
  1053. end
  1054. end
  1055.  
  1056. function moveZombie()
  1057. RightShoulder.MaxVelocity = 0.5
  1058. LeftShoulder.MaxVelocity = 0.5
  1059. RightShoulder.DesiredAngle = -1.57
  1060. LeftShoulder.DesiredAngle = 1.57
  1061. RightHip.DesiredAngle = 0
  1062. LeftHip.DesiredAngle = 0
  1063. end
  1064.  
  1065. function movePunch()
  1066. script.Parent.Torso.Anchored=true
  1067. RightShoulder.MaxVelocity = 60
  1068. LeftShoulder.MaxVelocity = 0.5
  1069. RightShoulder.DesiredAngle = -1.57
  1070. LeftShoulder.DesiredAngle = 0
  1071. RightHip.DesiredAngle = 0
  1072. LeftHip.DesiredAngle = 0
  1073. wait(1)
  1074. script.Parent.Torso.Anchored=false
  1075. pose="Standing"
  1076.  
  1077. end
  1078.  
  1079. function moveKick()
  1080. RightShoulder.MaxVelocity = 0.5
  1081. LeftShoulder.MaxVelocity = 0.5
  1082. RightShoulder.DesiredAngle = 0
  1083. LeftShoulder.DesiredAngle = 0
  1084. RightHip.MaxVelocity = 40
  1085. RightHip.DesiredAngle = 1.57
  1086. LeftHip.DesiredAngle = 0
  1087. wait(1)
  1088. pose="Standing"
  1089.  
  1090. end
  1091.  
  1092. function moveFly()
  1093. RightShoulder.MaxVelocity = 0.5
  1094. LeftShoulder.MaxVelocity = 0.5
  1095. RightShoulder.DesiredAngle = 0
  1096. LeftShoulder.DesiredAngle = 0
  1097. RightHip.MaxVelocity = 40
  1098. RightHip.DesiredAngle = 1.57
  1099. LeftHip.DesiredAngle = 0
  1100. wait(1)
  1101. pose="Standing"
  1102.  
  1103. end
  1104.  
  1105.  
  1106. function moveClimb()
  1107. RightShoulder.MaxVelocity = 0.5
  1108. LeftShoulder.MaxVelocity = 0.5
  1109. RightShoulder.DesiredAngle = -3.14
  1110. LeftShoulder.DesiredAngle = 3.14
  1111. RightHip.DesiredAngle = 0
  1112. LeftHip.DesiredAngle = 0
  1113. end
  1114.  
  1115. function moveSit()
  1116. RightShoulder.MaxVelocity = 0.15
  1117. LeftShoulder.MaxVelocity = 0.15
  1118. RightShoulder.DesiredAngle = -3.14 /2
  1119. LeftShoulder.DesiredAngle = -3.14 /2
  1120. RightHip.DesiredAngle = 3.14 /2
  1121. LeftHip.DesiredAngle = -3.14 /2
  1122. end
  1123.  
  1124. function getTool()
  1125.  
  1126. kidTable = Figure:children()
  1127. if (kidTable ~= nil) then
  1128. numKids = #kidTable
  1129. for i=1,numKids do
  1130. if (kidTable[i].className == "Tool") then return kidTable[i] end
  1131. end
  1132. end
  1133.  
  1134. return nil
  1135. end
  1136.  
  1137. function getToolAnim(tool)
  1138.  
  1139. c = tool:children()
  1140. for i=1,#c do
  1141. if (c[i].Name == "toolanim" and c[i].className == "StringValue") then
  1142. return c[i]
  1143. end
  1144. end
  1145. return nil
  1146. end
  1147.  
  1148. function animateTool()
  1149.  
  1150. if (toolAnim == "None") then
  1151. RightShoulder.DesiredAngle = -1.57
  1152. return
  1153. end
  1154.  
  1155. if (toolAnim == "Slash") then
  1156. RightShoulder.MaxVelocity = 0.5
  1157. RightShoulder.DesiredAngle = 0
  1158. return
  1159. end
  1160.  
  1161. if (toolAnim == "Lunge") then
  1162. RightShoulder.MaxVelocity = 0.5
  1163. LeftShoulder.MaxVelocity = 0.5
  1164. RightHip.MaxVelocity = 0.5
  1165. LeftHip.MaxVelocity = 0.5
  1166. RightShoulder.DesiredAngle = -1.57
  1167. LeftShoulder.DesiredAngle = 1.0
  1168. RightHip.DesiredAngle = 1.57
  1169. LeftHip.DesiredAngle = 1.0
  1170. return
  1171. end
  1172. end
  1173.  
  1174. function move(time)
  1175. local amplitude
  1176. local frequency
  1177.  
  1178. if (pose == "Jumping") then
  1179. moveJump()
  1180. return
  1181. end
  1182.  
  1183. if (pose == "Zombie") then
  1184. moveZombie()
  1185. return
  1186. end
  1187.  
  1188. if (pose == "Boogy") then
  1189. moveBoogy()
  1190. return
  1191. end
  1192.  
  1193. if (pose == "Float") then
  1194. moveFloat()
  1195. return
  1196. end
  1197.  
  1198. if (pose == "Punch") then
  1199. movePunch()
  1200. return
  1201. end
  1202.  
  1203. if (pose == "Kick") then
  1204. moveKick()
  1205. return
  1206. end
  1207.  
  1208. if (pose == "Fly") then
  1209. moveFly()
  1210. return
  1211. end
  1212.  
  1213. if (pose == "FreeFall") then
  1214. moveFreeFall()
  1215. return
  1216. end
  1217.  
  1218. if (pose == "Climbing") then
  1219. moveClimb()
  1220. return
  1221. end
  1222.  
  1223. if (pose == "Seated") then
  1224. moveSit()
  1225. return
  1226. end
  1227.  
  1228. amplitude = 0.1
  1229. frequency = 1
  1230.  
  1231. RightShoulder.MaxVelocity = 0.15
  1232. LeftShoulder.MaxVelocity = 0.15
  1233. if (pose == "Running") then
  1234. amplitude = 1
  1235. frequency = 9
  1236. elseif (pose == "Dancing") then
  1237. amplitude = 2
  1238. frequency = 16
  1239. end
  1240.  
  1241.  
  1242. desiredAngle = amplitude * math.sin(time*frequency)
  1243. if pose~="Dancing" then
  1244. RightShoulder.DesiredAngle = -desiredAngle
  1245. LeftShoulder.DesiredAngle = desiredAngle
  1246. RightHip.DesiredAngle = -desiredAngle
  1247. LeftHip.DesiredAngle = -desiredAngle
  1248. else
  1249. RightShoulder.DesiredAngle = desiredAngle
  1250. LeftShoulder.DesiredAngle = desiredAngle
  1251. RightHip.DesiredAngle = -desiredAngle
  1252. LeftHip.DesiredAngle = -desiredAngle
  1253. end
  1254.  
  1255.  
  1256.  
  1257. local tool = getTool()
  1258.  
  1259. if tool ~= nil then
  1260.  
  1261. animStringValueObject = getToolAnim(tool)
  1262.  
  1263. if animStringValueObject ~= nil then
  1264. toolAnim = animStringValueObject.Value
  1265. -- message recieved, delete StringValue
  1266. animStringValueObject.Parent = nil
  1267. toolAnimTime = time + .3
  1268. end
  1269.  
  1270. if time > toolAnimTime then
  1271. toolAnimTime = 0
  1272. toolAnim = "None"
  1273. end
  1274.  
  1275. animateTool()
  1276.  
  1277.  
  1278. else
  1279. toolAnim = "None"
  1280. toolAnimTime = 0
  1281. end
  1282. end
  1283.  
  1284.  
  1285. -- connect events
  1286. -----------------------------------------------------------------------------------------------------------------------
  1287.  
  1288. function unequip()
  1289. local items=script.Parent:children()
  1290. for i=1, #items do
  1291. if items[i].className=="Tool" then items[i]:remove() end
  1292. end
  1293. end
  1294.  
  1295. function onChatted(msg, recipient)
  1296. msg = string.lower(msg)
  1297.  
  1298. if string.match(msg, string.lower(script.Parent.Name))~=nil or string.match(msg, "everyone") then
  1299. if string.match(msg, "equip") then
  1300. if game.Workspace:findFirstChild("Hub") then
  1301. if string.match(msg, "rocket") then unequip()
  1302. game.Workspace.Hub.Rocket:clone().Parent=script.Parent
  1303. elseif string.match(msg, "slingshot") then unequip()
  1304. game.Workspace.Hub.Slingshot:clone().Parent=script.Parent
  1305. elseif string.match(msg, "sword") then unequip()
  1306. game.Workspace.Hub.Sword:clone().Parent=script.Parent
  1307. elseif string.match(msg, "pbg") then unequip()
  1308. game.Workspace.Hub.PBG:clone().Parent=script.Parent
  1309. elseif string.match(msg, "superball") then unequip()
  1310. game.Workspace.Hub.Superball:clone().Parent=script.Parent
  1311. elseif string.match(msg, "trowel") then unequip()
  1312. game.Workspace.Hub.Trowel:clone().Parent=script.Parent
  1313. elseif string.match(msg, "bomb") then unequip()
  1314. game.Workspace.Hub.Bomb:clone().Parent=script.Parent
  1315. end
  1316. end
  1317. end
  1318. if string.match(msg, "unequip") then unequip() end
  1319. if string.match(msg, "run") then onRunning(1) end
  1320. if string.match(msg, "climb") then onClimbing() end
  1321. if string.match(msg, "jump") then onJumping() end
  1322. if string.match(msg, "zombie") then pose="Zombie" end
  1323. if string.match(msg, "disco") then pose="Boogy" end
  1324. if string.match(msg, "float") then pose="Float" end
  1325. if string.match(msg, "punch") then pose="Punch" end
  1326. if string.match(msg, "kick") then pose="Kick" end
  1327. if string.match(msg, "fly") then pose="Fly" end
  1328. if string.match(msg, "heal") then script.Parent.Humanoid.Health=script.Parent.Humanoid.MaxHealth end
  1329. if string.match(msg, "defend") then defence() end
  1330. if string.match(msg, "stop") then pose="Standing"; proxkill=false; following=false; stopmoving() end
  1331. if string.match(msg, "go home") then following=false; gohome() end
  1332. if string.match(msg, "follow") then
  1333. if string.match(msg, "all") then
  1334. followany()
  1335. else
  1336. local egg=game.Players:children()
  1337. for i=1, #egg do
  1338. if string.match(msg, string.lower(egg[i].Name)) then
  1339. follow(egg[i].Name)
  1340. return
  1341. end
  1342. end
  1343. end
  1344. end
  1345. if string.match(msg, "kill") then
  1346. if string.match(msg, "all") then
  1347. attackany()
  1348. else
  1349. local egg=game.Players:children()
  1350. for i=1, #egg do
  1351. if string.match(msg, string.lower(egg[i].Name)) then
  1352. attack(egg[i].Name)
  1353. return
  1354. end
  1355. end
  1356. end
  1357. end
  1358.  
  1359. end
  1360. end
  1361.  
  1362. if game.Players.NumPlayers>1 then
  1363. x=game.Players:children()
  1364.  
  1365. for i=1, #x do
  1366. if script.Parent:findFirstChild("Commander")~=nil then
  1367. if script.Parent.Commander:children()~=nil or script.Parent.Commander:children()>0 then
  1368. local ch=script.Parent.Commander:children()
  1369. for i=1, #ch do
  1370. if string.lower(ch[i].Name)==string.lower(x[i].Name) then
  1371. x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
  1372. end
  1373. end
  1374. elseif string.lower(script.Parent.Commander.Value)==string.lower(x[i].Name) then
  1375. x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
  1376. end
  1377. else
  1378. x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
  1379. end
  1380. end
  1381. end
  1382.  
  1383.  
  1384. function onPlayerEntered(Player)
  1385. while Player.Name==nil do
  1386. wait(2)
  1387. end
  1388. if script.Parent:findFirstChild("Commander")~=nil then
  1389. if script.Parent.Commander:children()~=nil or script.Parent.Commander:children()>0 then
  1390. local ch=script.Parent.Commander:children()
  1391. for i=1, #ch do
  1392. if string.lower(ch[i].Name)==string.lower(Player.Name) then
  1393. Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
  1394. end
  1395. end
  1396. elseif string.lower(script.Parent.Commander.Value)==string.lower(Player.Name) then
  1397. Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
  1398. end
  1399. else
  1400. Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
  1401. end
  1402. end
  1403.  
  1404. game.Players.ChildAdded:connect(onPlayerEntered)
  1405.  
  1406.  
  1407.  
  1408. -----------------------------------------------------------------------------------------------------------------------
  1409. -----------------------------------------------------------------------------------------------------------------------
  1410. -----------------------------------------------------------------------------------------------------------------------
  1411. -----------------------------------------------------------------------------------------------------------------------
  1412. -----------------------------------------------------------------------------------------------------------------------
  1413. -----------------------------------------------------------------------------------------------------------------------
  1414. -----------------------------------------------------------------------------------------------------------------------
  1415. -----------------------------------------------------------------------------------------------------------------------
  1416. -----------------------------------------------------------------------------------------------------------------------
  1417. -----------------------------------------------------------------------------------------------------------------------
  1418. -----------------------------------------------------------------------------------------------------------------------
  1419. -----------------------------------------------------------------------------------------------------------------------
  1420. dist=20
  1421.  
  1422. function followany()
  1423. following=true
  1424. while following==true do
  1425.  
  1426. local ch=game.Players:children()
  1427. for i=1, #ch do
  1428. local l=game.Workspace:findFirstChild(ch[i].Name)
  1429. if l~=nil then
  1430. local s=l.Torso
  1431. local p=l.Torso.Position
  1432. local q=script.Parent.Torso.Position
  1433. local d=math.sqrt( ((p.x-q.x)^2)+((p.y-q.y)^2)+((p.z-q.z)^2) )
  1434. if smallest==nil then
  1435. smallest=d
  1436. target=s
  1437. elseif d<smallest then
  1438. smallest=d
  1439. target=s
  1440. end
  1441. end
  1442. end
  1443.  
  1444. if smallest==nil then stopmoving() return end
  1445.  
  1446. if smallest>6*dist then return end
  1447.  
  1448. script.Parent.Humanoid:MoveTo(target.Position, target)
  1449.  
  1450. wait(0.5)
  1451. for i=1, 6 do
  1452. if target.Parent.Humanoid.Health<1 then stopmoving() else wait(0.5) end
  1453. end
  1454. end
  1455. end
  1456.  
  1457.  
  1458.  
  1459. function gohome()
  1460. script.Parent.Humanoid:MoveTo(Vector3.new(0,0,0), game.Workspace.Bases.Base)
  1461. end
  1462. function stopmoving()
  1463. script.Parent.Humanoid:MoveTo(script.Parent.Torso.Position, script.Parent.Torso)
  1464. end
  1465.  
  1466. function follow(name)
  1467. following=true
  1468.  
  1469. local p=game.Workspace:findFirstChild(name)
  1470. if p==nil then return end
  1471. while following==true do
  1472. script.Parent.Humanoid:MoveTo(p.Torso.Position, p.Torso)
  1473. wait(0.5)
  1474. for i=1, 3 do
  1475. if p.Humanoid.Health<1 then following=false; stopmoving() return end
  1476. wait(0.5)
  1477. end
  1478. end
  1479. end
  1480.  
  1481. function attack(name)
  1482. if script.Parent:findFirstChild("Sword")~=nil then
  1483. following=true
  1484. local p=game.Workspace:findFirstChild(name)
  1485. if p==nil then return end
  1486. while following==true do
  1487. script.Parent.Humanoid:MoveTo(p.Torso.Position, p.Torso)
  1488. wait(0.5)
  1489. for i=1, 3 do
  1490. if p.Humanoid.Health<1 then following=false; stopmoving() return end
  1491. local l=p.Torso.Position
  1492. local q=script.Parent.Torso.Position
  1493. local d=math.sqrt( ((l.x-q.x)^2)+((l.y-q.y)^2)+((l.z-q.z)^2) )
  1494. if d<10 then
  1495. script.Parent.Humanoid:MoveTo(p.Torso.Position, p.Torso); slash()
  1496. if (q.y-l.y)>3 and (q.y-l.y)<7 then
  1497. script.Parent.Humanoid:MoveTo(p.Torso.Position+Vector3.new(math.random(-4,4),0,math.random(-4,4)), p.Torso);
  1498. end
  1499. end
  1500. wait(1)
  1501. end
  1502. end
  1503. end
  1504. end
  1505.  
  1506. function attackany()
  1507. if script.Parent:findFirstChild("Sword")~=nil then
  1508.  
  1509. following=true
  1510. while following==true do
  1511.  
  1512. local ch=game.Players:children()
  1513. for i=1, #ch do
  1514. local l=game.Workspace:findFirstChild(ch[i].Name)
  1515. if l~=nil then
  1516. local s=l.Torso
  1517. local p=l.Torso.Position
  1518. local q=script.Parent.Torso.Position
  1519. local d=math.sqrt( ((p.x-q.x)^2)+((p.y-q.y)^2)+((p.z-q.z)^2) )
  1520. if smallest==nil then
  1521. smallest=d
  1522. target=s
  1523. elseif d<smallest then
  1524. smallest=d
  1525. target=s
  1526. end
  1527. end
  1528. end
  1529.  
  1530. if smallest==nil then stopmoving() return end
  1531.  
  1532. if smallest>6*dist then return end
  1533.  
  1534. script.Parent.Humanoid:MoveTo(target.Position, target)
  1535.  
  1536. if smallest<10 then
  1537. slash()
  1538. end
  1539. if target.Parent==nil then stopmoving() return end
  1540. wait(0.5)
  1541. for i=1, 3 do
  1542. if target.Parent.Humanoid.Health<1 then
  1543. stopmoving()
  1544. else
  1545. local p=target.Position
  1546. local q=script.Parent.Torso.Position
  1547. local d=math.sqrt( ((p.x-q.x)^2)+((p.y-q.y)^2)+((p.z-q.z)^2) )
  1548. if d<10 then
  1549. script.Parent.Humanoid:MoveTo(target.Position, target); slash()
  1550. if (q.y-p.y)>3 and (q.y-p.y)<7 then
  1551. script.Parent.Humanoid:MoveTo(p.Torso.Position+Vector3.new(math.random(-4,4),0,math.random(-4,4)), p.Torso);
  1552. end
  1553. end
  1554. wait(1)
  1555. end
  1556. end
  1557. end
  1558. end
  1559. end
  1560.  
  1561.  
  1562. function patrol()
  1563. if points==nil then
  1564. points=0
  1565. if game.Workspace:findFirstChild("pp1")~=nil then
  1566. pp1=game.Workspace:findFirstChild("pp1")
  1567. local points=points+1
  1568. if game.Workspace:findFirstChild("pp2")~=nil then
  1569. pp2=game.Workspace:findFirstChild("pp2")
  1570. local points=points+1
  1571. if game.Workspace:findFirstChild("pp3")~=nil then
  1572. pp3=game.Workspace:findFirstChild("pp3")
  1573. local points=points+1
  1574. if game.Workspace:findFirstChild("pp4")~=nil then
  1575. pp4=game.Workspace:findFirstChild("pp4")
  1576. local points=points+1
  1577. if game.Workspace:findFirstChild("pp5")~=nil then
  1578. pp5=game.Workspace:findFirstChild("pp5")
  1579. local points=points+1
  1580. if game.Workspace:findFirstChild("pp6")~=nil then
  1581. pp6=game.Workspace:findFirstChild("pp6")
  1582. local points=points+1
  1583. if game.Workspace:findFirstChild("pp7")~=nil then
  1584. pp7=game.Workspace:findFirstChild("pp7")
  1585. local points=points+1
  1586. if game.Workspace:findFirstChild("pp8")~=nil then
  1587. pp8=game.Workspace:findFirstChild("pp8")
  1588. local points=points+1
  1589. if game.Workspace:findFirstChild("pp9")~=nil then
  1590. pp9=game.Workspace:findFirstChild("pp9")
  1591. local points=points+1
  1592. end
  1593. end
  1594. end
  1595. end
  1596. end
  1597. end
  1598. end
  1599. end
  1600. end
  1601. end
  1602.  
  1603. if points<1 then return end
  1604. patrolling=true
  1605. local time=2
  1606. if points==1 then return end
  1607. if points>1 then
  1608. while patrolling==true do
  1609. script.Parent.Humanoid:MoveTo(pp1.Position, pp1)
  1610. wait(time)
  1611. script.Parent.Humanoid:MoveTo(pp2.Position, pp2)
  1612. wait(time)
  1613. if points>2 then
  1614. script.Parent.Humanoid:MoveTo(pp3.Position, pp3)
  1615. wait(time)
  1616. if points>3 then
  1617. script.Parent.Humanoid:MoveTo(pp4.Position, pp4)
  1618. wait(time)
  1619. if points>4 then
  1620. script.Parent.Humanoid:MoveTo(pp5.Position, pp5)
  1621. wait(time)
  1622. if points>5 then
  1623. script.Parent.Humanoid:MoveTo(pp6.Position, pp6)
  1624. wait(time)
  1625. if points>6 then
  1626. script.Parent.Humanoid:MoveTo(pp7.Position, pp7)
  1627. wait(time)
  1628. if points>7 then
  1629. script.Parent.Humanoid:MoveTo(pp8.Position, pp8)
  1630. wait(time)
  1631. if points>8 then
  1632. script.Parent.Humanoid:MoveTo(pp9.Position, pp9)
  1633. wait(time)
  1634. end
  1635. end
  1636. end
  1637. end
  1638. end
  1639. end
  1640. end
  1641. end
  1642. end
  1643. end
  1644.  
  1645.  
  1646. function goto(pos,part)
  1647. while true do
  1648. end
  1649. end
  1650.  
  1651.  
  1652. function slash()
  1653. for i=1, 3 do
  1654. wait(.3)
  1655. RightShoulder.MaxVelocity = 2
  1656. LeftShoulder.MaxVelocity = 1
  1657. RightShoulder.DesiredAngle = -2.14
  1658. LeftShoulder.DesiredAngle = 0
  1659. RightHip.DesiredAngle = 0
  1660. LeftHip.DesiredAngle = 0
  1661. wait(.2)
  1662. RightShoulder.MaxVelocity = 2
  1663. LeftShoulder.MaxVelocity = 1
  1664. RightShoulder.DesiredAngle = 0
  1665. LeftShoulder.DesiredAngle = 0
  1666. RightHip.DesiredAngle = 0
  1667. LeftHip.DesiredAngle = 0
  1668. end
  1669. end
  1670.  
  1671. function defence()
  1672. proxkill=true
  1673. while proxkill==true do
  1674. local ch=game.Players:children()
  1675. for i=1, #ch do
  1676. local p=game.Workspace:findFirstChild(ch[i].Name)
  1677. if p~=nil then
  1678. local p=p.Torso.Position
  1679. local q=script.Parent.Torso.Position
  1680. local d=math.sqrt( ((p.x-q.x)^2)+((p.y-q.y)^2)+((p.z-q.z)^2) )
  1681. if d<dist and d>8 then
  1682. local ex=Instance.new("Explosion")
  1683. ex.Position=p
  1684. ex.Parent=game.Workspace
  1685. end
  1686. end
  1687. end
  1688. wait(1)
  1689. end
  1690. end
  1691.  
  1692.  
  1693.  
  1694.  
  1695. -----------------------------------------------------------------------------------------------------------------------
  1696. -----------------------------------------------------------------------------------------------------------------------
  1697. -----------------------------------------------------------------------------------------------------------------------
  1698. -----------------------------------------------------------------------------------------------------------------------
  1699. -----------------------------------------------------------------------------------------------------------------------
  1700. -----------------------------------------------------------------------------------------------------------------------
  1701. -----------------------------------------------------------------------------------------------------------------------
  1702. -----------------------------------------------------------------------------------------------------------------------
  1703. -----------------------------------------------------------------------------------------------------------------------
  1704. -----------------------------------------------------------------------------------------------------------------------
  1705. -----------------------------------------------------------------------------------------------------------------------
  1706. -----------------------------------------------------------------------------------------------------------------------
  1707.  
  1708.  
  1709. Humanoid.Died:connect(onDied)
  1710. Humanoid.Running:connect(onRunning)
  1711. Humanoid.Jumping:connect(onJumping)
  1712. Humanoid.Climbing:connect(onClimbing)
  1713. Humanoid.GettingUp:connect(onGettingUp)
  1714. Humanoid.FreeFalling:connect(onFreeFall)
  1715. Humanoid.FallingDown:connect(onFallingDown)
  1716. Humanoid.Seated:connect(onSeated)
  1717.  
  1718.  
  1719. --[[
  1720.  
  1721. function newSound(id)
  1722. local sound = Instance.new("Sound")
  1723. sound.SoundId = id
  1724. sound.Parent = script.Parent.Head
  1725. return sound
  1726. end
  1727.  
  1728.  
  1729. local sDied = newSound("rbxasset://sounds/uuhhh.wav")
  1730. local sFallingDown = newSound("rbxasset://sounds/splat.wav")
  1731. local sFreeFalling = newSound("rbxasset://sounds/swoosh.wav")
  1732. local sGettingUp = newSound("rbxasset://sounds/hit.wav")
  1733. local sJumping = newSound("rbxasset://sounds/button.wav")
  1734. local sRunning = newSound("rbxasset://sounds/bfsl-minifigfoots1.mp3")
  1735. sRunning.Looped = true
  1736.  
  1737. local Figure = script.Parent
  1738. local Head = waitForChild(Figure, "Head")
  1739. local Humanoid = waitForChild(Figure, "Humanoid")
  1740.  
  1741.  
  1742. function onDied()
  1743. sDied:play()
  1744. end
  1745.  
  1746. function onState(state, sound)
  1747. if state then
  1748. sound:play()
  1749. else
  1750. sound:pause()
  1751. end
  1752. end
  1753.  
  1754. function onRunning(speed)
  1755. if speed>0 then
  1756. sRunning:play()
  1757. else
  1758. sRunning:pause()
  1759. end
  1760. end
  1761.  
  1762.  
  1763. Humanoid.Died:connect(onDied)
  1764. Humanoid.Running:connect(onRunning)
  1765. Humanoid.Jumping:connect(function(state) onState(state, sJumping) end)
  1766. Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end)
  1767. Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end)
  1768. Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end)
  1769. --]]
  1770.  
  1771. local nextTime = 0
  1772. local runService = game:service("RunService");
  1773.  
  1774. while Figure.Parent~=nil do
  1775. time = runService.Stepped:wait()
  1776. if time > nextTime then
  1777. move(time)
  1778. nextTime = time + 0.1
  1779. end
  1780. end
  1781.  
  1782. end,o158)
  1783. end))
  1784. o159 = Create("Part",{
  1785. ["Name"] = "Torso",
  1786. ["Parent"] = o2,
  1787. ["BrickColor"] = BrickColor.new("Reddish brown"),
  1788. ["Position"] = Vector3.new(-6.5999999, 4.47241116, -11.7410002),
  1789. ["Rotation"] = Vector3.new(-175.307953, 1.26414217e-039, -180),
  1790. ["CFrame"] = CFrame.new(-6.5999999, 4.47241116, -11.7410002, -1, 0, 2.20634443e-041, 0, 0.996648729, 0.0818002596, 1.11071615e-027, 0.0818002596, -0.996648729),
  1791. ["FormFactor"] = Enum.FormFactor.Symmetric,
  1792. ["Size"] = Vector3.new(2, 2, 1),
  1793. ["Color"] = Color3.new(0.411765, 0.25098, 0.156863),
  1794. })
  1795. o160 = Create("Motor",{
  1796. ["Name"] = "Left Hip",
  1797. ["Parent"] = o159,
  1798. ["Part0"] = o159,
  1799. ["Part1"] = o152,
  1800. ["DesiredAngle"] = 0.081891760230064,
  1801. ["MaxVelocity"] = 0.10000000149012,
  1802. })
  1803. o161 = Create("Snap",{
  1804. ["Name"] = "Neck",
  1805. ["Parent"] = o159,
  1806. })
  1807. o162 = Create("Motor",{
  1808. ["Name"] = "Right Hip",
  1809. ["Parent"] = o159,
  1810. ["Part0"] = o159,
  1811. ["Part1"] = o153,
  1812. ["DesiredAngle"] = 0.081891760230064,
  1813. ["MaxVelocity"] = 0.10000000149012,
  1814. })
  1815. o163 = Create("Motor",{
  1816. ["Name"] = "Left Shoulder",
  1817. ["Parent"] = o159,
  1818. ["Part0"] = o155,
  1819. ["Part1"] = o159,
  1820. ["DesiredAngle"] = -0.081891760230064,
  1821. ["MaxVelocity"] = 0.15000000596046,
  1822. })
  1823. o164 = Create("Script",{
  1824. ["Name"] = "BloodScript",
  1825. ["Parent"] = o1,
  1826. })
  1827. table.insert(cors,coroutine.create(function()
  1828. wait()
  1829. runDummyScript(function()
  1830. function onPlayerDied(dead)
  1831. local h = script.Parent.Humanoid
  1832. if (h.Health==0) then
  1833. local head = script.Parent.Head
  1834. local blood1 = Instance.new("Part")
  1835. blood1.BrickColor = BrickColor.new(21)
  1836. blood1.formFactor = 2
  1837. blood1.Size = Vector3.new(1, 0.4, 1)
  1838. blood1.Position = head.Position
  1839. blood1.Name = "Blood"
  1840. blood1.Parent = script.Parent
  1841. local blood2 = Instance.new("Part")
  1842. blood2.BrickColor = BrickColor.new(21)
  1843. blood2.formFactor = 2
  1844. blood2.Size = Vector3.new(1, 0.4, 1)
  1845. blood2.Position = head.Position
  1846. blood2.Name = "Blood"
  1847. blood2.Parent = script.Parent
  1848. local blood3 = Instance.new("Part")
  1849. blood3.BrickColor = BrickColor.new(21)
  1850. blood3.formFactor = 2
  1851. blood3.Size = Vector3.new(1, 0.4, 1)
  1852. blood3.Position = head.Position
  1853. blood3.Name = "Blood"
  1854. blood3.Parent = script.Parent
  1855. local blood4 = Instance.new("Part")
  1856. blood4.BrickColor = BrickColor.new(21)
  1857. blood4.formFactor = 2
  1858. blood4.Size = Vector3.new(1, 0.4, 1)
  1859. blood4.Position = head.Position
  1860. blood4.Name = "Blood"
  1861. blood4.Parent = script.Parent
  1862.  
  1863. end
  1864. end
  1865.  
  1866. script.Parent.Humanoid.Died:connect(onPlayerDied)
  1867.  
  1868. end,o164)
  1869. end))
  1870. o165 = Create("Script",{
  1871. ["Name"] = "BloodScript",
  1872. ["Parent"] = o164,
  1873. })
  1874. table.insert(cors,coroutine.create(function()
  1875. wait()
  1876. runDummyScript(function()
  1877. function onPlayerDied(dead)
  1878. local h = script.Parent.Humanoid
  1879. if (h.Health==0) then
  1880. local head = script.Parent.Head
  1881. local blood1 = Instance.new("Part")
  1882. blood1.BrickColor = BrickColor.new(21)
  1883. blood1.formFactor = 2
  1884. blood1.Size = Vector3.new(1, 0.4, 1)
  1885. blood1.Position = head.Position
  1886. blood1.Name = "Blood"
  1887. blood1.Parent = script.Parent
  1888. local blood2 = Instance.new("Part")
  1889. blood2.BrickColor = BrickColor.new(21)
  1890. blood2.formFactor = 2
  1891. blood2.Size = Vector3.new(1, 0.4, 1)
  1892. blood2.Position = head.Position
  1893. blood2.Name = "Blood"
  1894. blood2.Parent = script.Parent
  1895. local blood3 = Instance.new("Part")
  1896. blood3.BrickColor = BrickColor.new(21)
  1897. blood3.formFactor = 2
  1898. blood3.Size = Vector3.new(1, 0.4, 1)
  1899. blood3.Position = head.Position
  1900. blood3.Name = "Blood"
  1901. blood3.Parent = script.Parent
  1902.  
  1903. end
  1904. end
  1905.  
  1906. script.Parent.Humanoid.Died:connect(onPlayerDied)
  1907.  
  1908. end,o165)
  1909. end))
  1910. o166 = Create("Script",{
  1911. ["Name"] = "BloodScript",
  1912. ["Parent"] = o164,
  1913. })
  1914. table.insert(cors,coroutine.create(function()
  1915. wait()
  1916. runDummyScript(function()
  1917. function onPlayerDied(dead)
  1918. local h = script.Parent.Humanoid
  1919. if (h.Health==0) then
  1920. local head = script.Parent.Head
  1921. local blood1 = Instance.new("Part")
  1922. blood1.BrickColor = BrickColor.new(21)
  1923. blood1.formFactor = 2
  1924. blood1.Size = Vector3.new(1, 0.4, 1)
  1925. blood1.Position = head.Position
  1926. blood1.Name = "Blood"
  1927. blood1.Parent = script.Parent
  1928. local blood2 = Instance.new("Part")
  1929. blood2.BrickColor = BrickColor.new(21)
  1930. blood2.formFactor = 2
  1931. blood2.Size = Vector3.new(1, 0.4, 1)
  1932. blood2.Position = head.Position
  1933. blood2.Name = "Blood"
  1934. blood2.Parent = script.Parent
  1935. local blood3 = Instance.new("Part")
  1936. blood3.BrickColor = BrickColor.new(21)
  1937. blood3.formFactor = 2
  1938. blood3.Size = Vector3.new(1, 0.4, 1)
  1939. blood3.Position = head.Position
  1940. blood3.Name = "Blood"
  1941. blood3.Parent = script.Parent
  1942.  
  1943. end
  1944. end
  1945.  
  1946. script.Parent.Humanoid.Died:connect(onPlayerDied)
  1947.  
  1948. end,o166)
  1949. end))
  1950. o167 = Create("Script",{
  1951. ["Name"] = "BloodScript",
  1952. ["Parent"] = o164,
  1953. })
  1954. table.insert(cors,coroutine.create(function()
  1955. wait()
  1956. runDummyScript(function()
  1957. function onPlayerDied(dead)
  1958. local h = script.Parent.Humanoid
  1959. if (h.Health==0) then
  1960. local head = script.Parent.Head
  1961. local blood1 = Instance.new("Part")
  1962. blood1.BrickColor = BrickColor.new(21)
  1963. blood1.formFactor = 2
  1964. blood1.Size = Vector3.new(1, 0.4, 1)
  1965. blood1.Position = head.Position
  1966. blood1.Name = "Blood"
  1967. blood1.Parent = script.Parent
  1968. local blood2 = Instance.new("Part")
  1969. blood2.BrickColor = BrickColor.new(21)
  1970. blood2.formFactor = 2
  1971. blood2.Size = Vector3.new(1, 0.4, 1)
  1972. blood2.Position = head.Position
  1973. blood2.Name = "Blood"
  1974. blood2.Parent = script.Parent
  1975. local blood3 = Instance.new("Part")
  1976. blood3.BrickColor = BrickColor.new(21)
  1977. blood3.formFactor = 2
  1978. blood3.Size = Vector3.new(1, 0.4, 1)
  1979. blood3.Position = head.Position
  1980. blood3.Name = "Blood"
  1981. blood3.Parent = script.Parent
  1982. local blood4 = Instance.new("Part")
  1983. blood4.BrickColor = BrickColor.new(21)
  1984. blood4.formFactor = 2
  1985. blood4.Size = Vector3.new(1, 0.4, 1)
  1986. blood4.Position = head.Position
  1987. blood4.Name = "Blood"
  1988. blood4.Parent = script.Parent
  1989.  
  1990. end
  1991. end
  1992.  
  1993. script.Parent.Humanoid.Died:connect(onPlayerDied)
  1994.  
  1995. end,o167)
  1996. end))
  1997. o168 = Create("Part",{
  1998. ["Name"] = "Smooth Block Model",
  1999. ["Parent"] = o1,
  2000. ["BrickColor"] = BrickColor.new("Medium green"),
  2001. ["Position"] = Vector3.new(-6.5999999, 0.843410015, -11.5369997),
  2002. ["Rotation"] = Vector3.new(-175.307953, 1.36643061e-018, -180),
  2003. ["Anchored"] = true,
  2004. ["CFrame"] = CFrame.new(-6.5999999, 0.843410015, -11.5369997, -1, 3.91421785e-021, 2.38487124e-020, 5.85193125e-021, 0.996648729, 0.0818002596, -2.34486042e-020, 0.0818002596, -0.996648729),
  2005. ["Size"] = Vector3.new(6, 1.20000005, 6),
  2006. ["TopSurface"] = Enum.SurfaceType.Smooth,
  2007. ["Color"] = Color3.new(0.631373, 0.768628, 0.54902),
  2008. })
  2009. o169 = Create("Decal",{
  2010. ["Parent"] = o168,
  2011. ["Texture"] = "rbxasset://Textures/SpawnLocation.png",
  2012. ["Face"] = Enum.NormalId.Top,
  2013. })
  2014. mas.Parent = workspace
  2015. mas:MakeJoints()
  2016. local mas1 = mas:GetChildren()
  2017. for i=1,#mas1 do
  2018. mas1[i].Parent = script
  2019. ypcall(function() mas1[i]:MakeJoints() end)
  2020. end
  2021. mas:Destroy()
  2022. for i=1,#cors do
  2023. coroutine.resume(cors[i])
  2024. end
Advertisement
Add Comment
Please, Sign In to add comment