C00lkidd27

Skybox Changer

Oct 19th, 2024
8,409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.80 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local SpeedGui = Instance.new("ScreenGui")
  7. local Frame = Instance.new("Frame")
  8. local UICorner = Instance.new("UICorner")
  9. local UIGradient = Instance.new("UIGradient")
  10. local SpeedBox = Instance.new("TextBox")
  11. local ConfirmButton = Instance.new("TextButton")
  12. local UICorner_2 = Instance.new("UICorner")
  13. local UIGradient_2 = Instance.new("UIGradient")
  14. local TextLabel = Instance.new("TextLabel")
  15.  
  16. -- Properties:
  17.  
  18. SpeedGui.Name = "SpeedGui"
  19. SpeedGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  20. SpeedGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  21.  
  22. Frame.Parent = SpeedGui
  23. Frame.BackgroundColor3 = Color3.fromRGB(43, 43, 43)
  24. Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
  25. Frame.BorderSizePixel = 0
  26. Frame.Position = UDim2.new(0.266396761, 0, 0.0960629955, 0)
  27. Frame.Size = UDim2.new(0, 500, 0, 432)
  28.  
  29. UICorner.Parent = Frame
  30.  
  31. UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 0, 4)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(255, 0, 4))}
  32. UIGradient.Parent = Frame
  33.  
  34. SpeedBox.Name = "SpeedBox"
  35. SpeedBox.Parent = Frame
  36. SpeedBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  37. SpeedBox.BorderColor3 = Color3.fromRGB(0, 0, 0)
  38. SpeedBox.BorderSizePixel = 0
  39. SpeedBox.Position = UDim2.new(0.334707767, 0, 0.425260812, 0)
  40. SpeedBox.Size = UDim2.new(0, 200, 0, 50)
  41. SpeedBox.Font = Enum.Font.SourceSans
  42. SpeedBox.Text = ""
  43. SpeedBox.PlaceholderText = "Decal ID gir"
  44. SpeedBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  45. SpeedBox.TextSize = 14.000
  46.  
  47. ConfirmButton.Name = "ConfirmButton"
  48. ConfirmButton.Parent = Frame
  49. ConfirmButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  50. ConfirmButton.BorderColor3 = Color3.fromRGB(0, 0, 0)
  51. ConfirmButton.BorderSizePixel = 0
  52. ConfirmButton.Position = UDim2.new(0.226999998, 0, 0.694148183, 0)
  53. ConfirmButton.Size = UDim2.new(0, 309, 0, 56)
  54. ConfirmButton.Font = Enum.Font.Unknown
  55. ConfirmButton.Text = "Confirm"
  56. ConfirmButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  57. ConfirmButton.TextScaled = true
  58. ConfirmButton.TextSize = 14.000
  59. ConfirmButton.TextWrapped = true
  60.  
  61. UICorner_2.Parent = ConfirmButton
  62.  
  63. UIGradient_2.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(157, 255, 0)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(157, 255, 0))}
  64. UIGradient_2.Parent = ConfirmButton
  65.  
  66. TextLabel.Parent = Frame
  67. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  68. TextLabel.BackgroundTransparency = 1.000
  69. TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  70. TextLabel.BorderSizePixel = 0
  71. TextLabel.Position = UDim2.new(0.064000003, 0, 0.020833334, 0)
  72. TextLabel.Size = UDim2.new(0, 449, 0, 50)
  73. TextLabel.Font = Enum.Font.Unknown
  74. TextLabel.Text = "Rip_BinosBey Skybox Changer"
  75. TextLabel.TextColor3 = Color3.fromRGB(0, 213, 206)
  76. TextLabel.TextScaled = true
  77. TextLabel.TextSize = 14.000
  78. TextLabel.TextWrapped = true
  79.  
  80. -- Lua Script to change skybox:
  81.  
  82. -- Get the player and their character
  83. local player = game.Players.LocalPlayer
  84.  
  85. -- Handle button click to change the skybox
  86. ConfirmButton.MouseButton1Click:Connect(function()
  87. local decalID = SpeedBox.Text -- Get the Decal ID from the TextBox
  88. if decalID and decalID ~= "" then
  89. -- Create a new Sky instance if it doesn't exist
  90. local sky = game.Lighting:FindFirstChildOfClass("Sky")
  91. if not sky then
  92. sky = Instance.new("Sky", game.Lighting)
  93. end
  94.  
  95. -- Apply the Decal ID to Skybox textures
  96. local decalUrl = "rbxassetid://"..decalID
  97. sky.SkyboxBk = decalUrl
  98. sky.SkyboxDn = decalUrl
  99. sky.SkyboxFt = decalUrl
  100. sky.SkyboxLf = decalUrl
  101. sky.SkyboxRt = decalUrl
  102. sky.SkyboxUp = decalUrl
  103.  
  104. print("Skybox değiştirildi: " .. decalID)
  105. else
  106. warn("Geçersiz Decal ID")
  107. end
  108. end)
  109.  
  110.  
  111.  
Advertisement
Add Comment
Please, Sign In to add comment