Advertisement
memberhero

Untitled

May 12th, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.79 KB | None | 0 0
  1. pname = "memberhero"
  2. ver = 1.3
  3. where = -50
  4. Admin = game.Players[pname]
  5. local m = Instance.new("Model")
  6. m.Name = pname.. "'s House"
  7. m.Parent = game.Workspace
  8. local h = Instance.new("Hint")
  9. h.Parent = Admin
  10. h.Text = "Jail created by tindmikael, ver. " ..ver
  11.  
  12. local ba = Instance.new("Part")
  13. ba.Name = "HouseBase"
  14. ba.Parent = m
  15. ba.formFactor = "Symmetric"
  16. ba.Size = Vector3.new(50, 1, 50)
  17. ba.Anchored = true
  18. ba.CFrame = CFrame.new(60 + where, game.Workspace.Base.Size.y + 0.5, 150)
  19. ba.BrickColor = BrickColor.new("Really black")
  20. ba.Locked = true
  21. ba.TopSurface = ("Weld")
  22.  
  23. m = Instance.new("BillboardGui")
  24. m.Parent = Game.Workspace
  25. m.Adornee = ba
  26. m.Size = UDim2.new(0,300,0,500)
  27. bg = Instance.new("TextLabel")
  28. bg.Size = UDim2.new(0,300,0,30)
  29. bg.Position = UDim2.new(0,0,0,-16)
  30. bg.Text = "This jail was created by tindmikael corp."
  31. bg.Parent = m
  32. bg.BackgroundColor = BrickColor.new(216)
  33.  
  34. local r = Instance.new("Part")
  35. r.Name = "HouseRoof"
  36. r.Parent = m
  37. r.formFactor = "Symmetric"
  38. r.Size = Vector3.new(50, 1, 50)
  39. r.Anchored = true
  40. r.CFrame = CFrame.new(60 + where, game.Workspace.Base.Size.y + 26.5, 150)
  41. r.BrickColor = BrickColor.new("Really black")
  42. r.Locked = true
  43. r.BottomSurface = ("Smooth")
  44. r.TopSurface = ("Smooth")
  45.  
  46. w1 = Instance.new("Part")
  47. w1.Name = "HouseWall1"
  48. w1.Parent = m
  49. w1.formFactor = "Symmetric"
  50. w1.Size = Vector3.new(50, 25, 1)
  51. w1.Anchored = true
  52. w1.CFrame = CFrame.new(60 + where, game.Workspace.Base.Size.y + 13.5, 174.5)
  53. w1.BrickColor = BrickColor.new("Really black")
  54. w1.Locked = true
  55.  
  56. w2 = Instance.new("Part")
  57. w2.Name = "HouseWall2"
  58. w2.Parent = m
  59. w2.formFactor = "Symmetric"
  60. w2.Size = Vector3.new(1, 25, 48)
  61. w2.Anchored = true
  62. w2.CFrame = CFrame.new(84.5 + where, game.Workspace.Base.Size.y + 13.5, 150)
  63. w2.BrickColor = BrickColor.new("Really black")
  64. w2.Locked = true
  65.  
  66. w3 = Instance.new("Part")
  67. w3.Name = "HouseWall3"
  68. w3.Parent = m
  69. w3.formFactor = "Symmetric"
  70. w3.Size = Vector3.new(1, 25, 48)
  71. w3.Anchored = true
  72. w3.CFrame = CFrame.new(35.5 + where, game.Workspace.Base.Size.y + 13.5, 150)
  73. w3.BrickColor = BrickColor.new("Really black")
  74. w3.Locked = true
  75.  
  76. w4 = Instance.new("Part")
  77. w4.Name = "HouseWall4"
  78. w4.Parent = m
  79. w4.formFactor = "Symmetric"
  80. w4.Size = Vector3.new(19, 25, 1)
  81. w4.Anchored = true
  82. w4.CFrame = CFrame.new(44.5 + where, game.Workspace.Base.Size.y + 13.5, 125.5)
  83. w4.BrickColor = BrickColor.new("Really black")
  84. w4.Locked = true
  85.  
  86. w5 = Instance.new("Part")
  87. w5.Name = "HouseWall5"
  88. w5.Parent = m
  89. w5.formFactor = "Symmetric"
  90. w5.Size = Vector3.new(19, 25, 1)
  91. w5.Anchored = true
  92. w5.CFrame = CFrame.new(75.5 + where, game.Workspace.Base.Size.y + 13.5, 125.5)
  93. w5.BrickColor = BrickColor.new("Really black")
  94. w5.Locked = true
  95.  
  96. d1 = Instance.new("Part")
  97. d1.Name = "HouseDoor1"
  98. d1.Parent = m
  99. d1.formFactor = "Symmetric"
  100. d1.Size = Vector3.new(12, 10, 1)
  101. d1.Anchored = true
  102. d1.CFrame = CFrame.new(60 + where, game.Workspace.Base.Size.y + 6, 125.5)
  103. d1.BrickColor = BrickColor.new("Institutional white")
  104. d1.Locked = true
  105.  
  106. d2 = Instance.new("Part")
  107. d2.Name = "HouseDoor2"
  108. d2.Parent = m
  109. d2.formFactor = "Symmetric"
  110. d2.Size = Vector3.new(12, 15, 1)
  111. d2.Anchored = true
  112. d2.CFrame = CFrame.new(60 + where, game.Workspace.Base.Size.y + 18.5, 125.5)
  113. d2.BrickColor = BrickColor.new("Really black")
  114. d2.Locked = true
  115.  
  116. local b = Instance.new("TextButton")
  117. b.Name = "Key"
  118. b.Text = "open/close door"
  119. b.BackgroundColor = BrickColor.new("Really black")
  120. b.TextColor = BrickColor.new("Really red")
  121. b.Size = UDim2.new(0, 100, 0, 20)
  122. b.Position = UDim2.new(0, 500, 0, -20)
  123. b.BackgroundTransparency = 0
  124. b.BorderSizePixel = 0
  125. b.TextWrap = true
  126. b.ZIndex = 1
  127. local s = Instance.new("ScreenGui")
  128. s.Parent = game.Players[pname].PlayerGui
  129. s.Name = "JarodGui"
  130. b.Parent = s
  131. local v = Instance.new("NumberValue")
  132. v.Parent = d1
  133. v.Value = 0
  134.  
  135. function click()
  136.  
  137. if v.Value == 0 then
  138. for i = 1, 10 do
  139. d1.Transparency = d1.Transparency + .1
  140. wait(.05)
  141. end
  142. d1.CanCollide = false
  143. v.Value = 1
  144. h.Text = "door opened..."
  145. wait(1)
  146. h.Text = "Jail created by tindmikael, ver. " ..ver
  147. else
  148. for i = 1, 10 do
  149. d1.Transparency = d1.Transparency - .1
  150. wait(.05)
  151. end
  152. d1.CanCollide = true
  153. v.Value = 0
  154. h.Text = "door closed..."
  155. wait(1)
  156. h.Text = "Jail created by tindmikael, ver. " ..ver
  157. end
  158. end
  159.  
  160. b.MouseButton1Down:connect(click)
  161.  
  162. local c = Instance.new("TextButton")
  163. c.Name = "Key"
  164. c.Text = "open/close windows"
  165. c.BackgroundColor = BrickColor.new("Really black")
  166. c.TextColor = BrickColor.new("Really red")
  167. c.Size = UDim2.new(0, 100, 0, 20)
  168. c.Position = UDim2.new(0, 600, 0, -20)
  169. c.BackgroundTransparency = 0
  170. c.BorderSizePixel = 0
  171. c.TextWrap = true
  172. c.ZIndex = 1
  173. local t = Instance.new("ScreenGui")
  174. t.Parent = game.Players[pname].PlayerGui
  175. t.Name = "JarodGui"
  176. c.Parent = t
  177. local w = Instance.new("NumberValue")
  178. w.Parent = di
  179. w.Value = 0
  180.  
  181. function click()
  182. if w.Value == 0 then
  183. for i = 1, 7 do
  184. w1.Transparency = w1.Transparency + .1
  185. w2.Transparency = w2.Transparency + .1
  186. w3.Transparency = w3.Transparency + .1
  187. w4.Transparency = w4.Transparency + .1
  188. w5.Transparency = w5.Transparency + .1
  189. d2.Transparency = d2.Transparency + .1
  190. r.Transparency = r.Transparency + .1
  191. wait(.05)
  192. end
  193. w.Value = 1
  194. h.Text = "windows opened..."
  195. wait(1)
  196. h.Text = "Jail created by tindmikael, ver. " ..ver
  197. else
  198. for i = 1, 7 do
  199. w1.Transparency = w1.Transparency - .1
  200. w2.Transparency = w2.Transparency - .1
  201. w3.Transparency = w3.Transparency - .1
  202. w4.Transparency = w4.Transparency - .1
  203. w5.Transparency = w5.Transparency - .1
  204. d2.Transparency = d2.Transparency - .1
  205. r.Transparency = r.Transparency - .1
  206. wait(.05)
  207. end
  208. h.Text = "windows closed..."
  209. wait(1)
  210. h.Text = "Jail created by tindmikael, ver. " ..ver
  211. w.Value = 0
  212. end
  213. end
  214.  
  215. c.MouseButton1Down:connect(click)
  216.  
  217. local e = Instance.new("TextButton")
  218. e.Name = "Key"
  219. e.Text = "tele to jail"
  220. e.BackgroundColor = BrickColor.new("Really black")
  221. e.TextColor = BrickColor.new("Really red")
  222. e.Size = UDim2.new(0, 100, 0, 20)
  223. e.Position = UDim2.new(0, 700, 0, -20)
  224. e.BackgroundTransparency = 0
  225. e.BorderSizePixel = 0
  226. e.TextWrap = true
  227. e.ZIndex = 1
  228. local v = Instance.new("ScreenGui")
  229. v.Parent = game.Players[pname].PlayerGui
  230. v.Name = "JarodGui"
  231. e.Parent = v
  232.  
  233. function click()
  234. Admin.Character.Torso.CFrame = ba.CFrame + Vector3.new(0,4,0)
  235. h.Text = "teleportation completed..."
  236. wait(1)
  237. h.Text = "Jail created by tindmikael, ver. " ..ver
  238. end
  239.  
  240. e.MouseButton1Down:connect(click)
  241.  
  242. hc = m:clone()
  243.  
  244. function Chat(msg)
  245.  
  246. if msg == "breakjail" then
  247. w1.Anchored = false
  248. w2.Anchored = false
  249. w3.Anchored = false
  250. w4.Anchored = false
  251. w5.Anchored = false
  252. d2.Anchored = false
  253. d1.Anchored = false
  254. r.Anchored = false
  255. wait(0.01)
  256. m:BreakJoints()
  257. end
  258.  
  259. if msg == "fixjail" then
  260. w1.Anchored = true
  261. w2.Anchored = true
  262. w3.Anchored = true
  263. w4.Anchored = true
  264. w5.Anchored = true
  265. d2.Anchored = true
  266. d1.Anchored = true
  267. r.Anchored = true
  268. ba.Anchored = true
  269. wait(0.01)
  270. w1.CFrame = hc.HouseWall1.CFrame
  271. w2.CFrame = hc.HouseWall2.CFrame
  272. w3.CFrame = hc.HouseWall3.CFrame
  273. w4.CFrame = hc.HouseWall4.CFrame
  274. w5.CFrame = hc.HouseWall5.CFrame
  275. d1.CFrame = hc.HouseDoor1.CFrame
  276. d2.CFrame = hc.HouseDoor2.CFrame
  277. ba.CFrame = hc.HouseBase.CFrame
  278. r.CFrame = hc.HouseRoof.CFrame
  279. wait(0.01)
  280. m:MakeJoints()
  281. end
  282.  
  283. if msg == "openjail" then
  284. w1.Anchored = true
  285. w2.Anchored = true
  286. w3.Anchored = true
  287. w4.Anchored = true
  288. w5.Anchored = true
  289. d2.Anchored = true
  290. d1.Anchored = true
  291. r.Anchored = true
  292. ba.Anchored = true
  293. wait(0.01)
  294. w1.Position = m.HouseWall1.Position + Vector3.new(0,0,25)
  295. w2.Position = m.HouseWall2.Position + Vector3.new(25,0,0)
  296. w3.Position = m.HouseWall3.Position + Vector3.new(-25,0,0)
  297. w4.Position = m.HouseWall4.Position + Vector3.new(0,0,-25)
  298. w5.Position = m.HouseWall5.Position + Vector3.new(0,0,-25)
  299. d1.Position = m.HouseDoor1.Position +Vector3.new(0,0,-25)
  300. d2.Position = m.HouseDoor2.Position +Vector3.new(0,0,-25)
  301. r.Position = m.HouseRoof.Position +Vector3.new(0,25,0)
  302. wait(0.01)
  303. m:MakeJoints()
  304. end
  305.  
  306. if msg == "closejail" then
  307. w1.Anchored = true
  308. w2.Anchored = true
  309. w3.Anchored = true
  310. w4.Anchored = true
  311. w5.Anchored = true
  312. d2.Anchored = true
  313. d1.Anchored = true
  314. r.Anchored = true
  315. ba.Anchored = true
  316. wait(0.01)
  317. w1.Position = m.HouseWall1.Position + Vector3.new(0,0,25)
  318. w2.Position = m.HouseWall2.Position + Vector3.new(25,0,0)
  319. w3.Position = m.HouseWall3.Position + Vector3.new(25,0,0)
  320. w4.Position = m.HouseWall4.Position + Vector3.new(0,0,25)
  321. w5.Position = m.HouseWall5.Position + Vector3.new(0,0,25)
  322. d1.Position = m.HouseDoor1.Position +Vector3.new(0,0,25)
  323. d2.Position = m.HouseDoor2.Position +Vector3.new(0,0,25)
  324. r.Position = m.HouseRoof.Position +Vector3.new(0,-25,0)
  325. wait(0.01)
  326. m:MakeJoints()
  327. end
  328.  
  329. if msg == "remove" then
  330. m:Remove()
  331. b:Remove()
  332. c:Remove()
  333. h:Remove()
  334. e:Remove()
  335. ba:Remove()
  336. script:Remove()
  337. end
  338.  
  339. if msg == "reset" then
  340. Admin.Character:BreakJoints()
  341. end
  342.  
  343. if string.sub(msg, 1, 5) == "jail/" then
  344. name = string.sub(msg, 6)
  345. local M = Instance.new("Message")
  346. M.Parent = Admin
  347. M.Text = "jailed " ..name.. "..."
  348. if game.Players:findFirstChild(name) ~= nil then
  349. player = game.Players[name]
  350. if player.Character:findFirstChild("Torso") ~= nil then
  351. player.Character.Torso.CFrame = ba.CFrame + Vector3.new(0, 7, 0)
  352. end
  353. end
  354. wait(3)
  355. M:Remove()
  356. end
  357.  
  358. if string.sub(msg, 1, 5) == "free/" then
  359. name = string.sub(msg, 6)
  360. local M = Instance.new("Message")
  361. M.Parent = Admin
  362. M.Text = "released " ..name.. "..."
  363. if game.Players:findFirstChild(name) ~= nil then
  364. player = game.Players[name]
  365. if player.Character:findFirstChild("Torso") ~= nil then
  366. player.Character.Torso.CFrame = ba.CFrame + Vector3.new(0, 7, -30)
  367. end
  368. end
  369. wait(3)
  370. M:Remove()
  371. end
  372. end
  373.  
  374. Admin.Chatted:connect(Chat)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement