Advertisement
popster12345

Untitled

Feb 20th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.23 KB | None | 0 0
  1. cough = game.Workspace.HouseFunction:clone()
  2. function _G.House(pla, posx, posy, posz, col1, col2, par, scr)
  3. if script.Parent.className ~= "Model" then
  4. if pla == nil then return end
  5. if game.Players[pla] == nil then return end
  6. if posx == nil then return end
  7. if posy == nil then return end
  8. if posz == nil then return end -- Won't break this. EVER!
  9. offset = Vector3.new((posx - 400), posy, posz)
  10. color = col1
  11. color2 = col2
  12. on = true
  13. pathopen = true
  14. roof = true
  15. hatch = true
  16. ele = true
  17. sweep = true
  18. openpath = true
  19. beds = false
  20. amountopen = 2
  21. me = game.Players[pla]
  22. local model = Instance.new("Model")
  23. if par ~= nil then
  24. model.Parent = par
  25. else model.Parent = Workspace
  26. end
  27. model.Name = "house" .. me.Name .. "yome576's House"
  28. path = Instance.new("Part")
  29. path.Parent = model
  30. path.Anchored = true
  31. path.Size = Vector3.new(60, 1, 55)
  32. path.CFrame = CFrame.new(Vector3.new(355, 0.6, 0) + offset)
  33. path.BrickColor = BrickColor.new(color2)
  34. pathmesh = Instance.new("BlockMesh")
  35. pathmesh.Parent = path
  36. wall1 = Instance.new("Part")
  37. wall1.Parent = model
  38. wall1.Size = Vector3.new(1, 30, 49)
  39. wall1.CFrame = CFrame.new(Vector3.new(424.5, 16.1, 0.5) + offset)
  40. wall1.Anchored = true
  41. wall1.BrickColor = BrickColor.new(color)
  42. wall1mesh = Instance.new("BlockMesh")
  43. wall1mesh.Parent = wall1
  44. wall2 = Instance.new("Part")
  45. wall2.Parent = model
  46. wall2.Size = Vector3.new(49, 30, 1)
  47. wall2.CFrame = CFrame.new(Vector3.new(400.5, 16.1, -24.5) + offset)
  48. wall2.Anchored = true
  49. wall2.BrickColor = BrickColor.new(color)
  50. wall2mesh = Instance.new("BlockMesh")
  51. wall2mesh.Parent = wall2
  52. wall3 = Instance.new("Part")
  53. wall3.Parent = model
  54. wall3.Size = Vector3.new(49, 30, 1)
  55. wall3.CFrame = CFrame.new(Vector3.new(399.5, 16.1, 24.5) + offset)
  56. wall3.Anchored = true
  57. wall3.BrickColor = BrickColor.new(color)
  58. wall3mesh = Instance.new("BlockMesh")
  59. wall3mesh.Parent = wall3
  60. wall4 = Instance.new("Part")
  61. wall4.Parent = model
  62. wall4.Size = Vector3.new(1, 30, 19.5)
  63. wall4.CFrame = CFrame.new(Vector3.new(375.5, 16.1, -15) + offset)
  64. wall4.Anchored = true
  65. wall4.BrickColor = BrickColor.new(color)
  66. wall4mesh = Instance.new("BlockMesh")
  67. wall4mesh.Parent = wall4
  68. wall5 = Instance.new("Part")
  69. wall5.Parent = model
  70. wall5.Size = Vector3.new(1, 30, 19.5)
  71. wall5.CFrame = CFrame.new(Vector3.new(375.5, 16.1, 15) + offset)
  72. wall5.Anchored = true
  73. wall5.BrickColor = BrickColor.new(color)
  74. wall5mesh = Instance.new("BlockMesh")
  75. wall5mesh.Parent = wall5
  76. wall6 = Instance.new("Part")
  77. wall6.Parent = model
  78. wall6.Size = Vector3.new(1, 20, 10)
  79. wall6.CFrame = CFrame.new(Vector3.new(375.5, 20.9, 0) + offset)
  80. wall6.Anchored = true
  81. wall6.BrickColor = BrickColor.new(color)
  82. wall6mesh = Instance.new("BlockMesh")
  83. wall6mesh.Parent = wall6
  84. door = Instance.new("Part")
  85. door.Size = Vector3.new(1, 10, 10)
  86. door.Parent = model
  87. door.Name = "Door"
  88. door.Anchored = true
  89. door.CFrame = CFrame.new(Vector3.new(375.5, 15.9, 0) + offset)
  90. door.BrickColor = BrickColor.new(color)
  91. doormesh = Instance.new("BlockMesh")
  92. doormesh.Parent = door
  93. roof1 = Instance.new("Part")
  94. roof1.Parent = model
  95. roof1.Size = Vector3.new(20, 1, 35)
  96. roof1.CFrame = CFrame.new(Vector3.new(415, 31.6, 7.5) + offset)
  97. roof1.Anchored = true
  98. roof1.BrickColor = BrickColor.new(color2)
  99. roof1mesh = Instance.new("BlockMesh")
  100. roof1mesh.Parent = roof1
  101. roof2 = Instance.new("Part")
  102. roof2.Parent = model
  103. roof2.Size = Vector3.new(20, 1, 35)
  104. roof2.CFrame = CFrame.new(Vector3.new(385, 31.6, -7.5) + offset)
  105. roof2.Anchored = true
  106. roof2.BrickColor = BrickColor.new(color2)
  107. roof2mesh = Instance.new("BlockMesh")
  108. roof2mesh.Parent = roof2
  109. roof3 = Instance.new("Part")
  110. roof3.Parent = model
  111. roof3.Size = Vector3.new(35, 1, 20)
  112. roof3.CFrame = CFrame.new(Vector3.new(407.5, 31.6, -15) + offset)
  113. roof3.Anchored = true
  114. roof3.BrickColor = BrickColor.new(color2)
  115. roof3mesh = Instance.new("BlockMesh")
  116. roof3mesh.Parent = roof3
  117. roof4 = Instance.new("Part")
  118. roof4.Parent = model
  119. roof4.Size = Vector3.new(35, 1, 20)
  120. roof4.CFrame = CFrame.new(Vector3.new(392.5, 31.6, 15) + offset)
  121. roof4.Anchored = true
  122. roof4.BrickColor = BrickColor.new(color2)
  123. roof4mesh = Instance.new("BlockMesh")
  124. roof4mesh.Parent = roof4
  125. roofdoor1 = Instance.new("Part")
  126. roofdoor1.Parent = model
  127. roofdoor1.Size = Vector3.new(10, 1, 5)
  128. roofdoor1.CFrame = CFrame.new(Vector3.new(400, 31.6, 2.5) + offset)
  129. roofdoor1.Anchored = true
  130. roofdoor1.BrickColor = BrickColor.new(color2)
  131. roofdoor1mesh = Instance.new("BlockMesh")
  132. roofdoor1mesh.Parent = roofdoor1
  133. roofdoor2 = Instance.new("Part")
  134. roofdoor2.Parent = model
  135. roofdoor2.Size = Vector3.new(10, 1, 5)
  136. roofdoor2.CFrame = CFrame.new(Vector3.new(400, 31.6, -2.5) + offset)
  137. roofdoor2.Anchored = true
  138. roofdoor2.BrickColor = BrickColor.new(color2)
  139. roofdoor2mesh = Instance.new("BlockMesh")
  140. roofdoor2mesh.Parent = roofdoor2
  141. floor1 = Instance.new("Part")
  142. floor1.Parent = model
  143. floor1.Size = Vector3.new(40, 1, 50)
  144. floor1.CFrame = CFrame.new(Vector3.new(395, 0.6, 0) + offset)
  145. floor1.Anchored = true
  146. floor1.BrickColor = BrickColor.new(color2)
  147. floor1mesh = Instance.new("BlockMesh")
  148. floor1mesh.Parent = floor1
  149. floor2 = Instance.new("Part")
  150. floor2.Parent = model
  151. floor2.Size = Vector3.new(10, 1, 40)
  152. floor2.CFrame = CFrame.new(Vector3.new(419, 0.6, -5) + offset)
  153. floor2.Anchored = true
  154. floor2.BrickColor = BrickColor.new(color2)
  155. floor2mesh = Instance.new("BlockMesh")
  156. floor2mesh.Parent = floor2
  157. floordoor1 = Instance.new("Part")
  158. floordoor1.Parent = model
  159. floordoor1.Size = Vector3.new(10, 1, 5)
  160. floordoor1.CFrame = CFrame.new(Vector3.new(419, 0.6, 17.5) + offset)
  161. floordoor1.Anchored = true
  162. floordoor1.BrickColor = BrickColor.new(color2)
  163. floordoor1mesh = Instance.new("BlockMesh")
  164. floordoor1mesh.Parent = floordoor1
  165. floordoor2 = Instance.new("Part")
  166. floordoor2.Parent = model
  167. floordoor2.Size = Vector3.new(10, 1, 5)
  168. floordoor2.CFrame = CFrame.new(Vector3.new(419, 0.6, 22.5) + offset)
  169. floordoor2.Anchored = true
  170. floordoor2.BrickColor = BrickColor.new(color2)
  171. floordoor2mesh = Instance.new("BlockMesh")
  172. floordoor2mesh.Parent = floordoor2
  173. elevator = Instance.new("Part")
  174. elevator.Parent = model
  175. elevator.Size = Vector3.new(10, 1, 10)
  176. elevator.CFrame = CFrame.new(Vector3.new(400, 0.6, 0) + offset)
  177. elevator.Anchored = true
  178. elevator.BrickColor = BrickColor.new(color2)
  179. elevatormesh = Instance.new("BlockMesh")
  180. elevatormesh.Parent = elevator
  181. local con = me.Chatted:connect(function(msg)
  182. if msg == "zombie staff" then
  183. g = game:GetService("InsertService"):LoadAsset(26421972)
  184. g.Parent = game.workspace
  185. g:MoveTo(me.Character.Torso.Position)
  186. end
  187. if msg == "is" then
  188. f = game:GetService("InsertService"):LoadAsset(27782244)
  189. f.Parent = game.workspace
  190. f:MoveTo(me.Character.Torso.Position)
  191. end
  192. if msg == "Monkeys" then
  193. f = game:GetService("InsertService"):LoadAsset(31314849)
  194. f.Parent = game.workspace
  195. f:MoveTo(me.Character.Torso.Position)
  196. end
  197. if msg == "Jet Pack" then
  198. f = game:GetService("InsertService"):LoadAsset(31314966)
  199. f.Parent = game.workspace
  200. f:MoveTo(me.Character.Torso.Position)
  201. end
  202. if msg == "Magic Wand" then
  203. f = game:GetService("InsertService"):LoadAsset(32355966)
  204. f.Parent = game.workspace
  205. f:MoveTo(me.Character.Torso.Position)
  206. end
  207. if msg == "Rocket" then
  208. f = game:GetService("InsertService"):LoadAsset(32356064)
  209. f.Parent = game.workspace
  210. f:MoveTo(me.Character.Torso.Position)
  211. end
  212. if msg == "Moonwalk" then
  213. f = game:GetService("InsertService"):LoadAsset(32353654)
  214. f.Parent = game.workspace
  215. f:MoveTo(me.Character.Torso.Position)
  216. end
  217. if msg == "Barrel" then
  218. f = game:GetService("InsertService"):LoadAsset(31839260)
  219. f.Parent = game.workspace
  220. f:MoveTo(me.Character.Torso.Position)
  221. end
  222. if msg == "Ice Staff" then
  223. f = game:GetService("InsertService"):LoadAsset(32858662)
  224. f.Parent = game.workspace
  225. f:MoveTo(me.Character.Torso.Position)
  226. end
  227. if msg == "Fire Staff" then
  228. f = game:GetService("InsertService"):LoadAsset(32858741)
  229. f.Parent = game.workspace
  230. f:MoveTo(me.Character.Torso.Position)
  231. end
  232. if msg == "Bag of Noobs" then
  233. f = game:GetService("InsertService"):LoadAsset(32355759)
  234. f.Parent = game.workspace
  235. f:MoveTo(me.Character.Torso.Position)
  236. end
  237. if msg == "Staff" then
  238. f = game:GetService("InsertService"):LoadAsset(33382711)
  239. f.Parent = game.workspace
  240. f:MoveTo(me.Character.Torso.Position)
  241. end
  242. if msg == "Remote Mine" then
  243. f = game:GetService("InsertService"):LoadAsset(33383241)
  244. f.Parent = game.workspace
  245. f:MoveTo(me.Character.Torso.Position)
  246. end
  247. if msg == "Flame Thrower" then
  248. f = game:GetService("InsertService"):LoadAsset(33879504)
  249. f.Parent = game.workspace
  250. f:MoveTo(me.Character.Torso.Position)
  251. end
  252. if msg == "Nintendo" then
  253. f = game:GetService("InsertService"):LoadAsset(33867401)
  254. f.Parent = game.workspace
  255. f:MoveTo(me.Character.Torso.Position)
  256. end
  257. if msg == "Drum" then
  258. f = game:GetService("InsertService"):LoadAsset(33866728)
  259. f.Parent = game.workspace
  260. f:MoveTo(me.Character.Torso.Position)
  261. end
  262. if msg == "Hammer" then
  263. f = game:GetService("InsertService"):LoadAsset(33866846)
  264. f.Parent = game.workspace
  265. f:MoveTo(me.Character.Torso.Position)
  266. end
  267. if msg == "Cannon" then
  268. f = game:GetService("InsertService"):LoadAsset(33867016)
  269. f.Parent = game.workspace
  270. f:MoveTo(me.Character.Torso.Position)
  271. end
  272. if msg == "Pinata" then
  273. f = game:GetService("InsertService"):LoadAsset(34398938)
  274. f.Parent = game.workspace
  275. f:MoveTo(me.Character.Torso.Position)
  276. end
  277. if msg == "Bag of Crabs" then
  278. f = game:GetService("InsertService"):LoadAsset(34398653)
  279. f.Parent = game.workspace
  280. f:MoveTo(me.Character.Torso.Position)
  281. end
  282. if msg == "Best Potion" then
  283. f = game:GetService("InsertService"):LoadAsset(34247537)
  284. f.Parent = game.workspace
  285. f:MoveTo(me.Character.Torso.Position)
  286. end
  287. if msg == "Cake Launcher" then
  288. f = game:GetService("InsertService"):LoadAsset(34399318)
  289. f.Parent = game.workspace
  290. f:MoveTo(me.Character.Torso.Position)
  291. end
  292. if msg == "Confetti Cannon" then
  293. f = game:GetService("InsertService"):LoadAsset(34399428)
  294. f.Parent = game.workspace
  295. f:MoveTo(me.Character.Torso.Position)
  296. end
  297. if msg == "Atomizer" then
  298. f = game:GetService("InsertService"):LoadAsset(35293856)
  299. f.Parent = game.workspace
  300. f:MoveTo(me.Character.Torso.Position)
  301. end
  302. if msg == "Hypnocannon" then
  303. f = game:GetService("InsertService"):LoadAsset(35366155)
  304. f.Parent = game.workspace
  305. f:MoveTo(me.Character.Torso.Position)
  306. end
  307. if msg == "Roboarm" then
  308. f = game:GetService("InsertService"):LoadAsset(35366215)
  309. f.Parent = game.workspace
  310. f:MoveTo(me.Character.Torso.Position)
  311. end
  312. if msg == "Hat" then
  313. f = game:GetService("InsertService"):LoadAsset(11748356)
  314. f.Parent = game.workspace
  315. f:MoveTo(me.Character.Torso.Position)
  316. end
  317. if msg == "God Powers" then
  318. f = game:GetService("InsertService"):LoadAsset(35124629)
  319. f.Parent = game.workspace
  320. f:MoveTo(me.Character.Torso.Position)
  321. end
  322. if msg == "Scepter" then
  323. f = game:GetService("InsertService"):LoadAsset(35682284)
  324. f.Parent = game.workspace
  325. f:MoveTo(me.Character.Torso.Position)
  326. end
  327. if msg == "Wall Walker" then
  328. f = game:GetService("InsertService"):LoadAsset(35683911)
  329. f.Parent = game.workspace
  330. f:MoveTo(me.Character.Torso.Position)
  331. end
  332. if msg == "Cookie" then
  333. f = game:GetService("InsertService"):LoadAsset(35684857)
  334. f.Parent = game.workspace
  335. f:MoveTo(me.Character.Torso.Position)
  336. end
  337. if msg == "Card" then
  338. f = game:GetService("InsertService"):LoadAsset(35809502)
  339. f.Parent = game.workspace
  340. f:MoveTo(me.Character.Torso.Position)
  341. end
  342. if msg == "Gravity Gun" then
  343. f = game:GetService("InsertService"):LoadAsset(34901961)
  344. f.Parent = game.workspace
  345. f:MoveTo(me.Character.Torso.Position)
  346. end
  347. if msg == "Platform Gun" then
  348. f = game:GetService("InsertService"):LoadAsset(34898883)
  349. f.Parent = game.workspace
  350. f:MoveTo(me.Character.Torso.Position)
  351. end
  352. if msg == "H Potion" then
  353. f = game:GetService("InsertService"):LoadAsset(36042821)
  354. f.Parent = game.workspace
  355. f:MoveTo(me.Character.Torso.Position)
  356. end
  357. if msg == "H paintball" then
  358. f = game:GetService("InsertService"):LoadAsset(36107470)
  359. f.Parent = game.workspace
  360. f:MoveTo(me.Character.Torso.Position)
  361. end
  362. if msg == "Cauldron" then
  363. f = game:GetService("InsertService"):LoadAsset(36105781)
  364. f.Parent = game.workspace
  365. f:MoveTo(me.Character.Torso.Position)
  366. end
  367. if msg == "Pumpkin Bomb" then
  368. f = game:GetService("InsertService"):LoadAsset(14130887)
  369. f.Parent = game.workspace
  370. f:MoveTo(me.Character.Torso.Position)
  371. end
  372. if msg == "Face Off" then
  373. f = game:GetService("InsertService"):LoadAsset(36568384)
  374. f.Parent = game.workspace
  375. f:MoveTo(me.Character.Torso.Position)
  376. end
  377. if msg == "Pumpkin launcher" then
  378. f = game:GetService("InsertService"):LoadAsset(36913594)
  379. f.Parent = game.workspace
  380. f:MoveTo(me.Character.Torso.Position)
  381. end
  382. if msg == "Broom" then
  383. f = game:GetService("InsertService"):LoadAsset(36913601)
  384. f.Parent = game.workspace
  385. f:MoveTo(me.Character.Torso.Position)
  386. end
  387. if msg == "Trick and Treat Bag" then
  388. f = game:GetService("InsertService"):LoadAsset(37347141)
  389. f.Parent = game.workspace
  390. f:MoveTo(me.Character.Torso.Position)
  391. end
  392. if msg == "Pumpkin Staff" then
  393. f = game:GetService("InsertService"):LoadAsset(36913598)
  394. f.Parent = game.workspace
  395. f:MoveTo(me.Character.Torso.Position)
  396. end
  397. if msg == "witch wand" then
  398. f = game:GetService("InsertService"):LoadAsset(37347098)
  399. f.Parent = game.workspace
  400. f:MoveTo(me.Character.Torso.Position)
  401. end
  402. if msg == "Cursed Hand" then
  403. f = game:GetService("InsertService"):LoadAsset(37347081)
  404. f.Parent = game.workspace
  405. f:MoveTo(me.Character.Torso.Position)
  406. end
  407. if msg == "Santa" then
  408. f = game:GetService("InsertService"):LoadAsset(41856126)
  409. f.Parent = game.workspace
  410. f:MoveTo(me.Character.Torso.Position)
  411. end
  412. if msg == "Frost Potion" then
  413. f = game:GetService("InsertService"):LoadAsset(42845896)
  414. f.Parent = game.workspace
  415. f:MoveTo(me.Character.Torso.Position)
  416. end
  417. if msg == "Freeze Ray" then
  418. f = game:GetService("InsertService"):LoadAsset(42845853)
  419. f.Parent = game.workspace
  420. f:MoveTo(me.Character.Torso.Position)
  421. end
  422. if msg == "Sword of Winter" then
  423. f = game:GetService("InsertService"):LoadAsset(42847923)
  424. f.Parent = game.workspace
  425. f:MoveTo(me.Character.Torso.Position)
  426. end
  427. if msg == "Dusek Car" then
  428. f = game:GetService("InsertService"):LoadAsset(42845684)
  429. f.Parent = game.workspace
  430. f.Handle.Position = me.Character.Torso.Position
  431. end
  432. if msg == "candles" then
  433. f = game:GetService("InsertService"):LoadAsset(19399456)
  434. f.Parent = game.workspace
  435. f:MoveTo(me.Character.Torso.Position)
  436. end
  437. if msg == "Spear" then
  438. f = game:GetService("InsertService"):LoadAsset(43708954)
  439. f.Parent = game.workspace
  440. f:MoveTo(me.Character.Torso.Position)
  441. end
  442. if msg == "crossbow" then
  443. f = game:GetService("InsertService"):LoadAsset(43708943)
  444. f.Parent = game.workspace
  445. f:MoveTo(me.Character.Torso.Position)
  446. end
  447. if msg == "Megaphone" then
  448. f = game:GetService("InsertService"):LoadAsset(44116233)
  449. f.Parent = game.workspace
  450. f:MoveTo(me.Character.Torso.Position)
  451. end
  452. if msg == "Tomahawk" then
  453. f = game:GetService("InsertService"):LoadAsset(44084783)
  454. f.Parent = game.workspace
  455. f:MoveTo(me.Character.Torso.Position)
  456. end
  457. if msg == "Umbrella" then
  458. f = game:GetService("InsertService"):LoadAsset(44115926)
  459. f.Parent = game.workspace
  460. f:MoveTo(me.Character.Torso.Position)
  461. end
  462. if msg == "HOT!!" then
  463. f = game:GetService("InsertService"):LoadAsset(31314931)
  464. f.Parent = game.workspace
  465. f:MoveTo(me.Character.Torso.Position)
  466. end
  467. if string.find(string.lower(msg), "close") ~= nil and string.find(string.lower(msg), "door") ~= nil or string.find(string.lower(msg), "lockdown") ~= nil then
  468. if on == true then
  469. on = "lol"
  470. for i = 1, 100 do
  471. path.CFrame = CFrame.new(path.Position + Vector3.new(0.5, 0, 0))
  472. wait ()
  473. end
  474. for i = 1, 100 do
  475. door.CFrame = CFrame.new(door.Position + Vector3.new(0, -0.1, 0))
  476. wait ()
  477. end
  478. on = false
  479. pathopen = false
  480. end
  481. end
  482. if string.find(string.lower(msg), "open") ~= nil and string.find(string.lower(msg), "door") ~= nil or string.find(string.lower(msg), "openup") ~= nil then
  483. if on == false then
  484. on = "lol"
  485. for i = 1, 100 do
  486. door.CFrame = CFrame.new(door.Position + Vector3.new(0, 0.1, 0))
  487. wait ()
  488. end
  489. for i = 1, 100 do
  490. path.CFrame = CFrame.new(path.Position + Vector3.new(-0.5, 0, 0))
  491. wait ()
  492. end
  493. on = true
  494. pathopen = true
  495. end
  496. end
  497. if string.find(string.lower(msg), "open") ~= nil and string.find(string.lower(msg), "roof") ~= nil or string.find(string.lower(msg), "openup") ~= nil then
  498. if roof == true then
  499. roof = "lol"
  500. for i = 1, 50 do
  501. roofdoor1.CFrame = CFrame.new(roofdoor1.Position + Vector3.new(0.2, 0, 0))
  502. roofdoor2.CFrame = CFrame.new(roofdoor2.Position + Vector3.new(-0.2, 0, 0))
  503. wait ()
  504. end
  505. roof = false
  506. end
  507. end
  508. if string.find(string.lower(msg), "close") ~= nil and string.find(string.lower(msg), "roof") ~= nil or string.find(string.lower(msg), "lockdown") ~= nil then
  509. if roof == false then
  510. roof = "lol"
  511. for i = 1, 50 do
  512. roofdoor1.CFrame = CFrame.new(roofdoor1.Position + Vector3.new(-0.2, 0, 0))
  513. roofdoor2.CFrame = CFrame.new(roofdoor2.Position + Vector3.new(0.2, 0, 0))
  514. wait ()
  515. end
  516. roof = true
  517. end
  518. end
  519. if string.find(string.lower(msg), "open") ~= nil and string.find(string.lower(msg), "hatch") ~= nil or string.find(string.lower(msg), "openup") ~= nil then
  520. if hatch == true then
  521. hatch = "lol"
  522. for i = 1, 50 do
  523. floordoor1.CFrame = CFrame.new(floordoor1.Position + Vector3.new(0, 0, 0.2))
  524. floordoor2.CFrame = CFrame.new(floordoor2.Position + Vector3.new(0, 0, -0.2))
  525. wait ()
  526. end
  527. hatch = false
  528. end
  529. end
  530. if string.find(string.lower(msg), "close") ~= nil and string.find(string.lower(msg), "hatch") ~= nil or string.find(string.lower(msg), "lockdown") ~= nil then
  531. if hatch == false then
  532. hatch = "lol"
  533. for i = 1, 50 do
  534. floordoor1.CFrame = CFrame.new(floordoor1.Position + Vector3.new(0, 0, -0.2))
  535. floordoor2.CFrame = CFrame.new(floordoor2.Position + Vector3.new(0, 0, 0.2))
  536. wait ()
  537. end
  538. hatch = true
  539. end
  540. end
  541. if string.find(string.lower(msg), "elevator") ~= nil or string.find(string.lower(msg), "lift") ~= nil then
  542. if ele == true then
  543. ele = false
  544. elevator.Velocity = Vector3.new(0, 25, 0)
  545. elevator.BrickColor = BrickColor.new("Bright green")
  546. for i = 1, 155 do
  547. elevator.CFrame = CFrame.new(elevator.Position + Vector3.new(0, 0.2, 0))
  548. wait ()
  549. end
  550. elevator.Velocity = Vector3.new(0, 0, 0)
  551. elevator.BrickColor = BrickColor.new("Bright red")
  552. wait (4)
  553. elevator.BrickColor = BrickColor.new("Bright green")
  554. for i = 1, 155 do
  555. elevator.CFrame = CFrame.new(elevator.Position + Vector3.new(0, -0.2, 0))
  556. wait ()
  557. end
  558. elevator.BrickColor = BrickColor.new(color2)
  559. ele = true
  560. end
  561. end
  562. if string.find(string.lower(msg), "clean") ~= nil and string.find(string.lower(msg), "out") ~= nil then
  563. if sweep == true then
  564. sweep = false
  565. sweeper1 = Instance.new("Part")
  566. sweeper1.Parent = model
  567. sweeper1.Size = Vector3.new(3, 120, 50)
  568. sweeper1.CFrame = CFrame.new(Vector3.new(375.5, 15.9, 0) + offset)
  569. sweeper1.Anchored = true
  570. sweeper1.BrickColor = BrickColor.new(color)
  571. sweeper1mesh = Instance.new("BlockMesh")
  572. sweeper1mesh.Parent = sweeper1
  573. sweeper2 = Instance.new("Part")
  574. sweeper2.Parent = model
  575. sweeper2.Size = Vector3.new(50, 120, 3)
  576. sweeper2.CFrame = CFrame.new(Vector3.new(400.5, 15.9, -24.5) + offset)
  577. sweeper2.Anchored = true
  578. sweeper2.BrickColor = BrickColor.new(color)
  579. sweeper2mesh = Instance.new("BlockMesh")
  580. sweeper2mesh.Parent = sweeper2
  581. for i = 1, 400 do
  582. sweeper1.CFrame = CFrame.new(sweeper1.Position + Vector3.new(0.1, 0, 0))
  583. sweeper2.CFrame = CFrame.new(sweeper2.Position + Vector3.new(0, 0, 0.1))
  584. wait ()
  585. end
  586. sweeper1:Remove()
  587. sweeper2:Remove()
  588. sweep = true
  589. end
  590. end
  591. if string.lower(string.sub(msg, 1, 2)) == "in" then
  592. for i, v in pairs(game.Players:GetChildren()) do
  593. if v.Character ~= nil then
  594. if string.lower(string.sub(v.Name, 1, string.len(string.sub(msg, 4)))) == string.lower(string.sub(msg, 4)) then
  595. if v.Character:FindFirstChild("Torso") ~= nil then
  596. v.Character.Torso.CFrame = CFrame.new(door.Position + Vector3.new(25, 0, 0))
  597. v.Character.Torso.Velocity = Vector3.new(0,0,0)
  598. end
  599. end
  600. end
  601. end
  602. end
  603. if string.lower(string.sub(msg, 1, 3)) == "out" then
  604. for i, v in pairs(game.Players:GetChildren()) do
  605. if v.Character ~= nil then
  606. if string.lower(string.sub(v.Name, 1, string.len(string.sub(msg, 5)))) == string.lower(string.sub(msg, 5)) then
  607. if v.Character:FindFirstChild("Torso") ~= nil then
  608. v.Character.Torso.CFrame = CFrame.new(0, 5, 0)
  609. end
  610. end
  611. end
  612. end
  613. end
  614. if string.find(string.lower(msg), "visit") ~= nil then
  615. for i, v in pairs(game.Players:GetChildren()) do
  616. if v.Character ~= nil then
  617. if string.lower(string.sub(v.Name, 1, string.len(string.sub(msg, 7)))) == string.lower(string.sub(msg, 7)) then
  618. if game.Workspace:FindFirstChild(v.Name .. "'s House") ~= nil then
  619. if game.Workspace[v.Name .. "'s House"]:FindFirstChild("Door") ~= nil then
  620. me.Character.Torso.CFrame = CFrame.new(game.Workspace:FindFirstChild(v.Name .. "'s House").Door.Position + Vector3.new(25, 0, 0))
  621. end
  622. end
  623. end
  624. end
  625. end
  626. end
  627. if string.find(string.lower(msg), "fall") ~= nil then
  628. for i, v in pairs(model:GetChildren()) do
  629. v.Anchored = false
  630. wait ()
  631. end
  632. end
  633. if string.find(string.lower(msg), "freeze") ~= nil then
  634. for i, v in pairs(model:GetChildren()) do
  635. v.Anchored = true
  636. v.Velocity = Vector3.new(0,0,0)
  637. v.RotVelocity = Vector3.new(0,0,0)
  638. wait ()
  639. end
  640. end
  641. if string.find(string.lower(msg), "kaboom") ~= nil then
  642. for i, v in pairs(model:GetChildren()) do
  643. v.Anchored = false
  644. ex = Instance.new("Explosion")
  645. ex.Parent = v
  646. ex.Position = v.Position
  647. ex.BlastPressure = 2000000
  648. wait ()
  649. end
  650. end
  651. if string.find(string.lower(msg), "invisi") ~= nil then
  652. for i, v in pairs(model:GetChildren()) do
  653. v.Transparency = .99
  654. v.CanCollide = false
  655. wait()
  656. end
  657. end
  658. if string.find(string.lower(msg), "shineh") ~= nil then
  659. for i, v in pairs(model:GetChildren()) do
  660. v.Reflectance = 1
  661. wait()
  662. end
  663. end
  664. if string.find(string.lower(msg), "lock") ~= nil and string.find(string.lower(msg), "unlock") == nil then
  665. door.Name = "Locked"
  666. end
  667. if string.find(string.lower(msg), "unlock") ~= nil then
  668. door.Name = "Door"
  669. end
  670. if string.find(string.lower(msg), "refnorm") ~= nil then
  671. for i, v in pairs(model:GetChildren()) do
  672. v.Reflectance = 0
  673. wait()
  674. end
  675. end
  676. if string.find(string.lower(msg), "visi") ~= nil then
  677. for i, v in pairs(model:GetChildren()) do
  678. v.Transparency = 0
  679. v.CanCollide = true
  680. wait()
  681. end
  682. end
  683. if string.find(string.lower(msg), "randomcolor") ~= nil then
  684. for i, v in pairs(model:GetChildren()) do
  685. v.BrickColor = BrickColor.Random()
  686. wait()
  687. end
  688. end
  689. if string.find(string.lower(msg), "lockbricks") ~= nil then
  690. for i, v in pairs(model:GetChildren()) do
  691. v.Locked = true
  692. wait()
  693. end
  694. end
  695. if string.find(string.lower(msg), "backtonorm") ~= nil then
  696. path.BrickColor = BrickColor.new(color2)
  697. wall1.BrickColor = BrickColor.new(color)
  698. wall2.BrickColor = BrickColor.new(color)
  699. wall3.BrickColor = BrickColor.new(color)
  700. wall4.BrickColor = BrickColor.new(color)
  701. wall5.BrickColor = BrickColor.new(color)
  702. wall6.BrickColor = BrickColor.new(color)
  703. door.BrickColor = BrickColor.new(color)
  704. roof1.BrickColor = BrickColor.new(color2)
  705. roof2.BrickColor = BrickColor.new(color2)
  706. roof3.BrickColor = BrickColor.new(color2)
  707. roof4.BrickColor = BrickColor.new(color2)
  708. roofdoor1.BrickColor = BrickColor.new(color2)
  709. roofdoor2.BrickColor = BrickColor.new(color2)
  710. floordoor1.BrickColor = BrickColor.new(color2)
  711. floordoor2.BrickColor = BrickColor.new(color2)
  712. floor2.BrickColor = BrickColor.new(color2)
  713. floor1.BrickColor = BrickColor.new(color2)
  714. elevator.BrickColor = BrickColor.new(color2)
  715. end
  716. if string.find(string.lower(msg), "windows") ~= nil and string.find(string.lower(msg), "not") == nil or string.find(string.lower(msg), "view") ~= nil and string.find(string.lower(msg), "not") == nil or string.find(string.lower(msg), "openup") ~= nil and string.find(string.lower(msg), "not") == nil or string.find(string.lower(msg), "not") == nil and string.find(string.lower(msg), "view") ~= nil and string.find(string.lower(msg), "not") ~= nil or string.find(string.lower(msg), "view") ~= nil and string.find(string.lower(msg), "don't") ~= nil then
  717. wall1.Transparency = 0.5
  718. wall2.Transparency = 0.5
  719. wall3.Transparency = 0.5
  720. wall4.Transparency = 0.5
  721. wall5.Transparency = 0.5
  722. wall6.Transparency = 0.5
  723. door.Transparency = 0.5
  724. end
  725. if string.find(string.lower(msg), "walls") ~= nil and string.find(string.lower(msg), "not") == nil or string.find(string.lower(msg), "lockdown") ~= nil and string.find(string.lower(msg), "not") == nil or string.find(string.lower(msg), "view") ~= nil and string.find(string.lower(msg), "not") ~= nil then
  726. wall1.Transparency = 0
  727. wall2.Transparency = 0
  728. wall3.Transparency = 0
  729. wall4.Transparency = 0
  730. wall5.Transparency = 0
  731. wall6.Transparency = 0
  732. door.Transparency = 0
  733. end
  734. if string.sub(string.lower(msg), 1, 8) == "openpath" then
  735. if pathopen == false then
  736. for i = 1, 100 do
  737. path.CFrame = CFrame.new(path.Position + Vector3.new(-0.5, 0, 0))
  738. wait()
  739. end
  740. end
  741. pathopen = true
  742. end
  743. if string.sub(string.lower(msg), 1, 9) == "closepath" then
  744. if pathopen == true then
  745. for i = 1, 100 do
  746. path.CFrame = CFrame.new(path.Position + Vector3.new(0.5, 0, 0))
  747. wait()
  748. end
  749. end
  750. pathopen = false
  751. end
  752. if string.find(string.lower(msg), "open") ~= nil and string.find(string.lower(msg), "beds") ~= nil or string.find(string.lower(msg), "tired") ~= nil or string.find(string.lower(msg), "rest") ~= nil or string.find(string.lower(msg), "yawn") ~= nil then
  753. if beds == false then
  754. beds = true
  755. bedp1 = Instance.new("Part")
  756. bedp1.Parent = model
  757. bedp1.Size = Vector3.new(10, 1, 1)
  758. bedp1.CFrame = CFrame.new(Vector3.new(400.5, 6.1, -23.5) + offset)
  759. bedp1.Anchored = true
  760. bedp1.BrickColor = BrickColor.new(color2)
  761. bedp1.Friction = math.huge
  762. bedp1mesh = Instance.new("BlockMesh")
  763. bedp1mesh.Parent = bedp1
  764. bedp12 = Instance.new("Part")
  765. bedp12.Parent = model
  766. bedp12.Size = Vector3.new(10, 1, 1)
  767. bedp12.CFrame = CFrame.new(Vector3.new(400.5, 6.1, 23.5) + offset)
  768. bedp12.Anchored = true
  769. bedp12.BrickColor = BrickColor.new(color2)
  770. bedp12.Friction = math.huge
  771. bedp12mesh = Instance.new("BlockMesh")
  772. bedp12mesh.Parent = bedp12
  773. for i = 1, 5 do
  774. bedp1.Size = bedp1.Size + Vector3.new(0, 0, 1)
  775. bedp1.CFrame = CFrame.new(400.5 + offset.X, 6.1 + offset.Y, bedp1.Position.Z + 0.5)
  776. bedp12.Size = bedp12.Size + Vector3.new(0, 0, 1)
  777. bedp12.CFrame = CFrame.new(400.5 + offset.X, 6.1 + offset.Y, bedp12.Position.Z + -0.5)
  778. wait (0.05)
  779. end
  780. bedp2 = Instance.new("Part")
  781. bedp2.Parent = model
  782. bedp2.Size = Vector3.new(2, 1, 3)
  783. bedp2.CFrame = CFrame.new(Vector3.new(404.5, 6.1, -21) + offset)
  784. bedp2.Anchored = true
  785. bedp2.CanCollide = false
  786. bedp2.BrickColor = BrickColor.new("Bright white")
  787. bedp2mesh = Instance.new("SpecialMesh")
  788. bedp2mesh.Parent = bedp2
  789. bedp2mesh.MeshType = "Sphere"
  790. bedp22 = Instance.new("Part")
  791. bedp22.Parent = model
  792. bedp22.Size = Vector3.new(2, 1, 3)
  793. bedp22.CFrame = CFrame.new(Vector3.new(404.5, 6.1, 21) + offset)
  794. bedp22.Anchored = true
  795. bedp22.CanCollide = false
  796. bedp22.BrickColor = BrickColor.new("Bright white")
  797. bedp22mesh = Instance.new("SpecialMesh")
  798. bedp22mesh.Parent = bedp22
  799. bedp22mesh.MeshType = "Sphere"
  800. for i = 0, 0.6, 0.2 do
  801. bedp2.CFrame = CFrame.new(bedp2.Position + Vector3.new(0, 0.2, 0))
  802. bedp22.CFrame = CFrame.new(bedp22.Position + Vector3.new(0, 0.2, 0))
  803. wait (0.05)
  804. end
  805. fallp = Instance.new("Part")
  806. fallp.Parent = model
  807. fallp.Size = Vector3.new(1, 1, 5)
  808. fallp.CFrame = CFrame.new(Vector3.new(398, 7.3, -21) + offset)
  809. fallp.Anchored = true
  810. fallp.Transparency = 1
  811. fallp.CanCollide = false
  812. bedp1.Touched:connect(function(hit)
  813. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  814. hit.Parent.Humanoid.PlatformStand = true
  815. end
  816. end)
  817. fallp2 = Instance.new("Part")
  818. fallp2.Parent = model
  819. fallp2.Size = Vector3.new(1, 1, 5)
  820. fallp2.CFrame = CFrame.new(Vector3.new(398, 7.3, 21) + offset)
  821. fallp2.Anchored = true
  822. fallp2.Transparency = 1
  823. fallp2.CanCollide = false
  824. bedp22.Touched:connect(function(hit)
  825. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  826. hit.Parent.Humanoid.PlatformStand = true
  827. end
  828. end)
  829. end
  830. end
  831. if string.find(string.lower(msg), "close") ~= nil and string.find(string.lower(msg), "beds") ~= nil or string.find(string.lower(msg), "awake") ~= nil then
  832. if beds == true then
  833. beds = false
  834. fallp:Remove()
  835. fallp2:Remove()
  836. for i = 0, 0.6, 0.2 do
  837. bedp2.CFrame = CFrame.new(bedp2.Position + Vector3.new(0, -0.2, 0))
  838. bedp22.CFrame = CFrame.new(bedp22.Position + Vector3.new(0, -0.2, 0))
  839. wait (0.05)
  840. end
  841. bedp2:Remove()
  842. bedp22:Remove()
  843. for i = 1, 5 do
  844. bedp1.Size = bedp1.Size + Vector3.new(0, 0, -1)
  845. bedp1.CFrame = CFrame.new(400.5 + offset.X, 6.1 + offset.Y, bedp1.Position.Z + -0.5)
  846. bedp12.Size = bedp12.Size + Vector3.new(0, 0, -1)
  847. bedp12.CFrame = CFrame.new(400.5 + offset.X, 6.1 + offset.Y, bedp12.Position.Z + 0.5)
  848. wait (0.05)
  849. end
  850. bedp1:Remove()
  851. bedp12:Remove()
  852. end
  853. end
  854. if string.find(string.lower(msg), "go away house") ~= nil or string.find(string.lower(msg), "die") ~= nil then
  855. model:Remove()
  856. con:disconnect()
  857. end
  858. end)
  859. model:MakeJoints()
  860. cough:clone().Parent = game.Workspace
  861. script.Parent = model
  862. end
  863. if scr ~= nil then
  864. scr:remove()
  865. end
  866. end
  867.  
  868.  
  869.  
  870. -- MY FINGERS HURT!!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement