RXYSETTINGS

Custom Sky

Nov 26th, 2025 (edited)
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.13 KB | Source Code | 0 0
  1. --// StarterPlayerScripts LocalScript
  2. local Players = game:GetService("Players")
  3. local Lighting = game:GetService("Lighting")
  4. local TweenService = game:GetService("TweenService")
  5. local RunService = game:GetService("RunService")
  6. local player = Players.LocalPlayer
  7. local playerGui = player:WaitForChild("PlayerGui")
  8.  
  9. --// Create ScreenGui
  10. local screenGui = Instance.new("ScreenGui")
  11. screenGui.Name = "CustomSkyMenu"
  12. screenGui.ResetOnSpawn = false
  13. screenGui.Parent = playerGui
  14.  
  15. --// Open Button
  16. local toggleFrame = Instance.new("Frame")
  17. toggleFrame.Size = UDim2.new(0, 50, 0, 50)
  18. toggleFrame.Position = UDim2.new(0, 10, 0, 10)
  19. toggleFrame.BackgroundColor3 = Color3.fromRGB(50,50,50)
  20. toggleFrame.BorderSizePixel = 0
  21. toggleFrame.ClipsDescendants = true
  22. toggleFrame.Parent = screenGui
  23.  
  24. local toggleUICorner = Instance.new("UICorner")
  25. toggleUICorner.CornerRadius = UDim.new(0.5, 0)
  26. toggleUICorner.Parent = toggleFrame
  27.  
  28. local toggleBtn = Instance.new("ImageButton")
  29. toggleBtn.Size = UDim2.new(1,0,1,0)
  30. toggleBtn.BackgroundTransparency = 1
  31. toggleBtn.Image = "rbxassetid://78494414238159"
  32. toggleBtn.Parent = toggleFrame
  33.  
  34. --// Main Frame
  35. local mainFrame = Instance.new("Frame")
  36. mainFrame.Size = UDim2.new(0,360,0,340)
  37. mainFrame.Position = UDim2.new(0.5,0,0.5,0)
  38. mainFrame.AnchorPoint = Vector2.new(0.5,0.5)
  39. mainFrame.BackgroundColor3 = Color3.fromRGB(30,30,30)
  40. mainFrame.BorderSizePixel = 0
  41. mainFrame.Visible = false
  42. mainFrame.ClipsDescendants = true
  43. mainFrame.Parent = screenGui
  44.  
  45. local mainUICorner = Instance.new("UICorner")
  46. mainUICorner.CornerRadius = UDim.new(0,12)
  47. mainUICorner.Parent = mainFrame
  48.  
  49. --// Close Button
  50. local closeBtn = Instance.new("TextButton")
  51. closeBtn.Size = UDim2.new(0,30,0,30)
  52. closeBtn.Position = UDim2.new(1,-35,0,5)
  53. closeBtn.Text = "X"
  54. closeBtn.TextColor3 = Color3.fromRGB(255,255,255)
  55. closeBtn.BackgroundColor3 = Color3.fromRGB(180,0,0)
  56. closeBtn.Font = Enum.Font.GothamBold
  57. closeBtn.TextSize = 18
  58. closeBtn.Parent = mainFrame
  59.  
  60. local closeUICorner = Instance.new("UICorner")
  61. closeUICorner.CornerRadius = UDim.new(0,5)
  62. closeUICorner.Parent = closeBtn
  63.  
  64. closeBtn.MouseButton1Click:Connect(function()
  65.     mainFrame.Visible = false
  66. end)
  67.  
  68. --// Title
  69. local titleLabel = Instance.new("TextLabel")
  70. titleLabel.Size = UDim2.new(1,-20,0,30)
  71. titleLabel.Position = UDim2.new(0,10,0,10)
  72. titleLabel.BackgroundTransparency = 1
  73. titleLabel.Text = "Sky Menu"
  74. titleLabel.TextColor3 = Color3.fromRGB(255,255,255)
  75. titleLabel.Font = Enum.Font.GothamBold
  76. titleLabel.TextSize = 24
  77. titleLabel.TextXAlignment = Enum.TextXAlignment.Center
  78. titleLabel.TextYAlignment = Enum.TextYAlignment.Center
  79. titleLabel.Parent = mainFrame
  80.  
  81. --// Credits
  82. local creditsLabel = Instance.new("TextLabel")
  83. creditsLabel.Size = UDim2.new(1,-20,0,20)
  84. creditsLabel.Position = UDim2.new(0,10,0,40)
  85. creditsLabel.BackgroundTransparency = 1
  86. creditsLabel.Text = "By @SukitoV1"
  87. creditsLabel.TextColor3 = Color3.fromRGB(180,180,180)
  88. creditsLabel.Font = Enum.Font.Gotham
  89. creditsLabel.TextSize = 14
  90. creditsLabel.TextXAlignment = Enum.TextXAlignment.Center
  91. creditsLabel.TextYAlignment = Enum.TextYAlignment.Center
  92. creditsLabel.Parent = mainFrame
  93.  
  94. --// Divider bawah Credits
  95. local creditsDivider = Instance.new("Frame")
  96. creditsDivider.Size = UDim2.new(1,0,0,1)
  97. creditsDivider.Position = UDim2.new(0,0,0,60)
  98. creditsDivider.BackgroundColor3 = Color3.fromRGB(200,200,200)
  99. creditsDivider.BorderSizePixel = 0
  100. creditsDivider.Parent = mainFrame
  101.  
  102. --// Scrolling Frame
  103. local scrollingFrame = Instance.new("ScrollingFrame")
  104. scrollingFrame.Size = UDim2.new(1,-20,0,160)
  105. scrollingFrame.Position = UDim2.new(0,10,0,70)
  106. scrollingFrame.BackgroundTransparency = 1
  107. scrollingFrame.BorderSizePixel = 0
  108. scrollingFrame.ScrollBarThickness = 6
  109. scrollingFrame.Active = true
  110. scrollingFrame.Selectable = false
  111. scrollingFrame.Parent = mainFrame
  112.  
  113. local listLayout = Instance.new("UIListLayout")
  114. listLayout.Padding = UDim.new(0,10)
  115. listLayout.FillDirection = Enum.FillDirection.Horizontal
  116. listLayout.HorizontalAlignment = Enum.HorizontalAlignment.Left
  117. listLayout.VerticalAlignment = Enum.VerticalAlignment.Center
  118. listLayout.Parent = scrollingFrame
  119.  
  120. --// Drag Scroll
  121. local dragging = false
  122. local dragStart = nil
  123. local startPos = nil
  124.  
  125. scrollingFrame.InputBegan:Connect(function(input)
  126.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  127.         dragging = true
  128.         dragStart = input.Position
  129.         startPos = scrollingFrame.CanvasPosition
  130.         input.Changed:Connect(function()
  131.             if input.UserInputState == Enum.UserInputState.End then
  132.                 dragging = false
  133.             end
  134.         end)
  135.     end
  136. end)
  137.  
  138. scrollingFrame.InputChanged:Connect(function(input)
  139.     if input.UserInputType == Enum.UserInputType.MouseMovement and dragging then
  140.         local delta = input.Position - dragStart
  141.         scrollingFrame.CanvasPosition = Vector2.new(
  142.             math.clamp(startPos.X - delta.X,0,scrollingFrame.CanvasSize.X.Offset - scrollingFrame.AbsoluteSize.X),
  143.             0
  144.         )
  145.     end
  146. end)
  147.  
  148. --// Apply Button
  149. local applyBtn = Instance.new("TextButton")
  150. applyBtn.Size = UDim2.new(0,160,0,36)
  151. applyBtn.Position = UDim2.new(0.5,-80,1,-40)
  152. applyBtn.Text = "Apply Selected"
  153. applyBtn.Font = Enum.Font.GothamBold
  154. applyBtn.TextSize = 18
  155. applyBtn.TextColor3 = Color3.fromRGB(255,255,255)
  156. applyBtn.BackgroundColor3 = Color3.fromRGB(0,150,255)
  157. applyBtn.Parent = mainFrame
  158.  
  159. local applyUICorner = Instance.new("UICorner")
  160. applyUICorner.CornerRadius = UDim.new(0,6)
  161. applyUICorner.Parent = applyBtn
  162.  
  163. -- Hover animasi Apply
  164. applyBtn.MouseEnter:Connect(function()
  165.     TweenService:Create(applyBtn,TweenInfo.new(0.2,Enum.EasingStyle.Quad),{BackgroundColor3=Color3.fromRGB(0,180,255)}):Play()
  166. end)
  167. applyBtn.MouseLeave:Connect(function()
  168.     TweenService:Create(applyBtn,TweenInfo.new(0.2,Enum.EasingStyle.Quad),{BackgroundColor3=Color3.fromRGB(0,150,255)}):Play()
  169. end)
  170.  
  171. --// Shadow Toggle modern pill style
  172. local shadowToggle = Instance.new("TextButton")
  173. shadowToggle.Size = UDim2.new(0,160,0,36)
  174. shadowToggle.Position = UDim2.new(0.5,-80,1,-80)
  175. shadowToggle.BackgroundColor3 = Color3.fromRGB(80,80,80)
  176. shadowToggle.Font = Enum.Font.GothamBold
  177. shadowToggle.Text = "Shadow: On"
  178. shadowToggle.TextSize = 16
  179. shadowToggle.TextColor3 = Color3.fromRGB(255,255,255)
  180. shadowToggle.Parent = mainFrame
  181.  
  182. local shadowUICorner = Instance.new("UICorner")
  183. shadowUICorner.CornerRadius = UDim.new(0,18)
  184. shadowUICorner.Parent = shadowToggle
  185.  
  186. -- Divider di atas Shadow
  187. local shadowDivider = Instance.new("Frame")
  188. shadowDivider.Size = UDim2.new(1,0,0,1)
  189. shadowDivider.Position = UDim2.new(0,0,1,-90)
  190. shadowDivider.BackgroundColor3 = Color3.fromRGB(200,200,200)
  191. shadowDivider.BorderSizePixel = 0
  192. shadowDivider.Parent = mainFrame
  193.  
  194. local shadowOn = true
  195. local shadowTweenInfo = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
  196. local shadowOnTween = TweenService:Create(shadowToggle, shadowTweenInfo, {BackgroundColor3 = Color3.fromRGB(0,150,255)})
  197. local shadowOffTween = TweenService:Create(shadowToggle, shadowTweenInfo, {BackgroundColor3 = Color3.fromRGB(80,80,80)})
  198.  
  199. shadowToggle.MouseButton1Click:Connect(function()
  200.     shadowOn = not shadowOn
  201.     shadowToggle.Text = "Shadow: "..(shadowOn and "On" or "Off")
  202.     if shadowOn then shadowOnTween:Play() else shadowOffTween:Play() end
  203. end)
  204.  
  205. -- Hover animasi Shadow
  206. shadowToggle.MouseEnter:Connect(function()
  207.     TweenService:Create(shadowToggle,TweenInfo.new(0.2,Enum.EasingStyle.Quad),{BackgroundColor3=Color3.fromRGB(100,100,255)}):Play()
  208. end)
  209. shadowToggle.MouseLeave:Connect(function()
  210.     if shadowOn then
  211.         TweenService:Create(shadowToggle,TweenInfo.new(0.2,Enum.EasingStyle.Quad),{BackgroundColor3=Color3.fromRGB(0,150,255)}):Play()
  212.     else
  213.         TweenService:Create(shadowToggle,TweenInfo.new(0.2,Enum.EasingStyle.Quad),{BackgroundColor3=Color3.fromRGB(80,80,80)}):Play()
  214.     end
  215. end)
  216.  
  217. --// Sky Data
  218. local selectedSky = nil
  219.  
  220. --// Get all Sky objects
  221. local function getAllSkies()
  222.     local skies = {}
  223.     for _, obj in pairs(Lighting:GetChildren()) do
  224.         if obj:IsA("Sky") then
  225.             table.insert(skies, obj)
  226.         end
  227.     end
  228.     return skies
  229. end
  230.  
  231. --// Create Sky Button
  232. local function createSkyButton(skyObj)
  233.     local btn = Instance.new("Frame")
  234.     btn.Size = UDim2.new(0,130,0,150)
  235.     btn.BackgroundColor3 = Color3.fromRGB(50,50,50)
  236.     btn.BorderSizePixel = 0
  237.     btn.Parent = scrollingFrame
  238.  
  239.     local btnUICorner = Instance.new("UICorner")
  240.     btnUICorner.CornerRadius = UDim.new(0,10)
  241.     btnUICorner.Parent = btn
  242.  
  243.     -- Preview Image lebih kecil dari frame
  244.     local img = Instance.new("ImageLabel")
  245.     img.Size = UDim2.new(1,-20,0,100)
  246.     img.Position = UDim2.new(0,10,0,10)
  247.     img.BackgroundTransparency = 1
  248.     img.Image = skyObj.SkyboxBk or ""
  249.     img.Parent = btn
  250.  
  251.     -- Sky Name
  252.     local nameLabel = Instance.new("TextLabel")
  253.     nameLabel.Size = UDim2.new(1,-20,0,20)
  254.     nameLabel.Position = UDim2.new(0,10,0,115)
  255.     nameLabel.BackgroundTransparency = 1
  256.     nameLabel.Text = skyObj.Name
  257.     nameLabel.TextColor3 = Color3.fromRGB(255,255,255)
  258.     nameLabel.Font = Enum.Font.Gotham
  259.     nameLabel.TextSize = 16
  260.     nameLabel.TextXAlignment = Enum.TextXAlignment.Center
  261.     nameLabel.Parent = btn
  262.  
  263.     -- Selected sky glow
  264.     local glow = Instance.new("UIStroke")
  265.     glow.Thickness = 3
  266.     glow.Color = Color3.fromRGB(50,150,255)
  267.     glow.Transparency = 1
  268.     glow.Parent = btn
  269.  
  270.     -- Hover effect
  271.     local hoverTween = TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
  272.     local hoverUp = TweenService:Create(img, hoverTween, {Size=UDim2.new(1,-20,0,110)})
  273.     local hoverDown = TweenService:Create(img, hoverTween, {Size=UDim2.new(1,-20,0,100)})
  274.  
  275.     local clickBtn = Instance.new("TextButton")
  276.     clickBtn.Size = UDim2.new(1,0,1,0)
  277.     clickBtn.BackgroundTransparency = 1
  278.     clickBtn.Text = ""
  279.     clickBtn.Parent = btn
  280.  
  281.     clickBtn.MouseEnter:Connect(function()
  282.         hoverUp:Play()
  283.     end)
  284.     clickBtn.MouseLeave:Connect(function()
  285.         hoverDown:Play()
  286.     end)
  287.     clickBtn.MouseButton1Click:Connect(function()
  288.         -- Reset semua glow
  289.         for _, b in pairs(scrollingFrame:GetChildren()) do
  290.             if b:IsA("Frame") and b:FindFirstChild("UIStroke") then
  291.                 b.UIStroke.Transparency = 1
  292.             end
  293.         end
  294.         glow.Transparency = 0
  295.         selectedSky = skyObj
  296.     end)
  297. end
  298.  
  299. -- Buat semua tombol Sky
  300. for _, sky in pairs(getAllSkies()) do
  301.     createSkyButton(sky)
  302. end
  303.  
  304. -- Update CanvasSize
  305. local function updateCanvasSize()
  306.     scrollingFrame.CanvasSize = UDim2.new(0, listLayout.AbsoluteContentSize.X,0,0)
  307. end
  308. updateCanvasSize()
  309. listLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(updateCanvasSize)
  310.  
  311. -- Apply Button
  312. applyBtn.MouseButton1Click:Connect(function()
  313.     if selectedSky then
  314.         for _, obj in pairs(Lighting:GetChildren()) do
  315.             if obj:IsA("Sky") then obj:Destroy() end
  316.         end
  317.         local newSky = selectedSky:Clone()
  318.         newSky.Parent = Lighting
  319.         newSky.Name = selectedSky.Name
  320.     end
  321. end)
  322.  
  323. -- Toggle Menu
  324. toggleBtn.MouseButton1Click:Connect(function()
  325.     mainFrame.Visible = not mainFrame.Visible
  326. end)
Advertisement
Add Comment
Please, Sign In to add comment