Alfanrizkyy

Untitled

Aug 13th, 2025
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 16.36 KB | None | 0 0
  1. --// Ultra Graphics + Time Controller (Single LocalScript)
  2. --// Place in: StarterPlayer > StarterPlayerScripts
  3. --// Hotkey: G (toggle panel)
  4. --// Theme: Black & White | Watermark: "Time Set Pro by Oxcom"
  5. --// No blur / eye strain; clean, crisp, "8K-look" tone
  6.  
  7. --========================================================
  8. --== Services
  9. --========================================================
  10. local Players        = game:GetService("Players")
  11. local TweenService   = game:GetService("TweenService")
  12. local UIS            = game:GetService("UserInputService")
  13. local RunService     = game:GetService("RunService")
  14. local Lighting       = game:GetService("Lighting")
  15. local LocalPlayer    = Players.LocalPlayer
  16. local PlayerGui      = LocalPlayer:WaitForChild("PlayerGui")
  17.  
  18. --========================================================
  19. --== Ultra Graphics (smart, eye-friendly, no blur)
  20. --========================================================
  21. local function applyUltraGraphics()
  22.     -- Technology & global render knobs
  23.     pcall(function()
  24.         Lighting.Technology = Enum.Technology.Future -- modern GI, reflections
  25.     end)
  26.  
  27.     -- Keep it clean and crisp
  28.     Lighting.EnvironmentDiffuseScale  = 1
  29.     Lighting.EnvironmentSpecularScale = 1
  30.     Lighting.GlobalShadows            = true
  31.     Lighting.Brightness               = 2.2  -- bright enough, not harsh
  32.     Lighting.ExposureCompensation     = 0
  33.     Lighting.ShadowSoftness           = 1
  34.     Lighting.GeographicLatitude       = 35   -- natural sun angle
  35.     Lighting.ClockTime                = 9    -- comfy starting time (morning)
  36.  
  37.     -- Neutral ambient (no color cast)
  38.     Lighting.Ambient        = Color3.fromRGB(180,180,180)
  39.     Lighting.OutdoorAmbient = Color3.fromRGB(180,180,180)
  40.  
  41.     -- NO Depth of Field (no blur)
  42.     local dof = Lighting:FindFirstChildOfClass("DepthOfFieldEffect")
  43.     if dof then dof.Enabled = false end
  44.  
  45.     -- Subtle post-processing for clarity (not flashy)
  46.     local cc = Lighting:FindFirstChild("UX_CC") or Instance.new("ColorCorrectionEffect")
  47.     cc.Name        = "UX_CC"
  48.     cc.Parent      = Lighting
  49.     cc.Brightness  = 0.02   -- lift shadows slightly
  50.     cc.Contrast    = 0.12   -- mild clarity
  51.     cc.Saturation  = -0.05  -- slightly desaturated to reduce eye strain
  52.     cc.Enabled     = true
  53.  
  54.     local bloom = Lighting:FindFirstChild("UX_Bloom") or Instance.new("BloomEffect")
  55.     bloom.Name      = "UX_Bloom"
  56.     bloom.Parent    = Lighting
  57.     bloom.Intensity = 0.15  -- very soft, avoids glow
  58.     bloom.Size      = 10
  59.     bloom.Threshold = 0.92
  60.     bloom.Enabled   = true
  61.  
  62.     local sun = Lighting:FindFirstChild("UX_Sun") or Instance.new("SunRaysEffect")
  63.     sun.Name      = "UX_Sun"
  64.     sun.Parent    = Lighting
  65.     sun.Intensity = 0.02    -- barely there, only at strong angles
  66.     sun.Spread    = 0.8
  67.     sun.Enabled   = true
  68.  
  69.     -- Soft atmosphere, no fog wall
  70.     local atmo = Lighting:FindFirstChild("UX_Atmosphere") or Instance.new("Atmosphere")
  71.     atmo.Name   = "UX_Atmosphere"
  72.     atmo.Parent = Lighting
  73.     atmo.Density = 0.25
  74.     atmo.Offset  = 0.03
  75.     atmo.Color   = Color3.fromRGB(210,210,210)
  76.     atmo.Decay   = Color3.fromRGB(140,140,140)
  77.     atmo.Glare   = 0.04
  78.     atmo.Haze    = 0.55
  79.  
  80.     -- Try to push client quality high (best-effort)
  81.     pcall(function()
  82.         if settings and settings().Rendering then
  83.             -- Use LevelXX if available; fallback Automatic otherwise
  84.             settings().Rendering.QualityLevel = Enum.QualityLevel.Level21 or Enum.QualityLevel.Automatic
  85.         end
  86.     end)
  87. end
  88.  
  89. applyUltraGraphics()
  90.  
  91. --========================================================
  92. --== Time utilities
  93. --========================================================
  94. local function clamp(v, mn, mx) if v < mn then return mn elseif v > mx then return mx else return v end end
  95. local function hhmmToClock(hh, mm) hh = clamp(hh,0,23) mm = clamp(mm,0,59) return hh + (mm/60) end
  96. local function clockToHHMM(clock)
  97.     local totalMin = math.floor((clock % 24) * 60 + 0.5)
  98.     local h = math.floor(totalMin/60)
  99.     local m = totalMin % 60
  100.     return h, m
  101. end
  102. local function fmt(h, m) return string.format("%02d:%02d", h, m) end
  103.  
  104. --========================================================
  105. --== UI (Black & White, elegant, smooth)
  106. --========================================================
  107. local gui = Instance.new("ScreenGui")
  108. gui.Name = "UltraTimeControllerUI"
  109. gui.ResetOnSpawn = false
  110. gui.IgnoreGuiInset = true
  111. gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  112. gui.Parent = PlayerGui
  113.  
  114. -- Main panel
  115. local PANEL_W, PANEL_H = 440, 232
  116. local panel = Instance.new("Frame")
  117. panel.Name = "Panel"
  118. panel.Size = UDim2.fromOffset(PANEL_W, PANEL_H)
  119. panel.Position = UDim2.new(0, -PANEL_W - 24, 0.25, 0) -- start fully hidden to the left
  120. panel.BackgroundColor3 = Color3.fromRGB(18,18,18)
  121. panel.BorderSizePixel = 0
  122. panel.Parent = gui
  123. panel.BackgroundTransparency = 0
  124.  
  125. local corner = Instance.new("UICorner", panel) corner.CornerRadius = UDim.new(0,16)
  126.  
  127. -- Subtle shadow
  128. local shadow = Instance.new("ImageLabel")
  129. shadow.Name = "Shadow"
  130. shadow.Parent = panel
  131. shadow.BackgroundTransparency = 1
  132. shadow.AnchorPoint = Vector2.new(0.5,0.5)
  133. shadow.Position = UDim2.fromScale(0.5,0.5)
  134. shadow.Size = UDim2.new(1, 48, 1, 48)
  135. shadow.Image = "rbxassetid://1316045217"
  136. shadow.ScaleType = Enum.ScaleType.Slice
  137. shadow.SliceCenter = Rect.new(10,10,118,118)
  138. shadow.ImageTransparency = 0.3
  139. shadow.ZIndex = 0
  140.  
  141. -- Header
  142. local header = Instance.new("TextLabel")
  143. header.Name = "Header"
  144. header.Parent = panel
  145. header.Size = UDim2.new(1, -20, 0, 42)
  146. header.Position = UDim2.new(0, 12, 0, 8)
  147. header.BackgroundTransparency = 1
  148. header.Font = Enum.Font.GothamBold
  149. header.Text = "Ultra Graphics • Time Controller"
  150. header.TextSize = 18
  151. header.TextColor3 = Color3.fromRGB(245,245,245)
  152. header.TextXAlignment = Enum.TextXAlignment.Left
  153. header.ZIndex = 2
  154.  
  155. local subtitle = Instance.new("TextLabel")
  156. subtitle.Parent = panel
  157. subtitle.Size = UDim2.new(1, -20, 0, 18)
  158. subtitle.Position = UDim2.new(0, 12, 0, 40)
  159. subtitle.BackgroundTransparency = 1
  160. subtitle.Font = Enum.Font.Gotham
  161. subtitle.Text = "Presets • Slider • HH:MM input"
  162. subtitle.TextSize = 12
  163. subtitle.TextColor3 = Color3.fromRGB(170,170,170)
  164. subtitle.TextXAlignment = Enum.TextXAlignment.Left
  165. subtitle.ZIndex = 2
  166.  
  167. -- Buttons container
  168. local buttons = Instance.new("Frame")
  169. buttons.Name = "Buttons"
  170. buttons.Parent = panel
  171. buttons.BackgroundTransparency = 1
  172. buttons.Position = UDim2.new(0, 12, 0, 70)
  173. buttons.Size = UDim2.new(1, -24, 0, 40)
  174. buttons.ZIndex = 2
  175.  
  176. local function makeBtn(txt)
  177.     local b = Instance.new("TextButton")
  178.     b.AutoButtonColor = true
  179.     b.Size = UDim2.new(0.24, 0, 1, 0)
  180.     b.BackgroundColor3 = Color3.fromRGB(28,28,28)
  181.     b.Text = txt
  182.     b.Font = Enum.Font.GothamMedium
  183.     b.TextSize = 14
  184.     b.TextColor3 = Color3.fromRGB(235,235,235)
  185.     b.ZIndex = 3
  186.     local c = Instance.new("UICorner", b); c.CornerRadius = UDim.new(0,10)
  187.     local s = Instance.new("UIStroke", b); s.Thickness = 1; s.Color = Color3.fromRGB(70,70,70); s.Transparency = 0.35
  188.     return b
  189. end
  190.  
  191. local btnMorning = makeBtn("MORNING")
  192. btnMorning.Parent = buttons
  193. btnMorning.Position = UDim2.new(0.00, 0, 0, 0)
  194.  
  195. local btnNoon = makeBtn("NOON")
  196. btnNoon.Parent = buttons
  197. btnNoon.Position = UDim2.new(0.26, 0, 0, 0)
  198.  
  199. local btnEvening = makeBtn("EVENING")
  200. btnEvening.Parent = buttons
  201. btnEvening.Position = UDim2.new(0.52, 0, 0, 0)
  202.  
  203. local btnNight = makeBtn("NIGHT")
  204. btnNight.Parent = buttons
  205. btnNight.Position = UDim2.new(0.78, 0, 0, 0)
  206.  
  207. -- Slider area
  208. local sliderLabel = Instance.new("TextLabel")
  209. sliderLabel.Parent = panel
  210. sliderLabel.BackgroundTransparency = 1
  211. sliderLabel.Position = UDim2.new(0, 12, 0, 118)
  212. sliderLabel.Size = UDim2.new(0, 160, 0, 18)
  213. sliderLabel.Font = Enum.Font.Gotham
  214. sliderLabel.TextSize = 12
  215. sliderLabel.TextColor3 = Color3.fromRGB(185,185,185)
  216. sliderLabel.TextXAlignment = Enum.TextXAlignment.Left
  217. sliderLabel.Text = "Time Slider (0—24)"
  218. sliderLabel.ZIndex = 2
  219.  
  220. local slider = Instance.new("Frame")
  221. slider.Name = "Slider"
  222. slider.Parent = panel
  223. slider.BackgroundTransparency = 1
  224. slider.Position = UDim2.new(0, 12, 0, 140)
  225. slider.Size = UDim2.new(1, -24, 0, 24)
  226. slider.ZIndex = 2
  227.  
  228. local bar = Instance.new("Frame")
  229. bar.Parent = slider
  230. bar.AnchorPoint = Vector2.new(0,0.5)
  231. bar.Position = UDim2.new(0, 0, 0.5, 0)
  232. bar.Size = UDim2.new(1, 0, 0, 6)
  233. bar.BackgroundColor3 = Color3.fromRGB(46,46,46)
  234. bar.BorderSizePixel = 0
  235. local barCorner = Instance.new("UICorner", bar); barCorner.CornerRadius = UDim.new(0, 8)
  236.  
  237. local fill = Instance.new("Frame")
  238. fill.Parent = bar
  239. fill.Size = UDim2.new(0, 0, 1, 0)
  240. fill.BackgroundColor3 = Color3.fromRGB(240,240,240)
  241. fill.BorderSizePixel = 0
  242. local fillCorner = Instance.new("UICorner", fill); fillCorner.CornerRadius = UDim.new(0, 8)
  243.  
  244. local knob = Instance.new("Frame")
  245. knob.Parent = slider
  246. knob.Size = UDim2.new(0, 16, 0, 16)
  247. knob.AnchorPoint = Vector2.new(0.5, 0.5)
  248. knob.Position = UDim2.new(0, 0, 0.5, 0)
  249. knob.BackgroundColor3 = Color3.fromRGB(255,255,255)
  250. knob.BorderSizePixel = 0
  251. local knobCorner = Instance.new("UICorner", knob); knobCorner.CornerRadius = UDim.new(1, 0)
  252. local knobStroke = Instance.new("UIStroke", knob); knobStroke.Color = Color3.fromRGB(70,70,70); knobStroke.Thickness = 1; knobStroke.Transparency = 0.3
  253. knob.ZIndex = 3
  254.  
  255. local timeReadout = Instance.new("TextLabel")
  256. timeReadout.Parent = panel
  257. timeReadout.BackgroundTransparency = 1
  258. timeReadout.Position = UDim2.new(1, -140, 0, 118)
  259. timeReadout.Size = UDim2.new(0, 128, 0, 18)
  260. timeReadout.Font = Enum.Font.GothamMedium
  261. timeReadout.TextSize = 14
  262. timeReadout.TextColor3 = Color3.fromRGB(240,240,240)
  263. timeReadout.TextXAlignment = Enum.TextXAlignment.Right
  264. timeReadout.Text = "09:00"
  265. timeReadout.ZIndex = 2
  266.  
  267. -- HH:MM input
  268. local inputRow = Instance.new("Frame")
  269. inputRow.Parent = panel
  270. inputRow.BackgroundTransparency = 1
  271. inputRow.Position = UDim2.new(0, 12, 0, 176)
  272. inputRow.Size = UDim2.new(1, -24, 0, 32)
  273. inputRow.ZIndex = 2
  274.  
  275. local inputBox = Instance.new("TextBox")
  276. inputBox.Parent = inputRow
  277. inputBox.Size = UDim2.new(0, 110, 1, 0)
  278. inputBox.BackgroundColor3 = Color3.fromRGB(28,28,28)
  279. inputBox.PlaceholderText = "HH:MM"
  280. inputBox.Text = ""
  281. inputBox.ClearTextOnFocus = false
  282. inputBox.TextXAlignment = Enum.TextXAlignment.Center
  283. inputBox.Font = Enum.Font.GothamMedium
  284. inputBox.TextSize = 14
  285. inputBox.TextColor3 = Color3.fromRGB(235,235,235)
  286. local inputCorner = Instance.new("UICorner", inputBox); inputCorner.CornerRadius = UDim.new(0,10)
  287. local inputStroke = Instance.new("UIStroke", inputBox); inputStroke.Thickness = 1; inputStroke.Color = Color3.fromRGB(70,70,70); inputStroke.Transparency = 0.35
  288.  
  289. local applyBtn = Instance.new("TextButton")
  290. applyBtn.Parent = inputRow
  291. applyBtn.Size = UDim2.new(0, 130, 1, 0)
  292. applyBtn.Position = UDim2.new(0, 122, 0, 0)
  293. applyBtn.Text = "Apply HH:MM"
  294. applyBtn.BackgroundColor3 = Color3.fromRGB(240,240,240)
  295. applyBtn.TextColor3 = Color3.fromRGB(16,16,16)
  296. applyBtn.Font = Enum.Font.GothamSemibold
  297. applyBtn.TextSize = 14
  298. applyBtn.AutoButtonColor = true
  299. local applyCorner = Instance.new("UICorner", applyBtn); applyCorner.CornerRadius = UDim.new(0,10)
  300.  
  301. -- Watermark (small)
  302. local watermark = Instance.new("TextLabel")
  303. watermark.Parent = panel
  304. watermark.BackgroundTransparency = 1
  305. watermark.Position = UDim2.new(0, 12, 1, -18)
  306. watermark.Size = UDim2.new(1, -24, 0, 14)
  307. watermark.Font = Enum.Font.Gotham
  308. watermark.TextSize = 10
  309. watermark.TextColor3 = Color3.fromRGB(150,150,150)
  310. watermark.TextXAlignment = Enum.TextXAlignment.Left
  311. watermark.Text = "Time Set Pro by Oxcom"
  312. watermark.ZIndex = 2
  313.  
  314. -- Padding
  315. local pad = Instance.new("UIPadding", panel)
  316. pad.PaddingLeft  = UDim.new(0, 8)
  317. pad.PaddingRight = UDim.new(0, 8)
  318.  
  319. --========================================================
  320. --== Time logic + UI wiring
  321. --========================================================
  322. local function setClockTime(clock, ease)
  323.     clock = (clock % 24)
  324.     if ease then
  325.         TweenService:Create(Lighting, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ClockTime = clock}):Play()
  326.     else
  327.         Lighting.ClockTime = clock
  328.     end
  329.     -- Update UI visuals
  330.     local alpha = clock/24
  331.     fill:TweenSize(UDim2.new(alpha,0,1,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.15, true)
  332.     knob:TweenPosition(UDim2.new(alpha,0,0.5,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.15, true)
  333.     local hh, mm = clockToHHMM(clock)
  334.     timeReadout.Text = fmt(hh, mm)
  335. end
  336.  
  337. -- Presets
  338. btnMorning.MouseButton1Click:Connect(function() setClockTime(6, true) end)
  339. btnNoon.MouseButton1Click:Connect(function() setClockTime(12, true) end)
  340. btnEvening.MouseButton1Click:Connect(function() setClockTime(17.5, true) end)
  341. btnNight.MouseButton1Click:Connect(function() setClockTime(20, true) end)
  342.  
  343. -- Slider drag
  344. local dragging = false
  345. local function updateFromX(x)
  346.     local barPos = bar.AbsolutePosition.X
  347.     local barSize = bar.AbsoluteSize.X
  348.     if barSize <= 0 then return end
  349.     local rel = clamp((x - barPos)/barSize, 0, 1)
  350.     setClockTime(rel * 24, false)
  351. end
  352.  
  353. knob.InputBegan:Connect(function(input)
  354.     if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  355.         dragging = true
  356.     end
  357. end)
  358. bar.InputBegan:Connect(function(input)
  359.     if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  360.         dragging = true
  361.         updateFromX(input.Position.X)
  362.     end
  363. end)
  364. UIS.InputChanged:Connect(function(input)
  365.     if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
  366.         updateFromX(input.Position.X)
  367.     end
  368. end)
  369. UIS.InputEnded:Connect(function(input)
  370.     if dragging and (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
  371.         dragging = false
  372.     end
  373. end)
  374.  
  375. -- HH:MM apply
  376. applyBtn.MouseButton1Click:Connect(function()
  377.     local text = string.gsub(inputBox.Text, "%s+", "")
  378.     local h, m = string.match(text, "^(%d%d?):(%d%d)$")
  379.     h = tonumber(h); m = tonumber(m)
  380.     if h and m then
  381.         setClockTime(hhmmToClock(h,m), true)
  382.         applyBtn.Text = "Applied"
  383.         task.delay(0.6, function() applyBtn.Text = "Apply HH:MM" end)
  384.     else
  385.         applyBtn.Text = "Invalid format!"
  386.         task.delay(0.8, function() applyBtn.Text = "Apply HH:MM" end)
  387.     end
  388. end)
  389.  
  390. -- Keep slider position correct when window resizes or time changes elsewhere
  391. local lastClock = Lighting.ClockTime
  392. RunService.RenderStepped:Connect(function()
  393.     if math.abs(Lighting.ClockTime - lastClock) > 1e-3 then
  394.         lastClock = Lighting.ClockTime
  395.         setClockTime(lastClock, false)
  396.     end
  397. end)
  398.  
  399. --========================================================
  400. --== Smooth toggle (G): left-hide / right-show
  401. --========================================================
  402. local isOpen = false
  403. local function openPos()  return UDim2.new(0, 20, 0.25, 0) end         -- visible (slid in from left to right)
  404. local function closePos() return UDim2.new(0, -PANEL_W - 24, 0.25, 0) end -- hidden to the left
  405.  
  406. local function togglePanel(state)
  407.     if state ~= nil then isOpen = state else isOpen = not isOpen end
  408.     local goal = isOpen and openPos() or closePos()
  409.     local tween = TweenService:Create(panel, TweenInfo.new(0.36, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Position = goal})
  410.     tween:Play()
  411.     -- subtle fade for polish
  412.     local toTrans = isOpen and 0 or 0.15
  413.     TweenService:Create(panel, TweenInfo.new(0.24, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {BackgroundTransparency = toTrans}):Play()
  414. end
  415.  
  416. -- Show on start (slide in from left to right)
  417. task.defer(function()
  418.     setClockTime(Lighting.ClockTime or 9, false)
  419.     togglePanel(true)
  420. end)
  421.  
  422. -- Toggle with G
  423. UIS.InputBegan:Connect(function(input, gpe)
  424.     if gpe then return end
  425.     if input.KeyCode == Enum.KeyCode.G then
  426.         -- If open: slide left and hide; if closed: slide right and show
  427.         togglePanel()
  428.     end
  429. end)
  430.  
  431. -- Optional: drag the panel by header
  432. local draggingPanel = false
  433. local dragOffset = Vector2.new()
  434. header.InputBegan:Connect(function(input)
  435.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  436.         draggingPanel = true
  437.         dragOffset = input.Position - panel.AbsolutePosition
  438.     end
  439. end)
  440. UIS.InputChanged:Connect(function(input)
  441.     if draggingPanel and input.UserInputType == Enum.UserInputType.MouseMovement then
  442.         local newPos = input.Position - dragOffset
  443.         panel.Position = UDim2.fromOffset(newPos.X, newPos.Y)
  444.     end
  445. end)
  446. UIS.InputEnded:Connect(function(input)
  447.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  448.         draggingPanel = false
  449.     end
  450. end)
  451.  
  452. --========================================================
  453. --== End: Press G to toggle the panel
  454. --========================================================
  455.  
Advertisement
Add Comment
Please, Sign In to add comment