activeMap = nil
local admins = {"Stix92"}


function isAdmin(p)
	for i,v in pairs(admins)do
		if v:lower() == p.Name:lower() then
			print("mhm")
			return true
		end
	end
	return false
end
game.Players.PlayerAdded:connect(function(player)
	if isAdmin(player) then
		player.Chatted:connect(function(msg)
			if msg:lower():sub(1,6) == ":load " then
				for i,v in pairs(game.Lighting:GetChildren())do
					if v.Name:lower() == msg:lower():sub(7,msg:len()) then
						activeMap = v:Clone()
						activeMap.Parent = workspace
						
						local h = Instance.new("Hint",workspace)
						h.Text = activeMap.Name.." Loaded."
						wait(2)
						h:remove()
					end
				end
			end
			if msg:lower() == ":end" then
				local h = Instance.new("Hint",workspace)
				h.Text = activeMap.Name.." Cleared."
				wait(2)
				h:remove()
				
				activeMap:remove()
				activeMap = nil
			end
		end)
	end
end)

2 comments

0

What do you mean GUI map loader?

0

Go here and see what I mean, the GUIs are what I want it to be like. Including the big blue one. http://www.roblox.com/games/261132021/Test