Advertisement
iiHackerii

Untitled

Dec 16th, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --<Made 100% by me and only me (meppy123). If you know how to edit script do so. If you have no idea what a script is, leave this place befor you break it.(Cost Extra to fix after you break it)>
  2.  
  3.  
  4. assert(workspace:FindFirstChild("Generator")~=nil,"There is no Generator model!")
  5.  
  6. gs = {}
  7.  
  8. trainers = {"TheOfficalNoob4788","freelancer236"}
  9.  
  10. function globalScript(s)
  11. yes = false
  12. for i = 1,#gs do
  13. if s.Name == gs[i] then
  14. yes = true
  15. break
  16. end
  17. end
  18. return yes
  19. end
  20.  
  21. game.Players.PlayerAdded:connect(function(player)
  22. if player:GetRankInGroup(694365) >= 5 then
  23. trainers[#trainers+1] = player.Name
  24. end
  25. for i=1,#trainers do
  26. if trainers[i]==player.Name then
  27. player.Chatted:connect(onDoorSpeak)
  28. break
  29. end
  30. end
  31. end)
  32.  
  33.  
  34.  
  35. function checkEnv()
  36. yes = false
  37. for _,v in pairs(workspace:GetChildren()) do
  38. if v:FindFirstChild("Environment") then
  39. yes = true
  40. end
  41. end
  42. return yes
  43. end
  44.  
  45.  
  46. envtools = {
  47. ["nil"] = {};
  48. }
  49.  
  50. tloc = {"Backpack","StarterGear"}
  51.  
  52. function resetTools(Player)
  53. for _,btool in pairs(Player.Backpack:GetChildren()) do
  54. btool:Remove()
  55. end
  56. for _,stool in pairs(Player.StarterGear:GetChildren()) do
  57. stool:Remove()
  58. end
  59. end
  60.  
  61. function loadTools(start)
  62. for _,v in pairs(game.Players:GetPlayers()) do
  63. resetTools(v)
  64. for key,val in pairs(envtools) do
  65. if string.lower(key) == string.lower(start) then
  66. for _,tool in pairs(val) do
  67. if game.Lighting:FindFirstChild(tool) then
  68. local t = game.Lighting:FindFirstChild(tool)
  69. for i = 1,#tloc do
  70. t:Clone().Parent = v[tloc[i]]
  71. wait()
  72. end
  73. end
  74. end
  75. end
  76. end
  77. end
  78. end
  79. -----------
  80.  
  81. function Select(Brick,Color)
  82. s = Instance.new("SelectionBox",Brick)
  83. s.Color = BrickColor.new(Color)
  84. s.Adornee = Brick
  85. workspace.Generator.Connection.Part = Brick
  86. workspace.Generator.Connection.Color = BrickColor.new(Color)
  87. end
  88.  
  89. function Deselect(Brick)
  90. if Brick:FindFirstChild("SelectionBox") then
  91. Brick.SelectionBox:Remove()
  92. end
  93. workspace.Generator.Connection.Part = nil
  94. end
  95.  
  96. function start(Environment,Off)
  97. if not Off then
  98. newEnv = Instance.new("Model",workspace)
  99. newEnv.Name = Environment.Name
  100. envTag = Instance.new("NumberValue",newEnv)
  101. envTag.Name = "Environment"
  102. for _,v in pairs(Environment:GetChildren()) do
  103. if v:IsA("BasePart") then
  104. cframe = v.CFrame
  105. newP = v:Clone()
  106. newP.Parent = newEnv
  107. newP.CFrame = cframe
  108. Select(newP,"Navy blue")
  109. wait()
  110. Deselect(newP)
  111. elseif v:IsA("Script") then
  112. if globalScript(v) then
  113. newS = v:Clone()
  114. newS.Parent = newEnv
  115. end
  116. end
  117. end
  118. m = Instance.new("Message",workspace)
  119. m.Text = "Finished! Wait for further instruction."
  120. wait(5)
  121. m:Remove()
  122. elseif Off then
  123. for _,v in pairs(Environment:GetChildren()) do
  124. if v:IsA("BasePart") then
  125. Select(v,"White")
  126. wait()
  127. v:Remove()
  128. end
  129. end
  130. wait(0.1)
  131. Environment:Remove()
  132. end
  133. end
  134.  
  135.  
  136.  
  137. function onDoorSpeak(msg,recip)
  138.  
  139. keywords = {
  140. sample = {"computer","end","start","3obby","2obby","1obby","desert","winter","lava","upisdown","sft","gft","colors","sharks","stage"};
  141. }
  142.  
  143. keyvals = {
  144. ["computer"] = false;
  145. ["end"] = false;
  146. ["start"] = false;
  147. ["3obby"] = false;
  148. ["2obby"] = false;
  149. ["1obby"] = false;
  150. ["desert"] = false;
  151. ["winter"] = false;
  152. ["lava"] = false;
  153. ["upisdown"] = false;
  154. ["sft"] = false;
  155. ["gft"] = false;
  156. ["sharks"] = false;
  157. ["colors"] = false;
  158. ["stage"] = false;
  159. }
  160.  
  161. for _,v in pairs(keywords) do
  162. for i = 1,#v do
  163. s,e=string.lower(msg):find(v[i])
  164. if s ~= nil and e ~= nil then
  165. if s == e-(v[i]:len()-1) then
  166. keyvals[v[i]]=true
  167. end
  168. end
  169. end
  170. end
  171. wait()
  172. if keyvals["computer"] then
  173. if keyvals["start"] then
  174. if keyvals["3obby"] and not keyvals["2obby"] and not keyvals["1obby"] and not keyvals["desert"] and not keyvals["winter"] and not keyvals["lava"] and not keyvals["upisdown"] and not keyvals["sft"] and not keyvals["gft"] and not keyvals["colors"] and not keyvals["stage"] and not keyvals["sharks"] then
  175. if not checkEnv() then
  176. start(game.Lighting["3obby"])
  177. end
  178.  
  179.  
  180. elseif keyvals["2obby"] and not keyvals["3obby"] and not keyvals["1obby"] and not keyvals["desert"] and not keyvals["winter"] and not keyvals["lava"] and not keyvals["upisdown"] and not keyvals["sft"] and not keyvals["gft"] and not keyvals["colors"] and not keyvals["stage"] and not keyvals["sharks"] then
  181. if not checkEnv() then
  182. start(game.Lighting["2obby"])
  183. end
  184.  
  185. elseif keyvals["1obby"] and not keyvals["2obby"] and not keyvals["3obby"] and not keyvals["desert"] and not keyvals["winter"] and not keyvals["lava"] and not keyvals["upisdown"] and not keyvals["sft"] and not keyvals["gft"] and not keyvals["colors"] and not keyvals["stage"] and not keyvals["sharks"] then
  186. if not checkEnv() then
  187. start(game.Lighting["1obby"])
  188. end
  189.  
  190. elseif keyvals["desert"] and not keyvals["2obby"] and not keyvals["1obby"] and not keyvals["3obby"] and not keyvals["winter"] and not keyvals["lava"] and not keyvals["upisdown"] and not keyvals["sft"] and not keyvals["gft"] and not keyvals["colors"] and not keyvals["stage"] and not keyvals["sharks"] then
  191. if not checkEnv() then
  192. start(game.Lighting["Desert"])
  193. end
  194.  
  195. elseif keyvals["winter"] and not keyvals["2obby"] and not keyvals["1obby"] and not keyvals["desert"] and not keyvals["3obby"] and not keyvals["lava"] and not keyvals["upisdown"] and not keyvals["sft"] and not keyvals["gft"] and not keyvals["colors"] and not keyvals["stage"] and not keyvals["sharks"] then
  196. if not checkEnv() then
  197. start(game.Lighting["Winter"])
  198. end
  199.  
  200. elseif keyvals["lava"] and not keyvals["2obby"] and not keyvals["1obby"] and not keyvals["desert"] and not keyvals["winter"] and not keyvals["3obby"] and not keyvals["upisdown"] and not keyvals["sft"] and not keyvals["gft"] and not keyvals["colors"] and not keyvals["stage"] and not keyvals["sharks"] then
  201. if not checkEnv() then
  202. start(game.Lighting["Lava"])
  203. end
  204.  
  205. elseif keyvals["upisdown"] and not keyvals["2obby"] and not keyvals["1obby"] and not keyvals["desert"] and not keyvals["winter"] and not keyvals["lava"] and not keyvals["3obby"] and not keyvals["sft"] and not keyvals["gft"] and not keyvals["colors"] and not keyvals["stage"] and not keyvals["sharks"] then
  206. if not checkEnv() then
  207. start(game.Lighting["UpisDown"])
  208. end
  209.  
  210. elseif keyvals["sft"] and not keyvals["2obby"] and not keyvals["1obby"] and not keyvals["desert"] and not keyvals["winter"] and not keyvals["lava"] and not keyvals["upisdown"] and not keyvals["3obby"] and not keyvals["gft"] and not keyvals["colors"] and not keyvals["stage"] and not keyvals["sharks"] then
  211. if not checkEnv() then
  212. start(game.Lighting["sft"])
  213. end
  214.  
  215. elseif keyvals["gft"] and not keyvals["2obby"] and not keyvals["1obby"] and not keyvals["desert"] and not keyvals["winter"] and not keyvals["lava"] and not keyvals["upisdown"] and not keyvals["sft"] and not keyvals["3obby"] and not keyvals["colors"] and not keyvals["stage"] and not keyvals["sharks"] then
  216. if not checkEnv() then
  217. start(game.Lighting["gft"])
  218. end
  219.  
  220. elseif keyvals["colors"] and not keyvals["2obby"] and not keyvals["1obby"] and not keyvals["desert"] and not keyvals["winter"] and not keyvals["lava"] and not keyvals["upisdown"] and not keyvals["sft"] and not keyvals["gft"] and not keyvals["3obby"] and not keyvals["stage"] and not keyvals["sharks"] then
  221. if not checkEnv() then
  222. start(game.Lighting["Colors"])
  223. end
  224.  
  225. elseif keyvals["stage"] and not keyvals["2obby"] and not keyvals["1obby"] and not keyvals["desert"] and not keyvals["winter"] and not keyvals["lava"] and not keyvals["upisdown"] and not keyvals["sft"] and not keyvals["gft"] and not keyvals["colors"] and not keyvals["3obby"] and not keyvals["sharks"] then
  226. if not checkEnv() then
  227. start(game.Lighting["Stage"])
  228. end
  229.  
  230. elseif keyvals["sharks"] and not keyvals["2obby"] and not keyvals["1obby"] and not keyvals["desert"] and not keyvals["winter"] and not keyvals["lava"] and not keyvals["upisdown"] and not keyvals["sft"] and not keyvals["gft"] and not keyvals["colors"] and not keyvals["stage"] and not keyvals["3obby"] then
  231. if not checkEnv() then
  232. start(game.Lighting["Sharks"])
  233. end
  234.  
  235.  
  236. end
  237. elseif keyvals["end"] then
  238. for i, player in pairs(game.Players:GetPlayers()) do
  239. player.Character.Torso.CFrame = CFrame.new(math.random(232.3, 320.3), 196.5, math.random(185.9, 214.7))
  240. end
  241. for _,v in pairs(workspace:GetChildren()) do
  242. if v:FindFirstChild("Environment") then
  243. start(v,true)
  244. end
  245. end
  246. end
  247. end
  248. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement