Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.StarterGui:SetCoreGuiEnabled("All", false)
- game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
- game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true)
- local assets = {
- 35636386, 72777962, 10715464, 169476802, 90512271,
- 126313419, 35660725
- }
- for _, asset in pairs(assets) do
- game:GetService("ContentProvider"):Preload("rbxassetid://" .. tostring(asset))
- end
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- repeat wait() until player.Character player.Character:Destroy()
- --player:WaitForDataReady()
- local computer = {
- screen = script.Parent
- }
- function edit(obj, ...)
- for _, property in pairs({...}) do
- obj[property[1]] = property[2]
- end
- return obj
- end
- function GLOBALinternetLoadHome(url)
- internetLoadHome(url)
- end
- function hookUpHoverEvents(object)
- local position = object.Position
- object.MouseEnter:connect(function()
- object:TweenPosition(position - UDim2.new(0, 0, 0, 10), "Out", "Quad", 0.5)
- end)
- object.MouseLeave:connect(function()
- coroutine.wrap(function()
- repeat wait() until object.Position == position - UDim2.new(0, 0, 0, 10)
- object:TweenPosition(position, "Out", "Bounce", 0.5)
- end)()
- end)
- return function()
- coroutine.wrap(function()
- repeat wait() until object.Position == position - UDim2.new(0, 0, 0, 10)
- object:TweenPosition(position, "Out", "Bounce", 0.5)
- end)()
- end
- end
- function getSkin(type, ...)
- local prop = ...
- local skins = {
- ["close_button"] = {
- {"Size", UDim2.new(0, 20, 0, 20)},
- {"Image", "rbxassetid://35636386"},
- {"BackgroundTransparency", 1},
- {"BorderSizePixel", 0}
- },
- ["blanket"] = {
- {"Size", UDim2.new(1, 0, 1, 0)},
- {"Text", ""},
- {"BackgroundColor3", Color3.new(0, 0, 0)},
- {"BorderSizePixel", 0}
- },
- ["icon"] = {
- {"Size", UDim2.new(0, 50, 0, 50)},
- {"BackgroundTransparency", 1},
- {"BorderSizePixel", 0}
- }
- }
- return unpack(skins[type])
- end
- function generateUI()
- local background = edit(
- Instance.new("ImageLabel", computer.screen),
- {"Size", UDim2.new(1, 0, 1, 0)},
- {"Image", "rbxassetid://10715464"}
- )
- local currentIndex = 2
- local internetPage = edit(
- Instance.new("Frame", computer.screen),
- {"Position", UDim2.new(0, 0, -1, 0)},
- {"Size", UDim2.new(1, 0, 1, 0)},
- {"BackgroundColor3", Color3.new(0.3, 0.3, 0.3)},
- {"ZIndex", currentIndex}
- )
- local internetWebsiteDisplay = edit(
- Instance.new("Frame", internetPage),
- {"Size", UDim2.new(1, 0, 0.89, 0)},
- {"Position", UDim2.new(0, 0, 0.11, 0)},
- {"ZIndex", currentIndex}
- )
- local internetSearchBar = edit(
- Instance.new("TextBox", internetPage),
- {"Size", UDim2.new(1, -100, 0, 25)},
- {"Position", UDim2.new(0, 50, 0, 10)},
- {"Text", "Default homepage"},
- {"BackgroundColor3", Color3.new(1, 1, 1)},
- {"FontSize", Enum.FontSize.Size14},
- {"ZIndex", currentIndex}
- )
- local internetSearchHistory = {}
- local slideHistory = function(url)
- pcall(function()
- for i = 9, 2, -1 do
- internetSearchHistory[i] = internetSearchHistory[i - 1]
- end
- internetSearchHistory[1] = url
- end)
- end
- local internetSearch = function(url)
- internetWebsiteDisplay:ClearAllChildren()
- slideHistory(url)
- if url:find("google.com") then
- print("google")
- elseif url:find("roblox.com") then
- local playerImage = edit(
- Instance.new("ImageLabel", internetWebsiteDisplay),
- {"Size", UDim2.new(0, 150, 0, 150)},
- {"Image", "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username=" .. player.Name},
- {"Position", UDim2.new(0.5, -75, 0, 10)},
- {"ZIndex", currentIndex}
- )
- local robloxLogo = edit(
- Instance.new("ImageLabel", internetWebsiteDisplay),
- {"Size", UDim2.new(0, 100, 0, 100)},
- {"Image", "rbxassetid://126313419"},
- {"Position", UDim2.new(0, 10, 0, 10)},
- {"ZIndex", currentIndex}
- )
- else
- local notFound = edit(
- Instance.new("TextLabel", internetWebsiteDisplay),
- {"Size", UDim2.new(0, 350, 0, 75)},
- {"Position", UDim2.new(0.5, -175, 0, 25)},
- {"Font", Enum.Font.Legacy},
- {"FontSize", Enum.FontSize.Size24},
- {"Text", "Error: Unknown website"},
- {"TextColor3", Color3.new(1, 0.2, 0.2)},
- {"TextStrokeTransparency", 0},
- {"ZIndex", currentIndex}
- )
- local returnHome = edit(
- Instance.new("TextButton", internetWebsiteDisplay),
- {"Size", UDim2.new(0, 226, 0, 50)},
- {"Position", UDim2.new(0.5, -113, 0, 125)},
- {"Text", "Return to default webpage"},
- {"FontSize", Enum.FontSize.Size14},
- {"TextColor3", Color3.new(1, 1, 1)},
- {"TextStrokeTransparency", 0},
- {"ZIndex", currentIndex}
- )
- returnHome.MouseButton1Click:connect(function()
- GLOBALinternetLoadHome()
- end)
- end
- end
- function internetLoadHome()
- internetWebsiteDisplay:ClearAllChildren()
- internetSearchBar.Text = "Default homepage"
- local pageHeader = edit(
- Instance.new("TextLabel", internetWebsiteDisplay),
- {"Size", UDim2.new(0, 1, 0, 1)},
- {"Position", UDim2.new(0.5, 0, 0, 25)},
- {"BorderSizePixel", 0},
- {"BackgroundTransparency", 1},
- {"Text", "Google Chrome"},
- {"FontSize", Enum.FontSize.Size36},
- {"TextStrokeTransparency", 0},
- {"Font", Enum.Font.Legacy},
- {"TextColor3", Color3.new(1, 0.6, 0.6)},
- {"ZIndex", currentIndex}
- )
- local favorites = edit(
- Instance.new("Frame", internetWebsiteDisplay),
- {"Size", UDim2.new(0, 150, 0, 275)},
- {"Position", UDim2.new(0.5, -175, 0, 75)},
- {"BackgroundColor3", Color3.new(1, 1, 1)},
- {"ZIndex", currentIndex}
- )
- local favHead = edit(
- Instance.new("TextLabel", favorites),
- {"Size", UDim2.new(1, 0, 0, 25)},
- {"TextColor3", Color3.new(1, 0.6, 0.6)},
- {"TextStrokeTransparency", 0},
- {"Text", "Sites to visit"},
- {"BackgroundColor3", Color3.new(0.85, 0.85, 0.85)},
- {"FontSize", Enum.FontSize.Size14},
- {"ZIndex", currentIndex}
- )
- local fav1 = edit(
- Instance.new("TextButton", favorites),
- {"Size", UDim2.new(1, 0, 0, 25)},
- {"Position", UDim2.new(0, 0, 0, 50)},
- {"Text", "roblox.com"},
- {"TextColor3", Color3.new(0, 0, 0)},
- {"FontSize", Enum.FontSize.Size12},
- {"BackgroundColor3", Color3.new(1, 0.6, 0.6)},
- {"ZIndex", currentIndex}
- )
- fav1.MouseButton1Click:connect(function()
- internetSearchBar.Text = fav1.Text
- internetSearch(fav1.Text)
- end)
- local history = edit(
- Instance.new("Frame", internetWebsiteDisplay),
- {"Size", UDim2.new(0, 150, 0, 275)},
- {"Position", UDim2.new(0.5, 25, 0, 75)},
- {"BackgroundColor3", Color3.new(1, 1, 1)},
- {"ZIndex", currentIndex}
- )
- local hisHead = edit(
- Instance.new("TextLabel", history),
- {"Size", UDim2.new(1, 0, 0, 25)},
- {"TextColor3", Color3.new(1, 0.6, 0.6)},
- {"TextStrokeTransparency", 0},
- {"Text", "Search history"},
- {"BackgroundColor3", Color3.new(0.85, 0.85, 0.85)},
- {"FontSize", Enum.FontSize.Size14},
- {"ZIndex", currentIndex}
- )
- for i = 1, 9 do
- local direct = edit(
- Instance.new("TextButton", history),
- {"Size", UDim2.new(1, 0, 0, 25)},
- {"Position", UDim2.new(0, 0, 0, 25 + (i * 25))},
- {"Text", internetSearchHistory[i] or ""},
- {"BackgroundColor3", Color3.new(1, 1, 1)},
- {"TextColor3", Color3.new(0, 0, 0)},
- {"BackgroundColor3", Color3.new(1, 0.6, 0.6)},
- {"FontSize", Enum.FontSize.Size12},
- {"ZIndex", currentIndex}
- )
- if not internetSearchHistory[i] then
- direct.Visible = false
- end
- direct.MouseButton1Click:connect(function()
- internetSearchBar.Text = direct.Text
- internetSearch(direct.Text)
- end)
- end
- end
- local internetSearchButton = edit(
- Instance.new("ImageButton", internetPage),
- {"Size", UDim2.new(0, 25, 0, 25)},
- {"Position", UDim2.new(1, -50, 0, 10)},
- {"Image", "rbxassetid://169476802"},
- {"BackgroundColor3", Color3.new(1, 1, 1)},
- {"ZIndex", currentIndex}
- )
- internetSearchButton.MouseButton1Click:connect(function()
- local website = internetSearch(internetSearchBar.Text:lower())
- end)
- local internetHomeButton = edit(
- Instance.new("ImageButton", internetPage),
- {"Size", UDim2.new(0, 25, 0, 25)},
- {"Position", UDim2.new(0, 25, 0, 10)},
- {"Image", "rbxassetid://35660725"},
- {"BackgroundColor3", Color3.new(1, 1, 1)},
- {"ZIndex", currentIndex}
- )
- internetHomeButton.MouseButton1Click:connect(function()
- internetLoadHome()
- end)
- local internetIcon = edit(
- Instance.new("ImageButton", computer.screen),
- {"Position", UDim2.new(0, 10, 1, -60)},
- {"Image", "rbxassetid://72777962"},
- getSkin("icon")
- )
- local internetIconBack = hookUpHoverEvents(internetIcon)
- internetIcon.MouseButton1Click:connect(function()
- internetLoadHome()
- internetIconBack()
- internetPage:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Bounce", 1)
- end)
- local internetClose = edit(
- Instance.new("ImageButton", internetPage),
- {"ZIndex", currentIndex},
- {"Position", UDim2.new(1, -20, 0, 0)},
- getSkin("close_button")
- )
- internetClose.MouseButton1Click:connect(function()
- internetPage:TweenPosition(UDim2.new(0, 0, -1, 0), "Out", "Linear", 0.5)
- end)
- local wordIcon = edit(
- Instance.new("ImageButton", computer.screen),
- {"Position", UDim2.new(0, 70, 1, -60)},
- {"Image", "rbxassetid://"},
- getSkin("icon")
- )
- powerOn()
- end
- function powerOn()
- computer.screen:WaitForChild("ScreenCover"):Destroy()
- local black = edit(
- Instance.new("TextLabel", computer.screen),
- getSkin("blanket")
- )
- for i = 1, 50 do
- wait()
- edit(black, {"BackgroundTransparency", black.BackgroundTransparency + 1/50})
- end
- black:Destroy()
- end
- function powerOff()
- local black = edit(
- Instance.new("TextLabel", computer.screen),
- {"BackgroundTransparency", 1},
- {"Name", "ScreenCover"},
- getSkin("blanket")
- )
- for i = 1, 50 do
- wait()
- edit(black, {"BackgroundTransparency", black.BackgroundTransparency - 1/50})
- end
- end
- generateUI()
Advertisement
Add Comment
Please, Sign In to add comment