Advertisement
bobopopcornboy

screen 2.0

Sep 8th, 2024 (edited)
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.97 KB | None | 0 0
  1. --wait(0.2)
  2. --owner = game.Players.LocalPlayer
  3.  
  4. --<config>
  5. follow = true
  6. appsSize = Vector2.new(50,50)
  7. --</config>
  8.  
  9. Char = owner.Character.HumanoidRootPart
  10. screen = Instance.new("Part")
  11. screen.Size = Vector3.new(16, 12, 1)
  12. screen.Transparency = 1
  13. screen.Parent = workspace
  14. screen.Anchored = true
  15. screen.CanCollide = false
  16. event = workspace.Screen2Server.event
  17.  
  18. game["Run Service"].Heartbeat:Connect(function()
  19. if follow then
  20. screen.CFrame = Char.CFrame * CFrame.new(0,Char.OriginalSize.Value.Y + 3.5,-9)
  21. screen.Rotation = screen.Rotation + Vector3.new(0,180,0)
  22. end
  23. end)
  24.  
  25.  
  26. screenGui = Instance.new("SurfaceGui")
  27. screenGui.Adornee = screen
  28. screenGui.Parent = owner.PlayerGui
  29. screenGui.ClipsDescendants = true
  30. apps = Instance.new("Frame")
  31. apps.Parent = screenGui
  32. apps.Transparency = 1
  33. apps.ZIndex = 1
  34. apps.Size = UDim2.new(1,0,1,0)
  35. uigrid = Instance.new("UIGridLayout")
  36. uigrid.Parent = apps
  37. uigrid.CellSize = UDim2.new(0,appsSize.X,0,appsSize.Y)
  38. uigrid.CellPadding = UDim2.new(0,5,0,5)
  39. uigrid.HorizontalAlignment = Enum.HorizontalAlignment.Left
  40. uigrid.SortOrder = Enum.SortOrder.LayoutOrder
  41. uigrid.VerticalAlignment = Enum.VerticalAlignment.Top
  42. background = Instance.new("ImageLabel")
  43. background.Parent = screenGui
  44. background.Image = "http://www.roblox.com/asset/?id=15429308220"
  45. background.Size = UDim2.new(1,0,1,0)
  46. background.ZIndex = -99
  47. mo = Instance.new("ImageLabel")
  48. mo.Size = UDim2.new(0, 100, 0, 100)
  49. mo.Parent = screenGui
  50. mo.AnchorPoint = Vector2.new(0.5,0.5)
  51. mo.Image = "http://www.roblsx.com/asset/?id=10582909971"
  52. mo.BackgroundTransparency = 1
  53. mostate = 0
  54. mo.ZIndex = 90
  55. mouse = owner:GetMouse()
  56. AppData = Instance.new("Folder")
  57. AppData.Parent = screenGui
  58. AppData.Name = "AppData"
  59. UIS = game:GetService("UserInputService")
  60. MouseDefult = "http://www.roblsx.com/asset/?id=10582909971"
  61.  
  62. WindowMouse = Vector2.new(0,0)
  63. mouse.Move:Connect(function()
  64. if mouse.Target == screenGui.Adornee then
  65. local hit = mouse.Hit.Position
  66. local GuiParentPart = screenGui.Adornee
  67. local gc = GuiParentPart.CFrame
  68. local objectSpaceHit = gc:pointToObjectSpace(hit)
  69. local topLeftObjectSpace = Vector3.new(-GuiParentPart.Size.X / 2, GuiParentPart.Size.Y / 2, -GuiParentPart.Size.Z / 2)
  70. local mouseDistanceFromTopLeft = objectSpaceHit - topLeftObjectSpace
  71. local RelativeLocation = Vector2.new(
  72. math.abs(mouseDistanceFromTopLeft.X) * screenGui.PixelsPerStud,
  73. math.abs(mouseDistanceFromTopLeft.Y) * screenGui.PixelsPerStud
  74. )
  75. RelativeLocation = Vector2.new(0 - RelativeLocation.X + screenGui.CanvasSize.X,RelativeLocation.Y)
  76. local mx,my = RelativeLocation.X,RelativeLocation.Y
  77. WindowMouse = RelativeLocation
  78. mo.Position = UDim2.new(0,mx,0,my)
  79. UIS.MouseIconEnabled = false
  80. else
  81. UIS.MouseIconEnabled = true
  82. end
  83. end)
  84. --winodws bar
  85. bar = Instance.new("Frame")
  86. bar.Parent = screenGui
  87. bar.Size = UDim2.new(1,0,0,40)
  88. bar.BackgroundColor3 = Color3.new(0.541176, 0.541176, 0.541176)
  89. bar.ZIndex = 88
  90. bar.Position = UDim2.new(0,0,1,-40)
  91. uilist = Instance.new("UIListLayout")
  92. uilist.Parent = bar
  93. uilist.FillDirection = Enum.FillDirection.Horizontal
  94. windowsB = Instance.new("ImageButton")
  95. windowsB.Parent = bar
  96. windowsB.Size = UDim2.new(0,40,0,40)
  97. windowsB.ZIndex = 89
  98. windowsB.Image = "http://www.roblox.com/asset/?id=3400271144"
  99.  
  100. windowsList = Instance.new("Frame")
  101. windowsList.Size = UDim2.new(0,150,0,200)
  102. windowsList.Parent = screenGui
  103. windowsList.AnchorPoint = Vector2.new(0,1)
  104. windowsList.Position = UDim2.new(0,0,1,-40)
  105. windowsList.Visible = false
  106. windowsList.ZIndex = 87
  107. uigL = Instance.new("UIGridLayout")
  108. uigL.CellSize = UDim2.new(0.48,0,0,19)
  109. uigL.Parent = windowsList
  110. uigL.FillDirection = Enum.FillDirection.Horizontal
  111. uigL.HorizontalAlignment = Enum.HorizontalAlignment.Left
  112. uigL.SortOrder = Enum.SortOrder.Name
  113. uigL.VerticalAlignment = Enum.VerticalAlignment.Top
  114.  
  115. followL = Instance.new("TextLabel")
  116. followL.Parent = windowsList
  117. followL.Text = "Follow"
  118. followL.Name = "1_1"
  119. followL.ZIndex = 87
  120. followB = Instance.new("ImageButton")
  121. followB.Parent = windowsList
  122. followB.Name = "1_2"
  123. followB.Image = "http://www.roblox.com/asset/?id=5533192672"
  124. followB.ZIndex = 87
  125.  
  126. followB.MouseButton1Click:Connect(function()
  127. if follow then
  128. followB.Image = "http://www.roblox.com/asset/?id=5533209494"
  129. follow = false
  130. else
  131. followB.Image = "http://www.roblox.com/asset/?id=5533192672"
  132. follow = true
  133. end
  134. end)
  135.  
  136. windowsB.MouseButton1Click:Connect(function()
  137. windowsList.Visible = not windowsList.Visible
  138. end)
  139.  
  140. --window
  141. function newWindow(title,icon,size)
  142. local window = Instance.new("Frame")
  143. window.Parent = screenGui
  144. window.Position = UDim2.new(0, 100, 0, 0)
  145. window.Size = UDim2.new(0,size.X,0,size.Y)
  146. local moveB = Instance.new("TextButton")
  147. moveB.Parent = window
  148. moveB.Size = UDim2.new(1,0,0,20)
  149. moveB.Text = ""
  150. moveB.BackgroundColor3 = Color3.new(0.541176, 0.541176, 0.541176)
  151. local label = Instance.new("TextLabel")
  152. label.Text = title
  153. label.Parent = moveB
  154. label.Position = UDim2.new(0,15,0,0)
  155. label.Interactable = false
  156. label.Size = UDim2.new(0,4,1,0)
  157. label.BackgroundTransparency = 1
  158. label.TextXAlignment = "Left"
  159. local iconL = Instance.new("ImageLabel")
  160. iconL.Image = icon
  161. iconL.Size = UDim2.new(0,10,0,10)
  162. iconL.Parent = moveB
  163. iconL.Position = UDim2.new(0,2.5,0,2.5)
  164. local Frame = Instance.new("Frame")
  165. Frame.Size = UDim2.new(1,0,1,-20)
  166. Frame.Parent = window
  167. Frame.Position = UDim2.new(0,0,0,15)
  168. local ReSize = Instance.new("ImageButton")
  169. ReSize.Parent = window
  170. ReSize.Image = "http://www.roblox.com/asset/?id=6152529948"
  171. ReSize.Size = UDim2.new(0,25,0,25)
  172. ReSize.Position = UDim2.new(1,0,1,0)
  173. ReSize.BorderSizePixel = 0
  174. local si = false
  175. local ta = Instance.new("TextLabel")
  176. ta.Parent = bar
  177. ta.Size = UDim2.new(0,100,1,0)
  178. ta.ZIndex = 89
  179. ta.Text = title
  180. local close = Instance.new("ImageButton")
  181. close.Parent = moveB
  182. close.Size = UDim2.new(0,13,0,13)
  183. close.Position = UDim2.new(1,-14,0,0)
  184. close.Image = "http://www.roblox.com/asset/?id=1249929622"
  185. close.BackgroundTransparency = 1
  186.  
  187.  
  188. local mx,my = mouse.X,mouse.Y
  189. local sx,sy = 0,0
  190.  
  191. local Mouse = mouse
  192.  
  193. close.MouseButton1Click:Connect(function()
  194. window:Destroy()
  195. ta:Destroy()
  196. end)
  197.  
  198. moveB.MouseButton1Down:Connect(function()
  199. si = false
  200. mx,my = WindowMouse.X,WindowMouse.Y
  201. local dxy = window.Position
  202. local dx,dy = dxy.X.Offset,dxy.Y.Offset
  203. sx,sy = dx - mx,dy - my
  204. mostate = 1
  205. mo.Image = "http://www.roblox.com/asset/?id=12057590448"
  206. end)
  207. moveB.MouseButton1Up:Connect(function()
  208. sx,sy = 0,0
  209. mostate = 0
  210. mo.Image = "http://www.roblox.com/asset/?id=12057597405"
  211. end)
  212. mouse.Button1Up:Connect(function()
  213. sx,sy = 0,0
  214. mostate = 0
  215. end)
  216. moveB.MouseEnter:Connect(function()
  217. if mostate == 0 then
  218. mo.Image = "http://www.roblox.com/asset/?id=12057597405"
  219. else
  220. mo.Image = "http://www.roblox.com/asset/?id=12057590448"
  221. end
  222. end)
  223. moveB.MouseLeave:Connect(function()
  224. if mostate == 0 then
  225. mo.Image = "http://www.roblsx.com/asset/?id=10582909971"
  226. end
  227. end)
  228. mouse.Move:Connect(function()
  229. if mouse.Target == screenGui.Adornee then
  230. mx,my = WindowMouse.X,WindowMouse.Y
  231. mo.Position = UDim2.new(0,mx,0,my)
  232. if not si then
  233. mouse.Icon = "http://www.roblox.com/asset/?id=2317070865"
  234. if sx ~= 0 then
  235. window.Position = UDim2.new(0,sx + mx,0,sy + my)
  236. end
  237. else
  238. window.Size = UDim2.new(0,sx + mx,0,sy + my)
  239. end
  240. else
  241. mouse.Icon = "defult"
  242. end
  243. end)
  244. ReSize.MouseButton1Down:Connect(function()
  245. mx,my = WindowMouse.X,WindowMouse.Y
  246. local dxy = window.Size
  247. local dx,dy = dxy.X.Offset,dxy.Y.Offset
  248. sx,sy = dx - mx,dy - my
  249. mostate = 2
  250. mo.Image = "http://www.roblox.com/asset/?id=12057590448"
  251. si = true
  252. end)
  253. ReSize.MouseButton1Up:Connect(function()
  254. sx,sy = 0,0
  255. mostate = 0
  256. mo.Image = "http://www.roblsx.com/asset/?id=10582909971"
  257. si = false
  258. end)
  259.  
  260. return Frame
  261. end
  262. --defult apps
  263. function newApp(image,name,code,arg1,arg2,arg3)
  264. local app = Instance.new("ImageButton")
  265. app.Parent = apps
  266. app.Image = image
  267. app.Size = UDim2.new(0,appsSize.X,0,appsSize.Y)
  268. app.BackgroundTransparency = 1
  269. local label = Instance.new("TextLabel")
  270. label.Size = UDim2.new(1,0,0,appsSize.Y*0.2)
  271. label.Parent = app
  272. label.Text = name
  273. label.TextScaled = true
  274. label.Position = UDim2.new(0,0,1,0)
  275. local data = Instance.new("Folder")
  276. data.Parent = AppData
  277.  
  278. app.MouseButton1Click:Connect(function()
  279. code(data,arg1,arg2,arg3)
  280. end)
  281. return data
  282. end
  283. function openScript_App(data)
  284. local gui = newWindow("*Untitled","http://www.roblox.com/asset/?id=4998267428",Vector2.new(170,170))
  285. local textbox = Instance.new("TextBox")
  286. textbox.Parent = gui
  287. textbox.Size = UDim2.new(1,0,1,0)
  288. textbox.TextXAlignment = "Left"
  289. textbox.TextYAlignment = "Top"
  290. textbox.TextSize = 12
  291. textbox.BackgroundTransparency = 1
  292. local run = Instance.new("TextButton")
  293. run.Parent = gui
  294. run.Size = UDim2.new(0,50,0,20)
  295. run.Position = UDim2.new(1,-60,1,-30)
  296. run.Text = "EXECUTE"
  297. local save = Instance.new("TextButton")
  298. save.Parent = gui
  299. save.Size = UDim2.new(0,50,0,20)
  300. save.Position = UDim2.new(1,-120,1,-30)
  301. save.Text = "Save"
  302. local mdata = data.code
  303. textbox.ClearTextOnFocus = false
  304. textbox.Text = mdata.Value
  305. textbox.MultiLine = true
  306.  
  307. save.MouseButton1Click:Connect(function()
  308. mdata.Value = textbox.Text
  309. end)
  310.  
  311. run.MouseButton1Click:Connect(function()
  312. event:FireServer("run",textbox.Text)
  313. end)
  314.  
  315. textbox.MouseEnter:Connect(function()
  316. mo.Image = "rbxassetid://76067514814746"
  317. end)
  318. textbox.MouseLeave:Connect(function()
  319. mo.Image = MouseDefult
  320. end)
  321. end
  322.  
  323. function newScript_App()
  324. local gui = newWindow("*Untitled","http://www.roblox.com/asset/?id=4998267428",Vector2.new(170,170))
  325. local textbox = Instance.new("TextBox")
  326. textbox.Parent = gui
  327. textbox.Size = UDim2.new(1,0,1,0)
  328. textbox.TextXAlignment = "Left"
  329. textbox.TextYAlignment = "Top"
  330. textbox.TextSize = 12
  331. textbox.BackgroundTransparency = 1
  332. textbox.MultiLine = true
  333. local run = Instance.new("TextButton")
  334. run.Parent = gui
  335. run.Size = UDim2.new(0,50,0,20)
  336. run.Position = UDim2.new(1,-60,1,-30)
  337. run.Text = "EXECUTE"
  338. local save = Instance.new("TextButton")
  339. save.Parent = gui
  340. save.Size = UDim2.new(0,50,0,20)
  341. save.Position = UDim2.new(1,-120,1,-30)
  342. save.Text = "Save"
  343. local saved = false
  344. local mdata = nil
  345. textbox.ClearTextOnFocus = false
  346.  
  347. save.MouseButton1Click:Connect(function()
  348. if saved then
  349. mdata.Value = textbox.Text
  350. else
  351. local data = newApp("http://www.roblox.com/asset/?id=4998267428","Script",openScript_App)
  352. mdata = Instance.new("StringValue")
  353. mdata.Parent = data
  354. mdata.Value = textbox.Text
  355. mdata.Name = "code"
  356. saved = true
  357. end
  358. end)
  359.  
  360. run.MouseButton1Click:Connect(function()
  361. event:FireServer("run",textbox.Text)
  362. end)
  363.  
  364. textbox.MouseEnter:Connect(function()
  365. mo.Image = "rbxassetid://76067514814746"
  366. end)
  367. textbox.MouseLeave:Connect(function()
  368. mo.Image = MouseDefult
  369. end)
  370. end
  371. newApp("http://www.roblox.com/asset/?id=6709885837","New Script",newScript_App)
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement