Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ About: Samsung Galaxy Tab S
- Created entirely by Despairus and inspired by RiOS.
- This script MUST be local.
- When ran: click with the tablet tool selected to spawn the destablet.
- This is the destablet, with it's immense processing speed, action-packed with 8 GB of space!
- Need to calculate something on the go? Wanna play that new tileblox adventure game? Need to write down a quick thought in a note?
- The destablet has it all.
- MADE BY DESPAIRUS!
- Enjoy.
- ]]
- --[[ NOTES TO SELF:
- RADAR ID: 149177741 and 6314249 ]]
- --[[ Todo:
- make a notification function.
- work on top right corner button which instead of powers off tablet, turns it into a platform.
- ]]
- --[[ UPDATES:
- Notes app has been successfully completed.
- Radar and iMessage 88% perfected, which is good enough for now.
- ]]
- --local Username = "Despairus"
- local ontablet = game:GetService("UserInputService").TouchEnabled
- local Version = "0.2.99"
- local xangle = math.rad(28)
- local surfing = false
- local oldcam = game.Workspace.Camera.CameraType
- --[[ How to run:
- Create a new note on code.stypi.com and then in a script builder
- (preferably oxcool1's or antiboomz0r's) chat: /e hl/(stypi link)
- and before the stypi ID at the end put raw/
- example: /e hl/https://code.stypi.com/raw/5cd8oaoh
- putting /e before it makes the chat hidden for other users.
- ]]
- --[[ 0:Legacy, 1:Arial, 2:ArialBold, 3:SourceSans, 4:SourceSansBold ]]
- local mainfont = "Legacy"
- local fonttypes = {"Legacy", "Arial", "ArialBold", "SourceSans", "SourceSansBold"}
- local brickcolors = {"Really red", "Bright red", "Bright blue", "Teal", "Bright purple", "Bright orange", "Bright green", "Lime green", "White", "Medium stone grey", "Black", "Really black"}
- backgroundids = {"169809773", "76315925", "103375265", "172249714", "123567232", "59625532", "122004466"}
- backgroundnames = {"Desert Mountain", "New york city", "Flowers", "Minecraft", "Beach", "Beach2", "Beach3"}
- AppStorage = {}
- AppStorage.NotesApp = {}
- AppStorage.NotesApp.Notes = {}
- AppStorage.NotesApp.Titles = {}
- AppStorage.NotesApp.Contents = {}
- local bg_index = 5
- local bg_image_id = backgroundids[bg_index]
- local bg_image_name = backgroundnames[bg_index]
- processing_con = nil
- btnDown_tabletbegin = nil
- keydown_con = nil
- keyup_con = nil
- TabletBegun = false
- appopened = false
- ismodal = true
- totalmbspace = (8 * 1000) --[[ 8 GB ]]
- usedmbspace = 0
- appnames = {}
- totalApps = 0
- local columns = 0
- local rows = 1
- --local User = game.Players[Username]
- local User = game.Players.LocalPlayer
- local Username = User.Name
- local Tool = Instance.new("Tool", User.Backpack)
- Tool.Name = Username.."'s Tablet"
- Tool.ToolTip = Tool.Name
- local handle = Instance.new("Part", Tool)
- handle.BrickColor = BrickColor.new("Really black")
- handle.FormFactor = "Custom"
- handle.Size = Vector3.new(3,3,1)
- handle.Name = "Handle"
- handle.Locked = true
- local ipad = Instance.new("SpecialMesh", handle)
- ipad.MeshType = "FileMesh"
- ipad.MeshId = "http://www.roblox.com/asset?id=97689497"
- ipad.TextureId = "http://www.roblox.com/asset?id=99286891"
- local currentApp = Instance.new("StringValue", handle)
- currentApp.Name = "CurrentApp"
- currentApp.Value = ""
- local c_angle = Instance.new("Vector3Value", handle)
- c_angle.Name = "Angle"
- function isnumber(x)
- if not x then return end
- if (type(tonumber(x)) == "number") then
- return true
- else
- return false
- end
- end
- function str_explode(divider, text)
- if text == nil or divider == nil then return {} end
- if tostring(text) == "" then return {} end
- if tostring(divider) == "" then return {text} end
- local text = tostring(text)
- local divider = tostring(divider)
- local position = 0
- local words = {}
- for start, stop in function() return string.find(text, divider, position, true) end do
- table.insert(words, string.sub(text, position, start - 1))
- position = stop + 1
- end
- table.insert(words, string.sub(text, position))
- return words
- end
- function alert(par, txt, dur)
- if par:findFirstChild("ALERT") == nil then
- local txtlbl = Instance.new("TextLabel", par)
- txtlbl.Size = UDim2.new(1,0,1,0)
- txtlbl.BackgroundColor3 = Color3.new(0,0,0)
- txtlbl.TextColor3 = Color3.new(1,1,1)
- txtlbl.FontSize = "Size48"
- txtlbl.TextWrapped = true
- txtlbl.Name = "ALERT"
- txtlbl.Font = mainfont
- txtlbl.ZIndex = 10
- txtlbl.Text = txt
- Delay(dur, function()
- for i = 1,10 do
- txtlbl.BackgroundTransparency = txtlbl.BackgroundTransparency + 0.1
- txtlbl.TextTransparency = txtlbl.TextTransparency + 0.1
- wait(0.1)
- end
- txtlbl:Destroy()
- end)
- end
- end
- function tempHL(ob) --[[ temporary highlights for mouse clicks ]]
- local oldbg = ob.BackgroundColor3
- ob.BackgroundColor3 = Color3.new(1,1,0)
- Delay(0.4, function()
- if ob.Parent ~= nil then
- ob.BackgroundColor3 = oldbg
- end
- end)
- end
- function prompt(par, caption, placeholder, onsubmit)
- if User.PlayerGui:findFirstChild("PROMPT") ~= nil then return end
- local main = Instance.new("ScreenGui", User.PlayerGui)
- main.Name = "PROMPT"
- local f = Instance.new("Frame", main)
- f.BackgroundColor3 = Color3.new(0,0,0)
- f.BorderColor3 = Color3.new(1,1,1)
- f.Position = UDim2.new(.4,0,.4,0)
- f.Name = "PROMPT"
- local exitbtnx = 0.12
- local txtbox = Instance.new("TextBox", f)
- local submit = Instance.new("TextButton", f)
- submit.BackgroundColor3 = Color3.new(0,1,0)
- submit.BorderColor3 = Color3.new(1,1,1)
- submit.TextColor3 = Color3.new(1,1,1)
- submit.Size = UDim2.new(1,0,.15,0)
- submit.Position = UDim2.new(0,0,1,0)
- submit.FontSize = "Size18"
- submit.Font = mainfont
- submit.Text = "Submit"
- submit.Modal = ismodal
- submit.ZIndex = 5
- submit.MouseButton1Down:connect(function()
- xpcall(function() onsubmit(txtbox.Text) main:Remove() end, function(Error)
- alert(par, "Error: " ..Error, 2)
- CloseApps(par)
- main:Remove()
- end)
- end)
- local cap = Instance.new("TextLabel", f)
- cap.BackgroundColor3 = Color3.new(0,0,0)
- cap.BorderColor3 = Color3.new(1,1,1)
- cap.TextColor3 = Color3.new(1,1,1)
- cap.Size = UDim2.new(1-exitbtnx,0,0.14,0)
- cap.FontSize = "Size18"
- cap.Font = mainfont
- cap.Text = caption
- txtbox.BackgroundColor3 = Color3.new(0,0,0)
- txtbox.BorderColor3 = Color3.new(1,1,1)
- txtbox.TextColor3 = Color3.new(1,1,1)
- txtbox.Size = UDim2.new(1,0,1-(submit.Size.Y.Scale-cap.Size.Y.Scale),0)
- txtbox.Position = UDim2.new(0,0,cap.Size.Y.Scale,0)
- txtbox.ClearTextOnFocus = false
- txtbox.TextWrapped = true
- txtbox.MultiLine = true
- txtbox.Text = ""
- local exit = Instance.new("TextButton", f)
- exit.BackgroundColor3 = Color3.new(1,0,0)
- exit.BorderColor3 = Color3.new(1,1,1)
- exit.TextColor3 = Color3.new(1,1,1)
- exit.Size = UDim2.new(exitbtnx,0,cap.Size.Y.Scale,0)
- exit.Position = UDim2.new(1-exitbtnx,0,0,0)
- exit.FontSize = "Size18"
- exit.Modal = ismodal
- exit.Font = mainfont
- exit.Text = "X"
- exit.MouseButton1Down:connect(function() main:Remove() end)
- f:TweenSize(UDim2.new(.34,0,.34,0), "Out", "Quad", 0.4, false, nil)
- end
- function listprompt(par, caption, contents, onselect)
- if User.PlayerGui:findFirstChild("PROMPT") ~= nil then return end
- local main = Instance.new("ScreenGui", User.PlayerGui)
- main.Name = "LISTPROMPT"
- local f = Instance.new("Frame", main)
- f.BackgroundColor3 = Color3.new(0,0,0)
- f.BorderColor3 = Color3.new(1,1,1)
- f.Position = UDim2.new(.4,0,.4,0)
- f.Name = "LISTPROMPT"
- local exitbtnx = 0.12
- local cap = Instance.new("TextLabel", f)
- cap.BackgroundColor3 = Color3.new(0,0,0)
- cap.BorderColor3 = Color3.new(1,1,1)
- cap.TextColor3 = Color3.new(1,1,1)
- cap.Size = UDim2.new(1-exitbtnx,0,0.14,0)
- cap.FontSize = "Size18"
- cap.Font = mainfont
- cap.Text = caption
- local fscroll = Instance.new("ScrollingFrame", f)
- fscroll.BackgroundColor3 = Color3.new(0,0,0)
- fscroll.BorderColor3 = Color3.new(1,1,1)
- fscroll.Size = UDim2.new(1,0,1-cap.Size.Y.Scale,0)
- fscroll.Position = UDim2.new(0,0,cap.Size.Y.Scale,0)
- for i = 1,#contents do
- local btn = Instance.new("TextButton", fscroll)
- btn.BackgroundColor3 = Color3.new(0,0,0)
- btn.BorderColor3 = Color3.new(1,1,1)
- btn.TextColor3 = Color3.new(1,1,1)
- btn.Size = UDim2.new(1,0,0.14,0)
- btn.Position = UDim2.new(0,0,(btn.Size.Y.Scale*i)-btn.Size.Y.Scale,0)
- btn.Modal = ismodal
- btn.FontSize = "Size14"
- btn.Font = mainfont
- btn.Text = contents[i]
- btn.Name = "btn" ..i
- btn.MouseButton1Down:connect(function() onselect(contents[i], i) main:remove() end)
- end
- local exit = Instance.new("TextButton", f)
- exit.BackgroundColor3 = Color3.new(1,0,0)
- exit.BorderColor3 = Color3.new(1,1,1)
- exit.TextColor3 = Color3.new(1,1,1)
- exit.Size = UDim2.new(exitbtnx,0,cap.Size.Y.Scale,0)
- exit.Position = UDim2.new(1-exitbtnx,0,0,0)
- exit.FontSize = "Size18"
- exit.Modal = ismodal
- exit.Font = mainfont
- exit.Text = "X"
- exit.MouseButton1Down:connect(function() main:Remove() end)
- f:TweenSize(UDim2.new(.34,0,.34,0), "Out", "Quad", 0.4, false, nil)
- end
- function CloseApps(par)
- if par:findFirstChild("AppDisplay") then
- par.AppDisplay:TweenSize(UDim2.new(0,0,0,0), "Out", "Quad", 0.2, false, nil)
- wait(0.2)
- par.AppDisplay.Active = false
- par.AppDisplay.Visible = false
- for _,v in pairs(par.AppDisplay:GetChildren()) do
- v:remove()
- end
- end
- if par:findFirstChild("BGDisplay") then
- par.BGDisplay.Visible = true
- par.BGDisplay.Active = true
- end
- appopened = false
- currentApp.Value = ""
- if keydown_con ~= nil then
- keydown_con:disconnect()
- keydown_con = nil
- end
- if keyup_con ~= nil then
- keyup_con:disconnect()
- keyup_con = nil
- end
- if processing_con ~= nil then
- processing_con:disconnect()
- processing_con = nil
- end
- end
- function CreateApp(par, appname, imageid, mbspace, mousedown)
- if not par:findFirstChild("BGDisplay") then return end
- if not par:findFirstChild("AppDisplay") then return end
- if not par:findFirstChild("TopBanner") then return end
- if ((usedmbspace+mbspace) > totalmbspace) then return end
- if ((usedmbspace+mbspace) < totalmbspace) then
- usedmbspace = usedmbspace + mbspace
- end
- totalApps=totalApps+1
- columns=columns+1
- table.insert(appnames, appname)
- if columns > 3 then rows=rows+1 columns=1 end
- local ibtn = Instance.new("ImageButton", par.BGDisplay)
- ibtn.Size = UDim2.new(.16,0,.16,0)
- ibtn.Position = UDim2.new((columns*(ibtn.Size.X.Scale+.1))-.2,0,rows*(ibtn.Size.Y.Scale+.1)-.2,0)
- ibtn.ZIndex = 2
- ibtn.Image = "http://www.roblox.com/asset/?id=" ..imageid
- local title = Instance.new("TextLabel", par.BGDisplay)
- title.Size = UDim2.new(.1,0,.07,0)
- title.Position = ibtn.Position + UDim2.new(0.03,0,ibtn.Size.Y.Scale,0)
- title.BackgroundTransparency = 1
- title.TextColor3 = Color3.new(1,1,1)
- title.FontSize = "Size36"
- title.Font = mainfont
- title.Text = string.sub(appname,1,7).. "..."
- ibtn.MouseButton1Down:connect(function()
- tempHL(ibtn)
- appopened = true
- currentApp.Value = appname
- par.BGDisplay.Visible = false
- par.BGDisplay.Active = false
- par.AppDisplay.Visible = true
- par.AppDisplay.Active = true
- par.AppDisplay:TweenSize(UDim2.new(1,0,.88-par.TopBanner.Size.Y.Scale,0), "Out", "Quad", 0.5, false, nil)
- xpcall(mousedown, function(Error)
- alert(par, "Error: " ..Error, 2)
- CloseApps(par)
- end)
- end)
- end
- function TabletBegin()
- TabletBegun = true
- local main = Instance.new("SurfaceGui", handle)
- main.Name = "TabletInterface"
- main.Face = "Back"
- alert(main, "Hello " ..Username, 1)
- --[[ this frame contains all background things; all data on the home screen ]]
- local bgdisplay = Instance.new("Frame", main)
- bgdisplay.Position = UDim2.new(0,0,0,0)
- bgdisplay.BackgroundTransparency = 1
- bgdisplay.Size = UDim2.new(1,0,1,0)
- bgdisplay.Name = "BGDisplay"
- bgdisplay.Visible = true
- bgdisplay.Active = true
- local background = Instance.new("ImageLabel", main)
- background.Image = "http://www.roblox.com/asset/?id=" ..bg_image_id
- background.Size = UDim2.new(1,0,1,0)
- background.BackgroundTransparency = .3
- background.ZIndex = 0
- local TopBanner = Instance.new("TextLabel",main)
- TopBanner.BackgroundColor3 = Color3.new(0,0,0)
- TopBanner.TextColor3 = Color3.new(1,1,1)
- TopBanner.Size = UDim2.new(1,0,0.062,0)
- TopBanner.FontSize = "Size36"
- TopBanner.Font = mainfont
- TopBanner.ZIndex = 10
- TopBanner.Name = "TopBanner"
- --[[ this is the frame containing all data to do with apps ]]
- local appdisplay = Instance.new("Frame", main)
- appdisplay.BackgroundColor3 = Color3.new(0,0,0)
- appdisplay.Position = UDim2.new(0,0,TopBanner.Size.Y.Scale,0)
- appdisplay.BackgroundTransparency = 0
- appdisplay.Size = UDim2.new(0,0,0,0)
- appdisplay.Name = "AppDisplay"
- appdisplay.Visible = false
- appdisplay.Active = false
- appdisplay.ZIndex = 1
- local btnhome = Instance.new("TextButton", main)
- btnhome.Modal = ismodal
- btnhome.BorderColor3 = Color3.new(178,178,178)
- btnhome.Size = UDim2.new(0.2,0,0.1,0)
- btnhome.Position = UDim2.new(0.5-btnhome.Size.X.Scale/2,0,1-btnhome.Size.Y.Scale,0)
- btnhome.BackgroundColor3 = Color3.new(0,0,0)
- btnhome.TextColor3 = Color3.new(1,1,1)
- btnhome.Style = "RobloxButton"
- btnhome.Font = mainfont
- btnhome.Text = "Home"
- btnhome.FontSize = "Size36"
- btnhome.ZIndex = 10
- btnhome.MouseButton1Down:connect(function() tempHL(btnhome) CloseApps(main) end)
- local function apps_settings()
- local ndata = 0
- local function addtab(txt, value, mousedown)
- ndata = ndata + 1
- local tab = Instance.new("TextButton", appdisplay)
- tab.Modal = ismodal
- tab.BackgroundColor3 = Color3.new(0,0,0)
- tab.BorderColor3 = Color3.new(1,1,1)
- tab.TextColor3 = Color3.new(1,1,1)
- tab.Size = UDim2.new(.5,0,.075,0)
- tab.Position = UDim2.new(0,0,((ndata*tab.Size.Y.Scale)-tab.Size.Y.Scale),0)
- tab.ZIndex = 8
- tab.FontSize = "Size36"
- tab.Font = mainfont
- tab.Text = txt
- local tab2 = tab:Clone()
- tab2.Parent = appdisplay
- tab2.Position = tab.Position + UDim2.new(tab.Size.X.Scale,0,0,0)
- tab2.Text = value
- if mousedown ~= nil then
- tab2.MouseButton1Down:connect(function()
- tempHL(tab2)
- xpcall(function() mousedown(tab2) end, function(Error)
- alert(main, "Error: " ..Error, 2)
- end)
- end)
- end
- end
- addtab("Version: ", Version, nil)
- addtab("Total Space: ", math.floor(totalmbspace/1000).. "gb; " ..(totalmbspace % 1000).. "mb", nil)
- addtab("Used Space: ", math.floor(usedmbspace/1000).. "gb and " ..(usedmbspace % 1000).. "mb", nil)
- addtab("Font", mainfont, function(fonttab)
- listprompt(main, "Select font:", fonttypes, function(input, index)
- mainfont = input
- fonttab.Text = mainfont
- end)
- end)
- addtab("Tablet color", tostring(handle.BrickColor), function(colortab)
- listprompt(main, "Select color:", brickcolors, function(input, index)
- handle.BrickColor=BrickColor.new(input)
- colortab.Text = input
- end)
- end)
- addtab("Background", bg_image_name, function(bgtab)
- listprompt(main, "Select color:", backgroundnames, function(input, index)
- bg_image_id = backgroundids[index]
- bg_image_name = input
- bgtab.Text = input
- background.Image = "http://www.roblox.com/asset/?id=" ..bg_image_id
- end)
- end)
- addtab("Username: ", Username, function(nametab)
- local h = User.Character:findFirstChild("Head")
- local fakeheadmodel = User.Character:findFirstChild("FAKEHEAD")
- if h ~= nil and fakeheadmodel == nil then
- fakeheadmodel = Instance.new("Model", User.Character)
- fakeheadmodel.Name = "FAKEHEAD"
- local title = Instance.new("Model", fakeheadmodel)
- title.Name = Username
- charname = title
- local fakehead = h:Clone()
- fakehead.Parent = title
- local w = Instance.new("Weld", h)
- w.Part0 = h
- w.Part1 = fakehead
- h.Transparency = 0
- Instance.new("Humanoid", title).MaxHealth = 0
- end
- if fakeheadmodel ~= nil then
- local title = fakeheadmodel:GetChildren()[1]
- prompt(main, "Enter name: ", Username, function(value) title.Name=value nametab.Text=value end)
- end
- end)
- end
- local function apps_calculator()
- local result = Instance.new("TextLabel", appdisplay)
- result.BackgroundColor3 = Color3.new(210,210,210)
- result.BorderColor3 = Color3.new(178,178,178)
- result.Position = UDim2.new(0.1,0,0.1,0)
- result.Size = UDim2.new(0.8,0,0.1,0)
- result.FontSize = "Size36"
- result.ZIndex = (appdisplay.ZIndex+1)
- result.Font = mainfont
- result.Text = ""
- local _rows = 1
- local _columns = 0
- local operator = ""
- local function addButton(txt, mousedown)
- _columns = _columns + 1
- if _columns > 4 then _columns=1 _rows=_rows+1 end
- local btn = Instance.new("TextButton", appdisplay)
- btn.Modal = ismodal
- btn.Position = UDim2.new(0.1+(_columns*0.1),0,0.1+(_rows*0.1),0)
- btn.TextColor3 = Color3.new(1,1,1)
- btn.Size = UDim2.new(0.1,0,0.1,0)
- btn.ZIndex = (appdisplay.ZIndex+1)
- btn.Style = "RobloxButton"
- btn.FontSize = "Size36"
- btn.Font = mainfont
- btn.Text = txt
- btn.MouseButton1Down:connect(function()
- tempHL(btn)
- xpcall(function() mousedown(btn) end, function(Error)
- alert(main, "Error: " ..Error, 2)
- end)
- end)
- end
- addButton("0", function(b) result.Text=result.Text.. "" ..b.Text end)
- addButton("1", function(b) result.Text=result.Text.. "" ..b.Text end)
- addButton("2", function(b) result.Text=result.Text.. "" ..b.Text end)
- addButton("3", function(b) result.Text=result.Text.. "" ..b.Text end)
- addButton("4", function(b) result.Text=result.Text.. "" ..b.Text end)
- addButton("5", function(b) result.Text=result.Text.. "" ..b.Text end)
- addButton("6", function(b) result.Text=result.Text.. "" ..b.Text end)
- addButton("7", function(b) result.Text=result.Text.. "" ..b.Text end)
- addButton("8", function(b) result.Text=result.Text.. "" ..b.Text end)
- addButton("9", function(b) result.Text=result.Text.. "" ..b.Text end)
- addButton(".", function(b) result.Text=result.Text.. "" ..b.Text end)
- addButton("+", function(b)
- if not string.match(result.Text, "+") then
- result.Text=result.Text.. "" ..b.Text
- operator = b.Text
- end
- end)
- addButton("-", function(b)
- if not string.match(result.Text, "-") then
- result.Text=result.Text.. "" ..b.Text
- operator = b.Text
- end
- end)
- addButton("*", function(b)
- if not string.match(result.Text, "*") then
- result.Text=result.Text.. "" ..b.Text
- operator = b.Text
- end
- end)
- addButton("/", function(b)
- if not string.match(result.Text, "/") then
- result.Text=result.Text.. "" ..b.Text
- operator = b.Text
- end
- end)
- addButton("C", function(b) result.Text="" operator="" end)
- addButton("=", function(b)
- local segments = str_explode(operator, result.Text)
- if #segments == 2 then
- local first = segments[1]
- local second = segments[2]
- if isnumber(first) and isnumber(second) then
- if operator == "+" then
- result.Text = (first + second)
- elseif operator == "-" then
- result.Text = (first - second)
- elseif operator == "*" then
- result.Text = (first * second)
- elseif operator == "/" then
- result.Text = (first / second)
- end
- else
- alert(main, "Error", .8)
- end
- else
- alert(main, "Error", .8)
- end
- end)
- end
- local function apps_bloxx()
- local UserMouse = nil
- if not ontablet then
- if not User:GetMouse() then return end
- UserMouse = User:GetMouse()
- end
- alert(main, "Use J K and L to move", 2)
- --[[ special tiles are in 100's ]]
- local T = 100 --[[ Treasure chest ]]
- local K = 101 --[[ Key ]]
- local D = 102 --[[ Door ]]
- --[[ animate objects in 200's ]]
- local G = 200 --[[ Goomba ]]
- local map1 = {{1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
- {1,T,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,G,0,1,1,1,0,0,0,0,0,1},
- {1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,2,2,2,2,2,0,0,0,2,2,0,0,0,1},
- {1,0,0,0,0,2,2,0,0,0,1,0,0,0,2,T,0,0,0,0,0,0,0,0,0,2,2,0,1},
- {1,0,0,0,2,T,0,0,2,0,0,0,0,2,T,K,0,0,0,0,0,0,G,0,0,0,0,0,D},
- {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}}
- local playerWalkForward = {"34311544","34311604","34311544","34311604","34311544"}
- local playerWalkBackward = {"34311571","34311625","34311571","34311625","34311571"}
- local tiletypes = Instance.new("Model", appdisplay)
- tiletypes.Name = "Tiles"
- local tiles,enemies = {},{}
- local platforming = true
- local tilexsize = 0.2
- local tileysize = 0.15
- local points = 0
- local holdingKey = false
- local mleft = Instance.new("TextButton", appdisplay)
- mleft.Modal = ismodal
- mleft.BackgroundColor3 = Color3.new(0,0,0)
- mleft.BorderColor3 = Color3.new(1,1,1)
- mleft.TextColor3 = Color3.new(1,1,1)
- mleft.Size = UDim2.new(.14,0,1,0)
- mleft.FontSize = "Size24"
- mleft.Font = mainfont
- mleft.ZIndex = 10
- mleft.Text = "<"
- local mright = mleft:Clone()
- mright.Parent = appdisplay
- mright.Text = ">"
- mright.Position = UDim2.new(1-mleft.Size.X.Scale,0,0,0)
- local world = Instance.new("Frame", appdisplay)
- world.Position = UDim2.new(mleft.Size.X.Scale,0,0,0)
- world.Size = UDim2.new(1-(mleft.Size.X.Scale*2),0,1,0)
- world.BackgroundTransparency = 1
- world.BorderColor3 = Color3.new(1,1,1)
- world.Name = "World"
- world.ZIndex = 4
- local BaseTile = Instance.new("ImageLabel")
- BaseTile.Size = UDim2.new(tilexsize,0,tileysize,0)
- BaseTile.Image = ""
- BaseTile.ZIndex = 5
- --[[ 0 = sky(nothing) ]]
- local Tile0 = BaseTile:Clone()
- Tile0.Parent = tiletypes
- Tile0.BackgroundColor3 = Color3.new(.3,.7,.9)
- Tile0.Name = "Tile0"
- --[[ 1 = black brick tile (collidable) ]]
- local Tile1 = BaseTile:Clone()
- Tile1.Parent = tiletypes
- Tile1.BackgroundColor3 = Color3.new(0,0,0)
- Tile1.Image = "http://www.roblox.com/asset/?id=80629180"
- Tile1.Name = "Tile1"
- --[[ 2 = grass tile (collidable) ]]
- local Tile2 = BaseTile:Clone()
- Tile2.Parent = tiletypes
- Tile2.BackgroundColor3 = Color3.new(0,1,0)
- Tile2.Image = "http://www.roblox.com/asset/?id=50975701"
- Tile2.Name = "Tile2"
- --[[ T = treasure tile ]]
- local TileT = BaseTile:Clone()
- TileT.Parent = tiletypes
- TileT.BackgroundColor3 = Tile0.BackgroundColor3
- TileT.Image = "http://www.roblox.com/asset/?id=25620639"
- TileT.Name = "Tile" ..T
- --[[ K = Key tile ]]
- local TileK = BaseTile:Clone()
- TileK.Parent = tiletypes
- TileK.BackgroundColor3 = Tile0.BackgroundColor3
- TileK.Image = "http://www.roblox.com/asset/?id=125195003"
- TileK.Name = "Tile" ..K
- local TileD = BaseTile:Clone()
- TileD.Parent = tiletypes
- TileD.Image = "http://www.roblox.com/asset/?id=75583051"
- TileD.Name = "Tile" ..D
- --[[ G = goomba tile ]]
- local TileG = BaseTile:Clone()
- TileG.Parent = tiletypes
- TileG.BackgroundColor3 = Tile0.BackgroundColor3
- TileG.Image = "http://www.roblox.com/asset/?id=42952007"
- TileG.Name = "Tile" ..G
- local gdir=Instance.new("StringValue", TileG)
- gdir.Name = "Direction"
- gdir.Value = "Left"
- local gsteps=Instance.new("IntValue", TileG)
- gsteps.Name = "Steps"
- gsteps.Value = 0
- local btnjump = Instance.new("TextButton", appdisplay)
- btnjump.Modal = ismodal
- btnjump.Size = UDim2.new(.5-mleft.Size.X.Scale,0,.08,0)
- btnjump.Position = UDim2.new(mleft.Size.X.Scale,0,1-btnjump.Size.Y.Scale,0)
- btnjump.BackgroundColor3 = Color3.new(0,0,0)
- btnjump.BorderColor3 = Color3.new(1,1,1)
- btnjump.TextColor3 = Color3.new(1,1,1)
- btnjump.FontSize = "Size36"
- btnjump.Font = mainfont
- btnjump.ZIndex = mleft.ZIndex
- btnjump.Text = "^"
- local txtpoints = Instance.new("TextLabel", appdisplay)
- txtpoints.Size = btnjump.Size
- txtpoints.BackgroundColor3 = Color3.new(0,0,0)
- txtpoints.BorderColor3 = Color3.new(1,1,1)
- txtpoints.TextColor3 = Color3.new(1,1,1)
- txtpoints.Position = btnjump.Position + UDim2.new(btnjump.Size.X.Scale,0,0,0)
- txtpoints.FontSize = "Size36"
- txtpoints.Font = mainfont
- txtpoints.ZIndex = mleft.ZIndex
- local charVelocityX,charVelocityY,walkCounter = 0,0,0
- local charxtile,charytile = 3,5
- local charspeed = .02
- local jumpheight = .05
- local gravity = .004
- local vmaxfall = .06
- local facing = "right"
- local movingleft = false
- local movingright = false
- local function buildMap(map)
- for y = 1,#map do
- for x = 1,#map[1] do
- local tile = tiletypes:findFirstChild("Tile" ..map[y][x])
- if tile ~= nil then
- local newtile = tile:Clone()
- newtile.Position = UDim2.new((x*tilexsize)-tilexsize,0,(y*tileysize)-tilexsize,0)
- newtile.Parent = world
- newtile.Name = "tile" ..map[y][x].. "_y" ..y.. "_x" ..x
- table.insert(tiles, newtile)
- if map[y][x] >= T then
- local fill = Tile0:Clone()
- fill.Parent = world
- fill.Name = "fill" ..map[y][x].. "_y" ..y.. "_x" ..x
- fill.Position = newtile.Position
- table.insert(tiles, fill)
- end
- end
- end
- end
- end
- buildMap(map1)
- local char = Instance.new("ImageLabel", world)
- char.Size = UDim2.new(.17,0,.15,0)
- --[[char.Position = UDim2.new(.5-(char.Size.X.Scale/2),0,1-char.Size.Y.Scale,0)]]
- char.Position = UDim2.new((charxtile*tilexsize)-tilexsize,0,(charytile*tileysize)-tileysize-(tileysize/3),0)
- char.Image = "http://www.roblox.com/asset/?id=" ..playerWalkForward[1]
- char.BackgroundTransparency = 1
- char.ZIndex = 9
- local function Touching(g1,g2)
- local col,p1,p2 = "",g1.Position,g2.Position
- --[[ downward edge ]]
- if p1.Y.Scale < p2.Y.Scale + g2.Size.Y.Scale and p1.Y.Scale > p2.Y.Scale - (g2.Size.Y.Scale/2) and (p1.X.Scale+1) < p2.X.Scale + g2.Size.X.Scale and p1.X.Scale + g1.Size.X.Scale > (p2.X.Scale-1) then
- col = "down"
- end
- --[[ character below top side and above mid point (upward edge) ]]
- if p1.Y.Scale + g1.Size.Y.Scale > p2.Y.Scale and p1.Y.Scale + g1.Size.Y.Scale < p2.Y.Scale + (g2.Size.Y.Scale/2) and (p1.X.Scale+1) < p2.X.Scale + g2.Size.X.Scale and p1.X.Scale + g1.Size.X.Scale > (p2.X.Scale-1) then
- col = "up"
- end
- --[[ left edge ]]
- if p1.X.Scale + g1.Size.X.Scale > p2.X.Scale and p1.X.Scale + g1.Size.X.Scale < p2.X.Scale + (g2.Size.X.Scale/2) and (p1.Y.Scale+1) < p2.Y.Scale + g2.Size.Y.Scale and p1.Y.Scale + g1.Size.Y.Scale > (p2.Y.Scale-1) then
- col = "left"
- end
- --[[ right edge ]]
- if p1.X.Scale < p2.X.Scale + g2.Size.X.Scale and p1.X.Scale > p2.X.Scale + (g2.Size.X.Scale/2) and (p1.Y.Scale+1) < p2.Y.Scale + g2.Size.Y.Scale and p1.Y.Scale + g1.Size.Y.Scale > (p2.Y.Scale-1) then
- col = "right"
- end
- return col
- end
- local function getTiles(tiletype)
- local found = {}
- for _,v in pairs(tiles) do
- if string.find(v.Name, "tile" ..tostring(tiletype).. "_") then
- table.insert(found, v)
- end
- end
- return found
- end
- local function isTile(v, ntile)
- if string.find(v.Name, "tile" ..tostring(ntile).. "_") then
- return true
- else
- return false
- end
- end
- local function walkAnimation(forward)
- walkCounter = walkCounter + 1
- if walkCounter > 8 then
- walkCounter = 1
- end
- local playIndex = walkCounter
- if walkCounter == 4 then
- playIndex = 2
- elseif walkCounter == 5 then
- playIndex = 1
- elseif walkCounter == 6 then
- playIndex = 4
- elseif walkCounter == 7 then
- playIndex = 5
- elseif walkCounter == 8 then
- playIndex = 4
- end
- if forward then
- char.Image = "http://www.roblox.com/asset/?id=" ..playerWalkForward[playIndex]
- else
- char.Image = "http://www.roblox.com/asset/?id=" ..playerWalkBackward[playIndex]
- end
- end
- local function stopAnimation()
- if facing == "right" then
- char.Image = "http://www.roblox.com/asset/?id=" ..playerWalkForward[1]
- elseif facing == "left" then
- char.Image = "http://www.roblox.com/asset/?id=" ..playerWalkBackward[1]
- end
- end
- mleft.MouseButton1Down:connect(function()
- facing = "left"
- movingleft = true
- movingright = false
- end)
- mright.MouseButton1Down:connect(function()
- facing = "right"
- movingright = true
- movingleft = false
- end)
- mleft.MouseButton1Up:connect(function()
- if ontablet then
- Delay(.8, function() movingleft=false end)
- else
- movingleft=false
- end
- end)
- mright.MouseButton1Up:connect(function()
- if ontablet then
- Delay(.8, function() movingright=false end)
- else
- movingright=false
- end
- end)
- btnjump.MouseButton1Down:connect(function()
- if platforming == true then
- charVelocityY = -jumpheight
- platforming = false
- end
- end)
- if UserMouse ~= nil then
- keydown_con = UserMouse.KeyDown:connect(function(key)
- key = key:lower()
- if key == "j" then
- movingleft = true
- movingright = false
- facing = "left"
- elseif key == "l" then
- movingright = true
- movingleft = false
- facing = "right"
- end
- if key == "k" and platforming == true then
- charVelocityY = -jumpheight
- platforming = false
- end
- end)
- keyup_con = UserMouse.KeyUp:connect(function(key)
- key = key:lower()
- if key == "j" then
- movingleft = false
- end
- if key == "l" then
- movingright = false
- end
- end)
- end
- function removeTile(tile)
- for i,v in pairs(tiles) do
- if v == tile then
- table.remove(tiles, i)
- tile:Destroy()
- end
- end
- end
- processing_con = game:GetService("RunService").RenderStepped:connect(function()
- if appopened == true then
- txtpoints.Text = "pts: " ..points
- char.Position = char.Position + UDim2.new(charVelocityX,0,charVelocityY,0)
- charxtile = math.ceil(char.Position.X.Scale/tilexsize)
- charytile = math.ceil(char.Position.Y.Scale/tileysize)
- --[[ move screen rather than character ]]
- if (movingleft == true) then
- for _,v in pairs(tiles) do
- v.Position = v.Position + UDim2.new(charspeed,0,0,0)
- end
- walkAnimation(false)
- elseif (movingright == true) then
- for _,v in pairs(tiles) do
- v.Position = v.Position - UDim2.new(charspeed,0,0,0)
- end
- walkAnimation(true)
- else
- stopAnimation()
- end
- for _,v in pairs(getTiles(T)) do
- local c = Touching(char, v)
- if c ~= "" then
- points = points + 100
- removeTile(v)
- end
- end
- for _,v in pairs(getTiles(K)) do
- local c = Touching(char, v)
- if c ~= "" then
- points = points + 25
- holdingKey = true
- removeTile(v)
- end
- end
- for _,v in pairs(getTiles(D)) do
- local c = Touching(char, v)
- if c ~= "" then
- if holdingKey == true then
- removeTile(v)
- holdingKey = false
- alert(main, "You won! Score: " ..points, 2)
- CloseApps(main)
- end
- end
- end
- for _,v in pairs(getTiles(G)) do
- local gd = v:findFirstChild("Direction")
- local gs = v:findFirstChild("Steps")
- local c = Touching(char, v)
- if c == "up" then
- removeTile(v)
- points = points + 100
- return
- end
- if c == "down" then
- char:Destroy()
- alert(main, "Game Over.", 2)
- Delay(1, function() CloseApps(main) end)
- end
- if gd ~= nil and gs ~= nil then
- if gs.Value > 20 then
- gd.Value = "Left"
- elseif gs.Value < -20 then
- gd.Value = "Right"
- end
- if gd.Value == "Left" then
- gs.Value = gs.Value - 1
- elseif gd.Value == "Right" then
- gs.Value = gs.Value + 1
- end
- v.Position = v.Position + UDim2.new(gs.Value*.001,0,0,0)
- end
- end
- local set_up = false
- --[[ add collision detection ]]
- for _,v in pairs(tiles) do
- if (isTile(v, 1) or isTile(v, 2) or isTile(v, D)) then
- local c = Touching(char, v)
- if c == "up" then
- local set_up = true
- charVelocityY = 0
- platforming = true
- char.Position = UDim2.new(char.Position.X.Scale,0,(v.Position.Y.Scale-char.Size.Y.Scale),0)
- elseif c == "down" then
- char.Position = char.Position + UDim2.new(0,0,math.abs(charVelocityY),0)
- elseif c == "left" then
- for _,v in pairs(tiles) do
- v.Position = v.Position + UDim2.new(charspeed,0,0,0)
- end
- elseif c == "right" then
- for _,v in pairs(tiles) do
- v.Position = v.Position - UDim2.new(charspeed,0,0,0)
- end
- end
- end
- end
- --[[ apply gravity to character ]]
- if platforming == false or set_up == false then
- if charVelocityY <= vmaxfall then
- charVelocityY = charVelocityY + gravity
- end
- end
- end
- end)
- end
- local function apps_radar()
- alert(main, "left-click=teleport | right-click=explode", 2)
- --[[ Todo: make a radar that shows circles for all objects, and be able to edit them. ]]
- local radar = Instance.new("ImageLabel", appdisplay)
- radar.Image = "http://www.roblox.com/asset/?id=29051010"
- radar.BackgroundTransparency = 1
- radar.Size = UDim2.new(0,300*2,0,300*2)
- radar.ZIndex = (appdisplay.ZIndex+1)
- local objects = {}
- local range = 300*2
- local radarCenter = Vector2.new(290,285)--[[ Vector2.new(140*2,155*2) ]]
- local function clearobjects()
- for _,v in pairs(objects) do
- v:remove()
- end
- objects = {}
- end
- --[[ circle1: http://www.roblox.com/asset/?id=26182897, circle2: http://www.roblox.com/asset/?id=29712145 ]]
- local function createnode(obj, pos, txt)
- local icon = Instance.new("ImageButton", appdisplay)
- if obj.Parent == User.Character then
- icon.Image = "http://www.roblox.com/asset/?id=29712145"
- else
- icon.Image = "http://www.roblox.com/asset/?id=26182897"
- end
- icon.BackgroundTransparency = 1
- icon.Size = UDim2.new(0,35,0,30)
- icon.Position = UDim2.new(0,pos.x,0,pos.y)
- icon.ZIndex = (radar.ZIndex+1)
- local label = Instance.new("TextLabel", icon)
- label.BackgroundTransparency = 1
- label.TextColor3 = Color3.new(1,1,1)
- label.Size = UDim2.new(0,40,0,20)
- label.ZIndex = (icon.ZIndex+1)
- label.FontSize = "Size18"
- label.Text = tostring(txt)
- label.Font = mainfont
- label.Visible = false
- icon.MouseEnter:connect(function() label.Visible=true end)
- icon.MouseLeave:connect(function() label.Visible=false end)
- icon.MouseButton2Down:connect(function() Instance.new("Explosion",game.Workspace).Position=obj.Position end)
- icon.MouseButton1Down:connect(function()
- local t = User.Character:findFirstChild("Torso")
- if t ~= nil then
- obj.Parent:MoveTo(t.Position+Vector3.new(0,3,0))
- end
- end)
- table.insert(objects, label)
- table.insert(objects, icon)
- end
- local function loadobjects()
- local torso = User.Character:findFirstChild("Torso")
- if torso ~= nil then
- for _,v in pairs(game.Players:GetPlayers()) do
- if v.Character ~= nil then
- local playerTorso = v.Character:findFirstChild("Torso")
- if playerTorso ~= nil and playerTorso ~= torso then
- local posDiff = Vector3.new((torso.Position.x-playerTorso.Position.x),0,(torso.Position.z-playerTorso.Position.z))
- if (posDiff.magnitude < range) then
- -- translate coordinates to radar coordinates
- posDiff = Vector2.new((posDiff.x + range) * 0.5,(posDiff.z + range) * 0.5)
- local rotationVector = c_angle.Value
- local denom = math.abs(rotationVector.x) + math.abs(rotationVector.z)
- local xDirect = -(rotationVector.x/denom)
- local zDirect = -(rotationVector.z/denom)
- local angle = math.atan2(1,0) - math.atan2(zDirect,xDirect)
- local point = Vector2.new(((posDiff.x - radarCenter.x) * math.cos(angle)) - ((posDiff.y - radarCenter.y) * math.sin(angle)) + radarCenter.x,((posDiff.x - radarCenter.x) * math.sin(angle)) + ((posDiff.y - radarCenter.y) * math.cos(angle)) + radarCenter.y)
- createnode(playerTorso, point, playerTorso.Parent)
- end
- else
- createnode(playerTorso, radarCenter, playerTorso.Parent)
- end
- end
- end
- end
- end
- processing_con = game:GetService("RunService").RenderStepped:connect(function()
- clearobjects()
- loadobjects()
- end)
- end
- local function apps_imessage()
- local chats = Instance.new("Frame", appdisplay)
- chats.BackgroundTransparency = 1
- chats.Size = UDim2.new(1,0,0.9,0)
- chats.ZIndex = 5
- chats.Name = "ChatList"
- local btnChoosePlayer = Instance.new("TextButton", appdisplay)
- btnChoosePlayer.Modal = ismodal
- btnChoosePlayer.BackgroundColor3 = Color3.new(0,0,0)
- btnChoosePlayer.BorderColor3 = Color3.new(1,1,1)
- btnChoosePlayer.TextColor3 = Color3.new(1,1,1)
- btnChoosePlayer.Size = UDim2.new(.5,0,.1,0)
- btnChoosePlayer.Position = UDim2.new(0,0,1-btnChoosePlayer.Size.Y.Scale,0)
- btnChoosePlayer.FontSize = "Size36"
- btnChoosePlayer.Text = "Player"
- btnChoosePlayer.Font = mainfont
- local btnReply = btnChoosePlayer:Clone()
- btnReply.Position = UDim2.new(btnChoosePlayer.Size.X.Scale,0,1-btnChoosePlayer.Size.Y.Scale,0)
- btnReply.Parent = appdisplay
- btnReply.Text = "Reply"
- local function sendChat(plr, txt)
- if not plr.Character then return end
- local tab = plr.Character:findFirstChild("Tablet")
- if tab ~= nil then
- local curapp = tab:findFirstChild("CurrentApp")
- local iface = tab:findFirstChild("TabletInterface")
- if iface ~= nil and curapp ~= nil then
- local appdis = iface:findFirstChild("AppDisplay")
- if appdis ~= nil and curapp.Value == "iMessage" then
- local chatlist = appdis:findFirstChild("ChatList")
- if chatlist ~= nil then
- local chat = Instance.new("TextLabel", chatlist)
- chat.BackgroundTransparency = 1
- chat.Size = UDim2.new(1,0,0.2,0)
- chat.Position = UDim2.new(0,0,#chatlist:GetChildren()*chat.Size.Y.Scale,0)
- chat.TextColor3 = Color3.new(1,1,1)
- chat.TextWrapped = true
- chat.FontSize = "Size36"
- chat.ZIndex = (chats.ZIndex+1)
- chat.Font = mainfont
- chat.Text = Username.. ": " ..txt
- Delay(6, function()
- for i = 1,10 do
- chat.TextTransparency = chat.TextTransparency + 0.1
- wait()
- end
- chat:Remove()
- end)
- end
- end
- end
- end
- end
- btnChoosePlayer.MouseButton1Down:connect(function()
- local names = {}
- for _,v in pairs(game.Players:GetChildren()) do
- table.insert(names, v.Name)
- end
- listprompt(main, "Choose player:", names, function(pn, i) btnChoosePlayer.Text=pn end)
- end)
- btnReply.MouseButton1Down:connect(function()
- prompt(main, "Enter message:", "", function(msg)
- local p = game.Players:findFirstChild(btnChoosePlayer.Text)
- if p ~= nil then
- sendChat(p, msg)
- else
- alert(main, "Player does not exist", 2)
- end
- end)
- end)
- end
- local function apps_notes()
- --[[ AppStorage.NotesApp.Contents, .Titles ]]
- --[[ top buttons: +, rename, delete, edit ]]
- local currentNote = 0
- local field = Instance.new("TextButton", appdisplay)
- field.Modal = ismodal
- field.BackgroundColor3 = Color3.new(0,0,0)
- field.BorderColor3 = Color3.new(1,1,1)
- field.TextColor3 = Color3.new(1,1,1)
- field.FontSize = "Size36"
- field.Font = mainfont
- field.Size = UDim2.new(1,0,0.9,0)
- field.Position = UDim2.new(0,0,1-field.Size.Y.Scale,0)
- field.TextYAlignment = "Top"
- field.TextXAlignment = "Left"
- field.TextWrapped = true
- field.Text = ""
- local btnNew = Instance.new("TextButton", appdisplay)
- btnNew.Modal = ismodal
- btnNew.BackgroundColor3 = Color3.new(0,0,0)
- btnNew.BorderColor3 = Color3.new(1,1,1)
- btnNew.TextColor3 = Color3.new(1,1,1)
- btnNew.Size = UDim2.new(.1,0,.1,0)
- btnNew.FontSize = "Size36"
- btnNew.Font = mainfont
- btnNew.Text = "+"
- local btnDelete = btnNew:Clone()
- btnDelete.Parent = appdisplay
- btnDelete.FontSize = "Size24"
- btnDelete.Size = UDim2.new(.3,0,.1,0)
- btnDelete.Text = "Delete"
- btnDelete.Position = UDim2.new(btnNew.Size.X.Scale,0,0,0)
- local btnRename = btnDelete:Clone()
- btnRename.Parent = appdisplay
- btnRename.Text = "Rename"
- btnRename.Position = btnDelete.Position + UDim2.new(btnDelete.Size.X.Scale,0,0,0)
- local btnEdit = btnRename:Clone()
- btnEdit.Parent = appdisplay
- btnEdit.Text = "Edit"
- btnEdit.Position = btnRename.Position + UDim2.new(btnRename.Size.X.Scale,0,0,0)
- local function updateText()
- if #AppStorage.NotesApp.Notes > 0 then
- field.Text = AppStore.NotesApp.Contents[currentNote]
- else
- field.Text = ""
- end
- end
- btnEdit.MouseButton1Down:connect(function()
- listprompt(main, "Select note:", AppStorage.NotesApp.Titles, function(s, i)
- currentNote = i
- updateText()
- end)
- end)
- btnNew.MouseButton1Down:connect(function()
- prompt(main, "Enter title:", "", function(input)
- local n = #AppStorage.NotesApp.Notes
- AppStorage.NotesApp.Titles[n+1] = input
- AppStorage.NotesApp.Contents[n+1] = ""
- currentNote = n+1
- AppStorage.NotesApp.Notes = AppStorage.NotesApp.Notes + 1
- updateText()
- end)
- end)
- btnRename.MouseButton1Down:connect(function()
- listprompt(main, "Select note:", AppStorage.NotesApp.Titles, function(s, i)
- prompt(main, "Enter title:", AppStorage.NotesApp.Titles[i], function(input)
- AppStorage.NotesApp.Titles[i] = input
- end)
- end)
- end)
- btnDelete.MouseButton1Down:connect(function()
- listprompt(main, "Select note:", AppStorage.NotesApp.Titles, function(s, i)
- if currentNote == i then
- if currentNote > 0 then
- currentNote = currentNote - 1
- end
- end
- AppStorage.NotesApp.Notes = AppStorage.NotesApp.Notes - 1
- table.remove(AppStorage.NotesApp.Titles, i)
- table.remove(AppStorage.NotesApp.Contents, i)
- updateText()
- end)
- end)
- field.MouseButton1Down:connect(function()
- prompt(main, "Enter text:", field.Text, function(input)
- field.Text = input
- AppStorage.NotesApp.Contents[currentNote] = input
- end)
- end)
- end
- CreateApp(main, "Settings", "25055218", 10.4, apps_settings)
- CreateApp(main, "Calculator", "45545182", 12.2, apps_calculator)
- CreateApp(main, "Mario Bros.", "34311544", 117.5, apps_bloxx)
- CreateApp(main, "Radar", "149177741", 29.3, apps_radar)
- CreateApp(main, "iMessage", "143345407", 19.8, apps_imessage)
- CreateApp(main, "Notes", "143352101", 17, apps_notes)
- local function onProcessData()
- local minutes = math.floor(game.Workspace.DistributedGameTime / 60)
- local hours = math.floor(minutes / 60)
- local seconds = math.floor(game.Workspace.DistributedGameTime % 60)
- if hours < 10 then hours="0" ..hours end
- if minutes < 10 then minutes="0" ..minutes end
- if seconds < 10 then seconds="0" ..seconds end
- TopBanner.Text = hours.. ":" ..minutes.. ":" ..seconds
- local t = User.Character:findFirstChild("Torso")
- if TabletBegun == true and t ~= nil then
- local curcam = game.Workspace.CurrentCamera
- if (curcam ~= nil) then
- c_angle.Value = curcam.CoordinateFrame.lookVector
- --[[curcam.CoordinateFrame = t.CFrame*CFrame.new(0,1.2,5)*CFrame.Angles(xangle,0,0)]]
- end
- if surfing == false then
- handle.CFrame = t.CFrame*CFrame.new(0,1.2,-5)*CFrame.Angles(-xangle,0,0)
- else
- local btn = User.Character:findFirstChild("Toggle")
- if btn ~= nil then
- btn.CFrame=handle.CFrame+Vector3.new(((handle.Size.X/2)-btn.Size.X),(handle.Size.Y/2),-2.5)
- btn.CFrame=btn.CFrame*CFrame.Angles(-xangle,0,0)
- end
- end
- end
- end
- --[[game:GetService("RunService").RenderStepped:connect(onProcessData)]]
- while TabletBegun do wait() onProcessData() end
- end
- function onButton1Down(mouse)
- if btnDown_tabletbegin == nil then return end
- mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
- btnDown_tabletbegin:disconnect()
- btnDown_tabletbegin = nil
- wait(0.5)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- handle.Parent = User.Character
- handle.Size = Vector3.new(4,8,0.2)
- handle.Name = "Tablet"
- handle.Anchored = true
- ipad.TextureId = ""
- ipad.Scale = Vector3.new(3.8,5.4,1.4)
- Instance.new("PointLight", handle)
- local btn = Instance.new("Part", User.Character)
- btn.BrickColor = BrickColor.new("Really black")
- btn.Size = Vector3.new(1,1,0)
- btn.Name = "Toggle"
- btn.Anchored = true
- btn.CanCollide = false
- btn.Locked = true
- local btnmesh = Instance.new("BlockMesh", btn)
- btnmesh.Scale = Vector3.new(1.25,0.25,0.25)
- local cd = Instance.new("ClickDetector", btn)
- cd.MouseClick:connect(function(player)
- if player == User then
- if surfing == false then
- surfing = true
- else
- surfing = false
- end
- end
- end)
- Tool:remove()
- TabletBegin()
- end
- function onEquipped(mouse)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- --[[if game.Workspace.Camera ~= nil then
- game.Workspace.Camera.CameraType = "Scriptable"
- end]]
- btnDown_tabletbegin = mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- end
- function onUnequipped()
- --[[if game.Workspace.Camera ~= nil then
- game.Workspace.Camera.CameraType = oldcam
- end]]
- end
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
Advertisement
Add Comment
Please, Sign In to add comment