Advertisement
Guest User

NATM Tablet Module (LEAKED)

a guest
Dec 21st, 2014
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.78 KB | None | 0 0
  1. --[[
  2. This is a secret Module script that LuckyMaxer made for the Night at the Museum Tablet.
  3. It changes the glow color.
  4. ]]--
  5.  
  6. AdminTable = {
  7.  {
  8.   Key = "NATMTablet",
  9.   FullReturnKey = "NightAtTheMuseumTablet",
  10.   Users = {
  11.    {UserId = -1},
  12.    {UserId = 322834},
  13.    {UserId = 13203163},
  14.    {UserId = 3089945},
  15.    {UserId = 264635},
  16.   },
  17.   Return = {
  18.    ColorGui = (function(DefaultColor)
  19.     local function Split(String, Divider)
  20.      local Results = {}
  21.      local Number = 1
  22.      for i = 1, string.len(String) do
  23.       if string.sub(String, i, i + (string.len(Divider) - 1)) == Divider then
  24.        if string.sub(String, Number, (i - 1)) ~= "" then
  25.         table.insert(Results, string.sub(String, Number, (i - 1)))
  26.        end
  27.        Number = (i + string.len(Divider))
  28.       end
  29.      end
  30.      if string.sub(String, Number) ~= "" then
  31.       table.insert(Results, string.sub(String, Number))
  32.      end
  33.      return Results
  34.     end
  35.     local Color3PickerGui = Instance.new("ScreenGui")
  36.     Color3PickerGui.Name = "Color3PickerGui"
  37.     local Frame = Instance.new("Frame")
  38.     Frame.BackgroundColor3 = Color3.new(255, 255, 255)
  39.     Frame.Position = UDim2.new(0, 10, 0, 500)
  40.     Frame.Size = UDim2.new(0, 200, 0, 50)
  41.     Frame.ZIndex = 1
  42.     Frame.Parent = Color3PickerGui
  43.     local Border = Instance.new("Frame")
  44.     Border.Name = "Border"
  45.     Border.BackgroundTransparency = 1
  46.     Border.Position = UDim2.new(0.025, 0, 0.075, 0)
  47.     Border.Size = UDim2.new(0.95, 0, 0.85, 0)
  48.     Border.ZIndex = 2
  49.     Border.Parent = Frame
  50.     local ColorBox = Instance.new("Frame")
  51.     ColorBox.Name = "ColorBox"
  52.     ColorBox.Position = UDim2.new(0.75, 0, 0, 0)
  53.     ColorBox.Size = UDim2.new(0.25, 0, 1, 0)
  54.     ColorBox.BackgroundColor3 = ((DefaultColor and DefaultColor) or Color3.new(255, 255, 255))
  55.     ColorBox.ZIndex = 3
  56.     ColorBox.Parent = Border
  57.     local Color3Input = Instance.new("TextBox")
  58.     Color3Input.Name = "Color3Input"
  59.     Color3Input.BackgroundTransparency = 1
  60.     Color3Input.ClearTextOnFocus = true
  61.     Color3Input.Position = UDim2.new(0, 0, 0, 0)
  62.     Color3Input.Size = UDim2.new(0.75, 0, 0.75, 0)
  63.     Color3Input.Font = Enum.Font.SourceSans
  64.     Color3Input.TextColor3 = Color3.new(0, 0, 0)
  65.     Color3Input.TextScaled = true
  66.     Color3Input.TextWrapped = true
  67.     Color3Input.TextXAlignment = Enum.TextXAlignment.Center
  68.     Color3Input.TextYAlignment = Enum.TextYAlignment.Center
  69.     Color3Input.ZIndex = 3
  70.     Color3Input.Parent = Border
  71.     local ColorSubmit = Instance.new("TextButton")
  72.     ColorSubmit.Name = "Submit"
  73.     ColorSubmit.BackgroundTransparency = 1
  74.     ColorSubmit.Position = UDim2.new(0.125, 0, 0.75, 0)
  75.     ColorSubmit.Size = UDim2.new(0.5, 0, 0.25, 0)
  76.     ColorSubmit.Font = Enum.Font.SourceSans
  77.     ColorSubmit.FontSize = Enum.FontSize.Size14
  78.     ColorSubmit.Text = "[ Set Color ]"
  79.     ColorSubmit.TextColor3 = Color3.new(255, 0, 0)
  80.     ColorSubmit.TextScaled = false
  81.     ColorSubmit.TextWrapped = false
  82.     ColorSubmit.TextXAlignment = Enum.TextXAlignment.Center
  83.     ColorSubmit.TextYAlignment = Enum.TextYAlignment.Center
  84.     ColorSubmit.ZIndex = 3
  85.     ColorSubmit.Parent = Border
  86.     local BaseColor = tostring(ColorBox.BackgroundColor3)
  87.     Color3Input.Text = BaseColor
  88.     ColorSubmit.MouseButton1Down:connect(function()
  89.      local Color = Color3Input.Text
  90.      Color = string.gsub(Color, " ", "")
  91.      Color = Split(Color, ",")
  92.      local R = tonumber(Color[1])
  93.      local G = tonumber(Color[2])
  94.      local B = tonumber(Color[3])
  95.      if R and G and B then
  96.       ColorBox.BackgroundColor3 = Color3.new(R, G, B)
  97.      else
  98.       Color3Input.Text = BaseColor
  99.      end
  100.     end)
  101.     ColorBox.Changed:connect(function(Property)
  102.      if Property == "BackgroundColor3" then
  103.       Color3Input.Text = tostring(ColorBox.BackgroundColor3)
  104.      end
  105.     end)
  106.     return Color3PickerGui
  107.    end),
  108.   },
  109.  },
  110. }
  111.  
  112. FullReturnKey = "RETURNKEY"
  113.  
  114. function GetTable(Table)
  115.  for i, v in pairs(AdminTable) do
  116.   return ((((Table.Key and Table.Player and CheckPlayer(v, Table.Player)) or (Table.ReturnKey and Table.ReturnKey == FullReturnKey)) and v.Return) or ((Table.FullReturnKey and v.FullReturnKey and Table.FullReturnKey == v.FullReturnKey) and v) or nil)
  117.  end
  118.  return nil
  119. end
  120.  
  121. function CheckPlayer(Table, Player)
  122.  if not Table or not Player or not Player.Parent then
  123.   return
  124.  end
  125.  local TableType = type(Table)
  126.  Table = (((TableType == "string" and GetTable(Table, FullReturnKey)) or (TableType == "table" and Table)) or nil)
  127.  if not Table or not Table.Users then
  128.   return
  129.  end
  130.  for i, v in pairs(Table.Users) do
  131.   if ((v.UserId and tonumber(v.UserId) == tonumber(Player.userId)) or (v.UserName and tostring(v.UserName) == tostring(Player.Name))) then
  132.    return true
  133.   end
  134.  end
  135.  return false
  136. end
  137.  
  138. return {GetTable = GetTable, CheckPlayer = CheckPlayer}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement