Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TabletPcScreen = Instance.new("ScreenGui")
- UserInputService = game:GetService("UserInputService")
- TweenService = game:GetService("TweenService")
- StartupSound = Instance.new("Sound")
- LogoFrame = Instance.new("Frame")
- LogoFrameUICorner = Instance.new("UICorner")
- LogoImage = Instance.new("ImageLabel")
- StartUp = Instance.new("StringValue")
- MainScreen = Instance.new("ImageLabel")
- MainScreenUIGradient = Instance.new("UIGradient")
- BlockScreenFrame = Instance.new("Frame")
- DownloadingAssetsTextLabel = Instance.new("TextLabel")
- BlockScreenTime = Instance.new("TextLabel")
- BlockScreenDate = Instance.new("TextLabel")
- LockScreenImage = Instance.new("ImageLabel")
- TopBarTime = Instance.new("TextLabel")
- TopBar = Instance.new("Frame")
- TopBarUIPadding = Instance.new("UIPadding")
- TopBarUIGridLayout = Instance.new("UIGridLayout")
- AppsFrame = Instance.new("Frame")
- TabletPcScreen.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- TabletPcScreen.ResetOnSpawn = true
- StartUp.Value = "true"
- local dragging = false
- local hasMoved = false
- local startPosition
- local startY
- local Assets = 0
- local AllAssets = 3
- local Apps = {}
- DownloadingAssetsTextLabel.Name = "DownloadingAssetsTextLabel"
- DownloadingAssetsTextLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
- DownloadingAssetsTextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- DownloadingAssetsTextLabel.Parent = TabletPcScreen
- DownloadingAssetsTextLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- DownloadingAssetsTextLabel.Size = UDim2.new(0, 500, 0, 250)
- DownloadingAssetsTextLabel.Font = Enum.Font.Code
- DownloadingAssetsTextLabel.BorderSizePixel = 0
- DownloadingAssetsTextLabel.Text = "Downloading assets...(0/"..AllAssets..")\n\nPlease, be patient"
- DownloadingAssetsTextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- DownloadingAssetsTextLabel.TextSize = 30
- DownloadingAssetsTextLabel.TextXAlignment = Enum.TextXAlignment.Center
- DownloadingAssetsTextLabel.TextYAlignment = Enum.TextYAlignment.Center
- DownloadingAssetsTextLabel.Visible = false
- local function System()
- MainScreen.Parent = TabletPcScreen
- MainScreen.Size = UDim2.new(0, 0, 0, 0)
- MainScreen.Position = UDim2.new(0.5, 0, 1, 0)
- MainScreen.AnchorPoint = Vector2.new(0.5, 1)
- MainScreen.Active = true
- BlockScreenFrame.Parent = MainScreen
- BlockScreenFrame.Size = UDim2.new(0, 0, 0, 0)
- BlockScreenFrame.Position = UDim2.new(0.5, 0, 1, 0)
- BlockScreenFrame.AnchorPoint = Vector2.new(0.5, 1)
- BlockScreenFrame.Transparency = 1
- BlockScreenFrame.Active = true
- BlockScreenTime.Name = "BlockScreenTime"
- BlockScreenTime.Position = UDim2.new(0.5, 0, 0.2, 0)
- BlockScreenTime.AnchorPoint = Vector2.new(0.5, 0.5)
- BlockScreenTime.Parent = MainScreen
- BlockScreenTime.BackgroundTransparency = 1
- BlockScreenTime.Size = UDim2.new(0, 100, 0, 100)
- BlockScreenTime.Font = Enum.Font.ArimoBold
- BlockScreenTime.TextColor3 = Color3.fromRGB(255, 255, 255)
- BlockScreenTime.TextSize = 75
- BlockScreenTime.Text = os.date("%H:%M")
- BlockScreenDate.Name = "BlockScreenDate"
- BlockScreenDate.Position = UDim2.new(0.5, 0, 0.28, 0)
- BlockScreenDate.AnchorPoint = Vector2.new(0.5, 0.5)
- BlockScreenDate.Parent = MainScreen
- BlockScreenDate.BackgroundTransparency = 1
- BlockScreenDate.Size = UDim2.new(0, 350, 0, 50)
- BlockScreenDate.Font = Enum.Font.ArimoBold
- BlockScreenDate.TextColor3 = Color3.fromRGB(255, 255, 255)
- BlockScreenDate.TextSize = 30
- BlockScreenDate.TextXAlignment = Enum.TextXAlignment.Center
- BlockScreenDate.TextYAlignment = Enum.TextYAlignment.Center
- BlockScreenDate.Text = os.date("%a, %d %B")
- LockScreenImage.Name = "LockScreenImage"
- LockScreenImage.Parent = MainScreen
- LockScreenImage.AnchorPoint = Vector2.new(0.5, 0.5)
- LockScreenImage.Position = UDim2.new(0.5, 0, 0.08, 0)
- LockScreenImage.Size = UDim2.new(0, 50, 0, 50)
- LockScreenImage.BackgroundTransparency = 1
- LockScreenImage.Image = getcustomasset("Libra_OS/Sounds_And_Images/LockScreen_Image.png")
- TopBar.Name = "TopBar"
- TopBar.Position = UDim2.new(0.5, 0, 0, 0)
- TopBar.AnchorPoint = Vector2.new(0.5, 0)
- TopBar.Parent = MainScreen
- TopBar.Transparency = 1
- TopBar.Size = UDim2.new(1, 0, 0, 30)
- TopBar.Visible = false
- TopBarUIPadding.Parent = TopBar
- TopBarUIPadding.PaddingBottom = UDim.new(0, 0)
- TopBarUIPadding.PaddingLeft = UDim.new(0, 0)
- TopBarUIPadding.PaddingRight = UDim.new(0, 0)
- TopBarUIPadding.PaddingTop = UDim.new(0, 0)
- TopBarUIGridLayout.Parent = TopBar
- TopBarUIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
- TopBarUIGridLayout.CellPadding = UDim2.new(0, 1, 0, 0)
- TopBarUIGridLayout.CellSize = UDim2.new(0, 60, 0, 30)
- TopBarUIGridLayout.HorizontalAlignment = Enum.HorizontalAlignment.Right
- TopBarUIGridLayout.VerticalAlignment = Enum.VerticalAlignment.Center
- TopBarTime.Name = "TopBarTime"
- TopBarTime.Parent = TopBar
- TopBarTime.BackgroundTransparency = 1
- TopBarTime.Font = Enum.Font.ArimoBold
- TopBarTime.AnchorPoint = Vector2.new(0.5, 0.5)
- TopBarTime.TextColor3 = Color3.fromRGB(255, 255, 255)
- TopBarTime.TextSize = 20
- TopBarTime.Text = os.date("%H:%M")
- AppsFrame.Name = "AppsFrame"
- AppsFrame.Position = UDim2.new(0.5, 0, 1, 0)
- AppsFrame.AnchorPoint = Vector2.new(0.5, 1)
- AppsFrame.Parent = MainScreen
- AppsFrame.Transparency = 1
- AppsFrame.Size = UDim2.new(0, 0, 0, 0)
- AppsFrame.Visible = false
- local function UpdateApps()
- AppsFrame:ClearAllChildren()
- AppsFrameUIPadding = Instance.new("UIPadding")
- AppsFrameUIPadding.Parent = AppsFrame
- AppsFrameUIPadding.PaddingBottom = UDim.new(0, 25)
- AppsFrameUIPadding.PaddingLeft = UDim.new(0, 25)
- AppsFrameUIPadding.PaddingRight = UDim.new(0, 25)
- AppsFrameUIPadding.PaddingTop = UDim.new(0, 25)
- AppsFrameUIGridLayout = Instance.new("UIGridLayout")
- AppsFrameUIGridLayout.Parent = AppsFrame
- AppsFrameUIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
- AppsFrameUIGridLayout.CellPadding = UDim2.new(0, 10, 0, 10)
- AppsFrameUIGridLayout.CellSize = UDim2.new(0, 70, 0, 70)
- AppsFrameUIGridLayout.HorizontalAlignment = Enum.HorizontalAlignment.Left
- AppsFrameUIGridLayout.VerticalAlignment = Enum.VerticalAlignment.Top
- ScriptBloxAppBackgroundButton = Instance.new("ImageButton")
- ScriptBloxAppBackgroundButton.Parent = AppsFrame
- ScriptBloxAppBackgroundButton.AutoButtonColor = false
- ScriptBloxAppBackgroundButton.BackgroundColor3 = Color3.fromRGB(234, 200, 164)
- ScriptBloxAppBackgroundButtonUICorner = Instance.new("UICorner")
- ScriptBloxAppBackgroundButtonUICorner.Parent = ScriptBloxAppBackgroundButton
- ScriptBloxAppBackgroundButtonUICorner.CornerRadius = UDim.new(0, 20)
- ScriptBloxAppButton = Instance.new("ImageLabel")
- ScriptBloxAppButton.Parent = ScriptBloxAppBackgroundButton
- --ScriptBloxAppButton.Image
- end
- UpdateApps()
- MainScreenUIGradient.Color = ColorSequence.new{
- ColorSequenceKeypoint.new(0.00, Color3.fromRGB(7, 38, 49)),
- ColorSequenceKeypoint.new(0.15, Color3.fromRGB(35, 56, 72)),
- ColorSequenceKeypoint.new(0.30, Color3.fromRGB(96, 72, 97)),
- ColorSequenceKeypoint.new(0.45, Color3.fromRGB(153, 85, 112)),
- ColorSequenceKeypoint.new(0.60, Color3.fromRGB(185, 107, 129)),
- ColorSequenceKeypoint.new(0.75, Color3.fromRGB(198, 153, 158)),
- ColorSequenceKeypoint.new(0.90, Color3.fromRGB(202, 188, 180)),
- ColorSequenceKeypoint.new(1.00, Color3.fromRGB(203, 205, 194))
- }
- MainScreenUIGradient.Rotation = 45
- MainScreenUIGradient.Parent = MainScreen
- local function updateFrameSize()
- MainScreen.Size = UDim2.new(0, workspace.CurrentCamera.ViewportSize.X, 0, workspace.CurrentCamera.ViewportSize.Y)
- BlockScreenFrame.Size = UDim2.new(0, workspace.CurrentCamera.ViewportSize.X, 0, workspace.CurrentCamera.ViewportSize.Y)
- AppsFrame.Size = UDim2.new(0, workspace.CurrentCamera.ViewportSize.X, 0, workspace.CurrentCamera.ViewportSize.Y - 30)
- end
- workspace.CurrentCamera:GetPropertyChangedSignal("ViewportSize"):Connect(updateFrameSize)
- updateFrameSize()
- local function onInputBegan(input)
- if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- hasMoved = false
- startPosition = input.Position
- startY = BlockScreenFrame.Position.Y.Scale
- end
- end
- local function onInputChanged(input)
- if dragging and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMovement) then
- local delta = input.Position - startPosition
- if math.abs(delta.Y) > 13 then
- hasMoved = true
- end
- if hasMoved and delta.Y < 0 then
- local newY = startY + delta.Y / BlockScreenFrame.Parent.AbsoluteSize.Y
- if newY < 0 then
- newY = 0
- elseif
- newY > 1 then
- newY = 1
- end
- BlockScreenFrame.Position = UDim2.new(BlockScreenFrame.Position.X.Scale, 0, newY, 0)
- end
- end
- end
- local function onInputEnded(input)
- if dragging and (input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1) then
- dragging = false
- if hasMoved then
- local delta = input.Position - startPosition
- if hasMoved and delta.Y < 0 then
- if BlockScreenFrame.Position.Y.Scale < 0.25 then
- TweenService:Create(BlockScreenFrame, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(0.5, 0, 1, 0)}):Play()
- TweenService:Create(LockScreenImage, TweenInfo.new(0.2), {ImageTransparency = 0}):Play()
- TweenService:Create(BlockScreenTime, TweenInfo.new(0.5), {TextTransparency = 0}):Play()
- TweenService:Create(BlockScreenTime, TweenInfo.new(0.5), {TextSize = 75}):Play()
- TweenService:Create(BlockScreenDate, TweenInfo.new(1.1), {TextSize = 30}):Play()
- TweenService:Create(BlockScreenTime, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(0.5, 0, 0.2, 0)}):Play()
- TweenService:Create(BlockScreenDate, TweenInfo.new(0.5), {TextTransparency = 0}):Play()
- TweenService:Create(BlockScreenDate, TweenInfo.new(1.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(0.5, 0, 0.28, 0)}):Play()
- else
- TweenService:Create(BlockScreenFrame, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(0.5, 0, -2, 0)}):Play()
- TweenService:Create(BlockScreenTime, TweenInfo.new(0.5), {TextTransparency = 1}):Play()
- TweenService:Create(LockScreenImage, TweenInfo.new(0.2), {ImageTransparency = 1}):Play()
- TweenService:Create(BlockScreenTime, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(0.5, 0, 0, 0)}):Play()
- TweenService:Create(BlockScreenTime, TweenInfo.new(0.5), {TextSize = 100}):Play()
- TweenService:Create(BlockScreenDate, TweenInfo.new(1.1), {TextSize = 50}):Play()
- TweenService:Create(BlockScreenDate, TweenInfo.new(1.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(0.5, 0, 0, 0)}):Play()
- TweenService:Create(BlockScreenDate, TweenInfo.new(0.5), {TextTransparency = 1}):Play()
- end
- end
- end
- end
- end
- BlockScreenFrame.InputBegan:Connect(onInputBegan)
- BlockScreenFrame.InputChanged:Connect(onInputChanged)
- BlockScreenFrame.InputEnded:Connect(onInputEnded)
- spawn(function()
- while task.wait() do
- BlockScreenTime.Text = os.date("%H:%M")
- BlockScreenDate.Text = os.date("%a, %d %B")
- TopBarTime.Text = os.date("%H:%M")
- spawn(function()
- if BlockScreenTime.TextTransparency == 1 then
- TopBar.Visible = true
- AppsFrame.Visible = true
- else
- TopBar.Visible = false
- AppsFrame.Visible = false
- end
- end)
- end
- end)
- end
- function createfolders(path)
- local pathtbl = string.split(path, "/")
- for i, v in pairs(pathtbl) do
- if i == 1 then
- if not isfolder(v) then
- makefolder(v)
- end
- else
- local newpath = pathtbl[1]
- for i2=2, i-1 do
- newpath = newpath.. "/" ..pathtbl[i2]
- end
- newpath = newpath.. "/" ..v
- if not isfolder(newpath) then
- makefolder(newpath)
- end
- end
- end
- end
- if not isfolder("Libra_OS") then
- createfolders("Libra_OS")
- end
- if not isfolder("Libra_OS/Sounds_And_Images") then
- createfolders("Libra_OS/Sounds_And_Images")
- end
- if not isfolder("Libra_OS/Apps") then
- createfolders("Libra_OS/Apps")
- end
- if not isfile("Libra_OS/Apps/ScriptBlox.ECCS") then
- writefile("Libra_OS/Apps/ScriptBlox.ECCS", "")
- end
- if not isfile("Libra_OS/Start_Up.ECCS") then
- writefile("Libra_OS/Start_Up.ECCS", StartUp.Value)
- end
- if not isfile("Libra_OS/Sounds_And_Images/Start_Up_Sound.wav") then
- DownloadingAssetsTextLabel.Visible = true
- local success, response = pcall(function()
- return
- game:HttpGet("https://dl.sndup.net/4kzdg/Start_Up.wav")
- end)
- if success then
- StartUpSound = "https://dl.sndup.net/4kzdg/Start_Up.wav"
- DataMatch = StartUpSound:match(".wav")
- Main = "StartUpSound"..DataMatch
- writefile("Libra_OS/Sounds_And_Images/Start_Up_Sound.wav", response)
- Assets = Assets + 1
- DownloadingAssetsTextLabel.Text = "Downloading assets...("..Assets.."/"..AllAssets..")\n\nPlease, be patient"
- StartupSound.SoundId = getcustomasset("Libra_OS/Sounds_And_Images/Start_Up_Sound.wav")
- end
- end
- if not isfile("Libra_OS/Sounds_And_Images/LockScreen_Image.png") then
- local success, response = pcall(function()
- return
- game:HttpGet("https://i.ibb.co/bX0MrS5/padlock.png")
- end)
- if success then
- LockImage = "https://i.ibb.co/bX0MrS5/padlock.png"
- DataMatch = LockImage:match("^.+(%..+)$")
- LockScreen = "LockImage"..DataMatch
- Assets = Assets + 1
- DownloadingAssetsTextLabel.Text = "Downloading assets...("..Assets.."/"..AllAssets..")\n\nPlease, be patient"
- writefile("Libra_OS/Sounds_And_Images/LockScreen_Image.png", response)
- end
- end
- if not isfile("Libra_OS/Sounds_And_Images/Start_Up_Image.png") then
- DownloadingAssetsTextLabel.Visible = true
- local success, response = pcall(function()
- return
- game:HttpGet("https://i.ibb.co/8mMnZ7Z/libra.png")
- end)
- if success then
- StartUpSound = "https://i.ibb.co/8mMnZ7Z/libra.png"
- DataMatch = StartUpSound:match("^.+(%..+)$")
- Main = "StartUpSound"..DataMatch
- writefile("Libra_OS/Sounds_And_Images/Start_Up_Image.png", response)
- Assets = Assets + 1
- DownloadingAssetsTextLabel.Text = "Downloading assets...("..Assets.."/"..AllAssets..")\n\nPlease, be patient"
- LogoImage.Image = getcustomasset("Libra_OS/Sounds_And_Images/Start_Up_Image.png")
- end
- end
- if AllAssets == Assets then
- DownloadingAssetsTextLabel.Text = "Downloading assets...("..Assets.."/"..AllAssets..")\n\nLoading..."
- wait(2)
- DownloadingAssetsTextLabel:Destroy()
- end
- ReadStartUp = readfile("Libra_OS/Start_Up.ECCS")
- StartUp.Value = ReadStartUp
- --[[LoadApps = readfile("Libra_OS/Apps/")
- for app in string.gmatch(LoadApps, '([^\n]+)') do
- table.insert(Apps, app:match("^%s*(.-)%s*$"))
- end]]
- if StartUp.Value == "true" then
- writefile("Libra_OS/Start_Up.ECCS", "false")
- StartupSound.Parent = game.Workspace
- StartupSound.Volume = 1
- StartupSound:Play()
- LogoFrame.Parent = TabletPcScreen
- LogoFrame.Size = UDim2.new(0, 0, 0, 0)
- LogoFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
- LogoFrame.AnchorPoint = Vector2.new(0.5, 0.5)
- LogoFrame.BackgroundColor3 = Color3.new(0, 0, 0)
- LogoFrameUICorner.Parent = LogoFrame
- LogoFrameUICorner.CornerRadius = UDim.new(1, 0)
- LogoImage.Parent = LogoFrame
- LogoImage.Size = UDim2.new(0, 500, 0, 400)
- LogoImage.Position = UDim2.new(0.5, 0, 0.5, 0)
- LogoImage.AnchorPoint = Vector2.new(0.5, 0.5)
- LogoImage.BackgroundTransparency = 1
- LogoImage.ImageTransparency = 1
- local function changeCornerRadius(target, radius, duration)
- local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
- local goal = {CornerRadius = radius}
- local tween = TweenService:Create(target, tweenInfo, goal)
- tween:Play()
- end
- local function changeTransparency(target, transparency, duration)
- local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
- local goal = {BackgroundTransparency = transparency}
- local tween = TweenService:Create(target, tweenInfo, goal)
- tween:Play()
- tween.Completed:Wait()
- end
- local function changeImageTransparency(target, transparency, duration)
- local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
- local goal = {ImageTransparency = transparency}
- local tween = TweenService:Create(target, tweenInfo, goal)
- tween:Play()
- tween.Completed:Wait()
- end
- local function animateFrame()
- local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
- local goal = {Size = UDim2.new(1, 0, 1, 100), Position = UDim2.new(0, 0, 0, -100), AnchorPoint = Vector2.new(0, 0)}
- local tween = TweenService:Create(LogoFrame, tweenInfo, goal)
- tween:Play()
- changeCornerRadius(LogoFrameUICorner, UDim.new(0, 0), 0.5)
- tween.Completed:Wait()
- changeTransparency(LogoFrame, 0, 0)
- wait(0.5)
- changeImageTransparency(LogoImage, 0, 3)
- wait(4)
- changeImageTransparency(LogoImage, 1, 2)
- end
- animateFrame()
- wait(1)
- System()
- else
- if StartUp.Value == "false" then
- System()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement