Advertisement
ERROR_CODE

Setting

Dec 9th, 2023 (edited)
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.40 KB | None | 0 0
  1. local UIGui = Instance.new("ScreenGui")
  2. local UserInputService = game:GetService("UserInputService")
  3. local HeadUI = Instance.new("TextLabel")
  4. local SettingsFrame = Instance.new("Frame")
  5. local TeleportService = game:GetService("TeleportService")
  6. local LocalizationService = game:GetService("LocalizationService")
  7. local Player = game.Players.LocalPlayer
  8. local PlayersDataAreaFrame = Instance.new("Frame")
  9. local SettingsText = Instance.new("TextLabel")
  10. local PlayerDataTextLabel = Instance.new("TextLabel")
  11. local PlayerCountryTextLabel = Instance.new("TextLabel")
  12. local PlayerIDTextLabel = Instance.new("TextLabel")
  13. local QuitButton = Instance.new("TextButton")
  14. local QuitButtonUICorner = Instance.new("UICorner")
  15. local PlayerAccountAgeTextLabel = Instance.new("TextLabel")
  16. local PlayerDisplayNameTextLabel = Instance.new("TextLabel")
  17. local PlayerNameTextLabel = Instance.new("TextLabel")
  18. local SettingsFrameUICorner = Instance.new("UICorner")
  19. local PlayersDataAreaFrameUICorner = Instance.new("UICorner")
  20. local ColorButtonUICorner = Instance.new("UICorner")
  21. local CloseSettingsButton = Instance.new("TextButton")
  22. local CloseSettingsButtonUICorner = Instance.new("UICorner")
  23. local PlayerCommandArea = Instance.new("Frame")
  24. local PlayerCommandAreaUICorner = Instance.new("UICorner")
  25. local PlayerCommandAreaTextLabel = Instance.new("TextLabel")
  26. local RejoinButton = Instance.new("TextButton")
  27. local RejoinButtonUICorner = Instance.new("UICorner")
  28. local CloseExecutorSysButton = Instance.new("TextButton")
  29. local CloseExecutorSysButtonUICorner = Instance.new("UICorner")
  30.  
  31. UIGui.Parent = game.CoreGui
  32.  
  33. HeadUI.Position = UDim2.new(99, 0, 99, 0)
  34. HeadUI.Parent = UIGui
  35. HeadUI.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  36. HeadUI.BackgroundTransparency = 1
  37. HeadUI.Size = UDim2.new(0, 0, 0, 0)
  38. HeadUI.TextColor3 = Color3.fromRGB(255, 255, 255)
  39.  
  40. SettingsFrame.Name = "SettingsFrame"
  41. SettingsFrame.Parent = UIGui
  42. SettingsFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  43. SettingsFrame.BackgroundColor3 = HeadUI.BackgroundColor3
  44. SettingsFrame.BackgroundTransparency = 0.5
  45. SettingsFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
  46. SettingsFrame.Size = UDim2.new(0, 230, 0, 375)
  47.  
  48. SettingsFrameUICorner.Parent = SettingsFrame
  49.  
  50. local Region, Country = pcall(function()
  51. return LocalizationService:GetCountryRegionForPlayerAsync(Player)
  52. end)
  53.  
  54. CloseSettingsButton.Name = "CloseSettingsButton"
  55. CloseSettingsButton.Position = UDim2.new(0.87, 0, 0.01, 0)
  56. CloseSettingsButton.Parent = SettingsFrame
  57. CloseSettingsButton.BackgroundColor3 = HeadUI.BackgroundColor3
  58. CloseSettingsButton.BackgroundTransparency = 0.5
  59. CloseSettingsButton.LayoutOrder = 1
  60. CloseSettingsButton.Size = UDim2.new(0, 25, 0, 25)
  61. CloseSettingsButton.AutoButtonColor = false
  62. CloseSettingsButton.Font = Enum.Font.Code
  63. CloseSettingsButton.Text = "X"
  64. CloseSettingsButton.TextColor3 = HeadUI.TextColor3
  65. CloseSettingsButton.TextScaled = true
  66. CloseSettingsButton.TextSize = 14.000
  67. CloseSettingsButton.TextWrapped = true
  68.  
  69. CloseSettingsButtonUICorner.Parent = CloseSettingsButton
  70.  
  71. CloseSettingsButton.MouseButton1Click:Connect(function()
  72. SettingsFrame.Visible = false
  73. end)
  74.  
  75.  
  76. PlayersDataAreaFrame.Name = "PlayersDataAreaFrame"
  77. PlayersDataAreaFrame.Parent = SettingsFrame
  78. PlayersDataAreaFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  79. PlayersDataAreaFrame.BackgroundColor3 = HeadUI.BackgroundColor3
  80. PlayersDataAreaFrame.BackgroundTransparency = 0.5
  81. PlayersDataAreaFrame.Position = UDim2.new(0.5, 0, 0.25, 0)
  82. PlayersDataAreaFrame.Size = UDim2.new(0, 215, 0, 100)
  83.  
  84. PlayersDataAreaFrameUICorner.Parent = PlayersDataAreaFrame
  85.  
  86. PlayerCommandArea.Name = "PlayerCommandArea"
  87. PlayerCommandArea.Parent = SettingsFrame
  88. PlayerCommandArea.AnchorPoint = Vector2.new(0.5, 0.5)
  89. PlayerCommandArea.BackgroundColor3 = HeadUI.BackgroundColor3
  90. PlayerCommandArea.BackgroundTransparency = 0.5
  91. PlayerCommandArea.Position = UDim2.new(0.5, 0, 0.70, 0)
  92. PlayerCommandArea.Size = UDim2.new(0, 215, 0, 210)
  93.  
  94. PlayerCommandAreaUICorner.Parent = PlayerCommandArea
  95.  
  96. SettingsText.Name = "SettingsText"
  97. SettingsText.Parent = SettingsFrame
  98. SettingsText.BackgroundTransparency = 1
  99. SettingsText.Position = UDim2.new(0.5, 0, 0.05, 0)
  100. SettingsText.Size = UDim2.new(0, 1, 0, 1)
  101. SettingsText.Font = Enum.Font.Code
  102. SettingsText.Text = "Settings"
  103. SettingsText.TextColor3 = HeadUI.TextColor3
  104. SettingsText.TextTransparency = 0.5
  105. SettingsText.TextSize = 20
  106.  
  107.  
  108. PlayerDataTextLabel.Name = "PlayerDataTextLabel"
  109. PlayerDataTextLabel.Parent = PlayersDataAreaFrame
  110. PlayerDataTextLabel.BackgroundTransparency = 1
  111. PlayerDataTextLabel.Position = UDim2.new(0.5, 0, 0.1, 0)
  112. PlayerDataTextLabel.Size = UDim2.new(0, 1, 0, 1)
  113. PlayerDataTextLabel.Font = Enum.Font.Code
  114. PlayerDataTextLabel.Text = "Player Data:"
  115. PlayerDataTextLabel.TextColor3 = HeadUI.TextColor3
  116. PlayerDataTextLabel.TextTransparency = 0.5
  117. PlayerDataTextLabel.TextSize = 10
  118.  
  119. PlayerCountryTextLabel.Name = "PlayerCountryTextLabel"
  120. PlayerCountryTextLabel.Parent = PlayersDataAreaFrame
  121. PlayerCountryTextLabel.BackgroundTransparency = 1
  122. PlayerCountryTextLabel.Position = UDim2.new(0.5, 0, 0.25, 0)
  123. PlayerCountryTextLabel.Size = UDim2.new(0, 1, 0, 1)
  124. PlayerCountryTextLabel.Font = Enum.Font.Code
  125. PlayerCountryTextLabel.Text = ""..Country
  126. PlayerCountryTextLabel.TextColor3 = HeadUI.TextColor3
  127. PlayerCountryTextLabel.TextTransparency = 0.5
  128. PlayerCountryTextLabel.TextSize = 15
  129.  
  130. PlayerIDTextLabel.Name = "PlayerIDTextLabel"
  131. PlayerIDTextLabel.Parent = PlayersDataAreaFrame
  132. PlayerIDTextLabel.BackgroundTransparency = 1
  133. PlayerIDTextLabel.Position = UDim2.new(0.5, 0, 0.4, 0)
  134. PlayerIDTextLabel.Size = UDim2.new(0, 1, 0, 1)
  135. PlayerIDTextLabel.Font = Enum.Font.Code
  136. PlayerIDTextLabel.Text = ""..game.Players.LocalPlayer.UserId
  137. PlayerIDTextLabel.TextColor3 = HeadUI.TextColor3
  138. PlayerIDTextLabel.TextTransparency = 0.5
  139. PlayerIDTextLabel.TextSize = 15
  140.  
  141. PlayerAccountAgeTextLabel.Name = "PlayerAccountAgeTextLabel"
  142. PlayerAccountAgeTextLabel.Parent = PlayersDataAreaFrame
  143. PlayerAccountAgeTextLabel.BackgroundTransparency = 1
  144. PlayerAccountAgeTextLabel.Position = UDim2.new(0.5, 0, 0.55, 0)
  145. PlayerAccountAgeTextLabel.Size = UDim2.new(0, 1, 0, 1)
  146. PlayerAccountAgeTextLabel.Font = Enum.Font.Code
  147. PlayerAccountAgeTextLabel.Text = ""..game.Players.LocalPlayer.AccountAge
  148. PlayerAccountAgeTextLabel.TextColor3 = HeadUI.TextColor3
  149. PlayerAccountAgeTextLabel.TextTransparency = 0.5
  150. PlayerAccountAgeTextLabel.TextSize = 15
  151.  
  152. PlayerDisplayNameTextLabel.Name = "PlayerDisplayNameTextLabel"
  153. PlayerDisplayNameTextLabel.Parent = PlayersDataAreaFrame
  154. PlayerDisplayNameTextLabel.BackgroundTransparency = 1
  155. PlayerDisplayNameTextLabel.Position = UDim2.new(0.5, 0, 0.7, 0)
  156. PlayerDisplayNameTextLabel.Size = UDim2.new(0, 1, 0, 1)
  157. PlayerDisplayNameTextLabel.Font = Enum.Font.Code
  158. PlayerDisplayNameTextLabel.Text = ""..game.Players.LocalPlayer.DisplayName
  159. PlayerDisplayNameTextLabel.TextColor3 = HeadUI.TextColor3
  160. PlayerDisplayNameTextLabel.TextTransparency = 0.5
  161. PlayerDisplayNameTextLabel.TextSize = 15
  162.  
  163. PlayerNameTextLabel.Name = "PlayerNameTextLabel"
  164. PlayerNameTextLabel.Parent = PlayersDataAreaFrame
  165. PlayerNameTextLabel.BackgroundTransparency = 1
  166. PlayerNameTextLabel.Position = UDim2.new(0.5, 0, 0.85, 0)
  167. PlayerNameTextLabel.Size = UDim2.new(0, 1, 0, 1)
  168. PlayerNameTextLabel.Font = Enum.Font.Code
  169. PlayerNameTextLabel.Text = ""..game.Players.LocalPlayer.Name
  170. PlayerNameTextLabel.TextColor3 = HeadUI.TextColor3
  171. PlayerNameTextLabel.TextTransparency = 0.5
  172. PlayerNameTextLabel.TextSize = 15
  173.  
  174.  
  175. QuitButton.Name = "QuitButton"
  176. QuitButton.Position = UDim2.new(0.035, 0, 0.20, 0)
  177. QuitButton.Parent = PlayerCommandArea
  178. QuitButton.BackgroundColor3 = HeadUI.BackgroundColor3
  179. QuitButton.BackgroundTransparency = 0.5
  180. QuitButton.LayoutOrder = 1
  181. QuitButton.Size = UDim2.new(0, 200, 0, 40)
  182. QuitButton.AutoButtonColor = false
  183. QuitButton.Font = Enum.Font.Code
  184. QuitButton.Text = "Quit"
  185. QuitButton.TextColor3 = HeadUI.TextColor3
  186. QuitButton.TextScaled = true
  187. QuitButton.TextSize = 14.000
  188. QuitButton.TextWrapped = true
  189. QuitButton.MouseButton1Click:Connect(function()
  190. Player:Kick("See you soon.")
  191. end)
  192.  
  193. QuitButtonUICorner.Parent = QuitButton
  194.  
  195. RejoinButton.Name = "RejoinButton"
  196. RejoinButton.Position = UDim2.new(0.035, 0, 0.50, 0)
  197. RejoinButton.Parent = PlayerCommandArea
  198. RejoinButton.BackgroundColor3 = HeadUI.BackgroundColor3
  199. RejoinButton.BackgroundTransparency = 0.5
  200. RejoinButton.LayoutOrder = 1
  201. RejoinButton.Size = UDim2.new(0, 200, 0, 40)
  202. RejoinButton.AutoButtonColor = false
  203. RejoinButton.Font = Enum.Font.Code
  204. RejoinButton.Text = "Rejoin"
  205. RejoinButton.TextColor3 = HeadUI.TextColor3
  206. RejoinButton.TextScaled = true
  207. RejoinButton.TextSize = 14.000
  208. RejoinButton.TextWrapped = true
  209. RejoinButton.MouseButton1Click:Connect(function()
  210. Player:Kick("Rejoining...")
  211. local Rejoin = coroutine.create(function()
  212. local Success, ErrorMessage = pcall(function()
  213. TeleportService:Teleport(game.PlaceId, Player)
  214. end)
  215. if ErrorMessage and not Success then
  216. warn(ErrorMessage)
  217. end
  218. end)
  219. coroutine.resume(Rejoin)
  220. end)
  221.  
  222. RejoinButtonUICorner.Parent = RejoinButton
  223.  
  224. CloseExecutorSysButton.Name = "CloseExecutorSysButton"
  225. CloseExecutorSysButton.Position = UDim2.new(0.035, 0, 0.80, 0)
  226. CloseExecutorSysButton.Parent = PlayerCommandArea
  227. CloseExecutorSysButton.BackgroundColor3 = HeadUI.BackgroundColor3
  228. CloseExecutorSysButton.BackgroundTransparency = 0.5
  229. CloseExecutorSysButton.LayoutOrder = 1
  230. CloseExecutorSysButton.Size = UDim2.new(0, 200, 0, 40)
  231. CloseExecutorSysButton.AutoButtonColor = false
  232. CloseExecutorSysButton.Font = Enum.Font.Code
  233. CloseExecutorSysButton.Text = "Close Executor"
  234. CloseExecutorSysButton.TextColor3 = HeadUI.TextColor3
  235. CloseExecutorSysButton.TextScaled = true
  236. CloseExecutorSysButton.TextSize = 14.000
  237. CloseExecutorSysButton.TextWrapped = true
  238. CloseExecutorSysButton.MouseButton1Click:Connect(function()
  239. game:GetService("CoreGui"):FindFirstChild("UIGui"):Destroy()
  240. end)
  241.  
  242. CloseExecutorSysButtonUICorner.Parent = CloseExecutorSysButton
  243.  
  244. PlayerCommandAreaTextLabel.Name = "PlayerCommandAreaTextLabel"
  245. PlayerCommandAreaTextLabel.Parent = PlayerCommandArea
  246. PlayerCommandAreaTextLabel.BackgroundTransparency = 1
  247. PlayerCommandAreaTextLabel.Position = UDim2.new(0.5, 0, 0.1, 0)
  248. PlayerCommandAreaTextLabel.Size = UDim2.new(0, 1, 0, 1)
  249. PlayerCommandAreaTextLabel.Font = Enum.Font.Code
  250. PlayerCommandAreaTextLabel.Text = "Player Control:"
  251. PlayerCommandAreaTextLabel.TextColor3 = HeadUI.TextColor3
  252. PlayerCommandAreaTextLabel.TextTransparency = 0.5
  253. PlayerCommandAreaTextLabel.TextSize = 25
  254.  
  255. local gui = SettingsFrame
  256.  
  257. local dragging
  258. local dragInput
  259. local dragStart
  260. local startPos
  261.  
  262. local function update(input)
  263.     local delta = input.Position - dragStart
  264.     gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  265. end
  266.  
  267. gui.InputBegan:Connect(function(input)
  268.     if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  269.         dragging = true
  270.         dragStart = input.Position
  271.         startPos = gui.Position
  272.  
  273.         input.Changed:Connect(function()
  274.             if input.UserInputState == Enum.UserInputState.End then
  275.                 dragging = false
  276.             end
  277.         end)
  278.     end
  279. end)
  280.  
  281. gui.InputChanged:Connect(function(input)
  282.     if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  283.         dragInput = input
  284.     end
  285. end)
  286.  
  287. UserInputService.InputChanged:Connect(function(input)
  288.     if input == dragInput and dragging then
  289.         update(input)
  290.     end
  291. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement