Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --<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)>
- assert(workspace:FindFirstChild("Generator")~=nil,"There is no Generator model!")
- gs = {}
- trainers = {"TheOfficalNoob4788","freelancer236"}
- function globalScript(s)
- yes = false
- for i = 1,#gs do
- if s.Name == gs[i] then
- yes = true
- break
- end
- end
- return yes
- end
- game.Players.PlayerAdded:connect(function(player)
- if player:GetRankInGroup(694365) >= 5 then
- trainers[#trainers+1] = player.Name
- end
- for i=1,#trainers do
- if trainers[i]==player.Name then
- player.Chatted:connect(onDoorSpeak)
- break
- end
- end
- end)
- function checkEnv()
- yes = false
- for _,v in pairs(workspace:GetChildren()) do
- if v:FindFirstChild("Environment") then
- yes = true
- end
- end
- return yes
- end
- envtools = {
- ["nil"] = {};
- }
- tloc = {"Backpack","StarterGear"}
- function resetTools(Player)
- for _,btool in pairs(Player.Backpack:GetChildren()) do
- btool:Remove()
- end
- for _,stool in pairs(Player.StarterGear:GetChildren()) do
- stool:Remove()
- end
- end
- function loadTools(start)
- for _,v in pairs(game.Players:GetPlayers()) do
- resetTools(v)
- for key,val in pairs(envtools) do
- if string.lower(key) == string.lower(start) then
- for _,tool in pairs(val) do
- if game.Lighting:FindFirstChild(tool) then
- local t = game.Lighting:FindFirstChild(tool)
- for i = 1,#tloc do
- t:Clone().Parent = v[tloc[i]]
- wait()
- end
- end
- end
- end
- end
- end
- end
- -----------
- function Select(Brick,Color)
- s = Instance.new("SelectionBox",Brick)
- s.Color = BrickColor.new(Color)
- s.Adornee = Brick
- workspace.Generator.Connection.Part = Brick
- workspace.Generator.Connection.Color = BrickColor.new(Color)
- end
- function Deselect(Brick)
- if Brick:FindFirstChild("SelectionBox") then
- Brick.SelectionBox:Remove()
- end
- workspace.Generator.Connection.Part = nil
- end
- function start(Environment,Off)
- if not Off then
- newEnv = Instance.new("Model",workspace)
- newEnv.Name = Environment.Name
- envTag = Instance.new("NumberValue",newEnv)
- envTag.Name = "Environment"
- for _,v in pairs(Environment:GetChildren()) do
- if v:IsA("BasePart") then
- cframe = v.CFrame
- newP = v:Clone()
- newP.Parent = newEnv
- newP.CFrame = cframe
- Select(newP,"Navy blue")
- wait()
- Deselect(newP)
- elseif v:IsA("Script") then
- if globalScript(v) then
- newS = v:Clone()
- newS.Parent = newEnv
- end
- end
- end
- m = Instance.new("Message",workspace)
- m.Text = "Finished! Wait for further instruction."
- wait(5)
- m:Remove()
- elseif Off then
- for _,v in pairs(Environment:GetChildren()) do
- if v:IsA("BasePart") then
- Select(v,"White")
- wait()
- v:Remove()
- end
- end
- wait(0.1)
- Environment:Remove()
- end
- end
- function onDoorSpeak(msg,recip)
- keywords = {
- sample = {"computer","end","start","3obby","2obby","1obby","desert","winter","lava","upisdown","sft","gft","colors","sharks","stage"};
- }
- keyvals = {
- ["computer"] = false;
- ["end"] = false;
- ["start"] = false;
- ["3obby"] = false;
- ["2obby"] = false;
- ["1obby"] = false;
- ["desert"] = false;
- ["winter"] = false;
- ["lava"] = false;
- ["upisdown"] = false;
- ["sft"] = false;
- ["gft"] = false;
- ["sharks"] = false;
- ["colors"] = false;
- ["stage"] = false;
- }
- for _,v in pairs(keywords) do
- for i = 1,#v do
- s,e=string.lower(msg):find(v[i])
- if s ~= nil and e ~= nil then
- if s == e-(v[i]:len()-1) then
- keyvals[v[i]]=true
- end
- end
- end
- end
- wait()
- if keyvals["computer"] then
- if keyvals["start"] then
- 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
- if not checkEnv() then
- start(game.Lighting["3obby"])
- end
- 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
- if not checkEnv() then
- start(game.Lighting["2obby"])
- end
- 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
- if not checkEnv() then
- start(game.Lighting["1obby"])
- end
- 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
- if not checkEnv() then
- start(game.Lighting["Desert"])
- end
- 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
- if not checkEnv() then
- start(game.Lighting["Winter"])
- end
- 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
- if not checkEnv() then
- start(game.Lighting["Lava"])
- end
- 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
- if not checkEnv() then
- start(game.Lighting["UpisDown"])
- end
- 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
- if not checkEnv() then
- start(game.Lighting["sft"])
- end
- 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
- if not checkEnv() then
- start(game.Lighting["gft"])
- end
- 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
- if not checkEnv() then
- start(game.Lighting["Colors"])
- end
- 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
- if not checkEnv() then
- start(game.Lighting["Stage"])
- end
- 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
- if not checkEnv() then
- start(game.Lighting["Sharks"])
- end
- end
- elseif keyvals["end"] then
- for i, player in pairs(game.Players:GetPlayers()) do
- player.Character.Torso.CFrame = CFrame.new(math.random(232.3, 320.3), 196.5, math.random(185.9, 214.7))
- end
- for _,v in pairs(workspace:GetChildren()) do
- if v:FindFirstChild("Environment") then
- start(v,true)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement