Advertisement
C-H-4-0-S

Settings

Apr 25th, 2024
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.82 KB | None | 0 0
  1. -- Create a ScreenGui
  2. local gui = Instance.new("ScreenGui")
  3. gui.Name = "CustomSettingsGui"
  4. gui.ResetOnSpawn = false
  5. gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  6.  
  7. -- Create a Frame for the GUI
  8. local frame = Instance.new("Frame")
  9. frame.Size = UDim2.new(0, 200, 0, 200)
  10. frame.Position = UDim2.new(0.5, -100, 0.5, -100)
  11. frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  12. frame.BorderSizePixel = 2
  13. frame.BorderColor3 = Color3.new(1, 0, 0) -- Initial border color (red)
  14. frame.Active = true
  15. frame.Draggable = true -- Make the frame draggable
  16.  
  17. -- Rainbow colors for the border
  18. local rainbowColors = {
  19. Color3.fromRGB(255, 0, 0), -- Red
  20. Color3.fromRGB(255, 165, 0), -- Orange
  21. Color3.fromRGB(255, 255, 0), -- Yellow
  22. Color3.fromRGB(0, 255, 0), -- Green
  23. Color3.fromRGB(0, 127, 255), -- Blue
  24. Color3.fromRGB(139, 0, 255) -- Purple
  25. }
  26.  
  27. -- Function to animate the border color
  28. local function animateBorderColor()
  29. while true do
  30. for _, color in ipairs(rainbowColors) do
  31. frame.BorderColor3 = color
  32. wait(0.1) -- Change color every 0.1 seconds
  33. end
  34. end
  35. end
  36.  
  37. -- Start the border color animation
  38. coroutine.wrap(animateBorderColor)()
  39.  
  40. -- Create TextBox for setting speed
  41. local speedTextBox = Instance.new("TextBox")
  42. speedTextBox.Size = UDim2.new(0, 150, 0, 30)
  43. speedTextBox.Position = UDim2.new(0.5, -75, 0.1, -15)
  44. speedTextBox.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
  45. speedTextBox.BorderSizePixel = 0
  46. speedTextBox.TextColor3 = Color3.new(1, 1, 1)
  47. speedTextBox.PlaceholderText = "Set Speed"
  48. speedTextBox.Parent = frame
  49.  
  50. -- Create TextBox for setting jump power
  51. local jumpPowerTextBox = Instance.new("TextBox")
  52. jumpPowerTextBox.Size = UDim2.new(0, 150, 0, 30)
  53. jumpPowerTextBox.Position = UDim2.new(0.5, -75, 0.3, -15)
  54. jumpPowerTextBox.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
  55. jumpPowerTextBox.BorderSizePixel = 0
  56. jumpPowerTextBox.TextColor3 = Color3.new(1, 1, 1)
  57. jumpPowerTextBox.PlaceholderText = "Set Jump Power"
  58. jumpPowerTextBox.Parent = frame
  59.  
  60. -- Create TextBox for setting gravity
  61. local gravityTextBox = Instance.new("TextBox")
  62. gravityTextBox.Size = UDim2.new(0, 150, 0, 30)
  63. gravityTextBox.Position = UDim2.new(0.5, -75, 0.5, -15)
  64. gravityTextBox.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
  65. gravityTextBox.BorderSizePixel = 0
  66. gravityTextBox.TextColor3 = Color3.new(1, 1, 1)
  67. gravityTextBox.PlaceholderText = "Set Gravity"
  68. gravityTextBox.Parent = frame
  69.  
  70. -- Create TextBox for setting density
  71. local densityTextBox = Instance.new("TextBox")
  72. densityTextBox.Size = UDim2.new(0, 150, 0, 30)
  73. densityTextBox.Position = UDim2.new(0.5, -75, 0.7, -15)
  74. densityTextBox.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
  75. densityTextBox.BorderSizePixel = 0
  76. densityTextBox.TextColor3 = Color3.new(1, 1, 1)
  77. densityTextBox.PlaceholderText = "Set Density"
  78. densityTextBox.Parent = frame
  79.  
  80. -- Create TextBox for executing Lua code
  81. local luaTextBox = Instance.new("TextBox")
  82. luaTextBox.Size = UDim2.new(0, 150, 0, 30)
  83. luaTextBox.Position = UDim2.new(0.5, -75, 0.9, -15)
  84. luaTextBox.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
  85. luaTextBox.BorderSizePixel = 0
  86. luaTextBox.TextColor3 = Color3.new(1, 1, 1)
  87. luaTextBox.PlaceholderText = "Execute Lua Code"
  88. luaTextBox.Parent = frame
  89.  
  90. frame.Parent = gui
  91.  
  92.  
  93. -- Function to update speed
  94. local function updateSpeed()
  95. local speed = tonumber(speedTextBox.Text)
  96. if speed then
  97. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = speed
  98. end
  99. end
  100.  
  101. -- Function to update jump power
  102. local function updateJumpPower()
  103. local jumpPower = tonumber(jumpPowerTextBox.Text)
  104. if jumpPower then
  105. game.Players.LocalPlayer.Character.Humanoid.JumpPower = jumpPower
  106. end
  107. end
  108.  
  109. -- Function to update gravity
  110. local function updateGravity()
  111. local gravity = tonumber(gravityTextBox.Text)
  112. if gravity then
  113. game.Workspace.Gravity = gravity
  114. end
  115. end
  116.  
  117. -- Function to update density
  118. local function updateDensity()
  119. local density = tonumber(densityTextBox.Text)
  120. if density then
  121. game.Workspace.Gravity = density
  122. end
  123. end
  124.  
  125. -- Function to execute Lua code
  126. local function executeLuaCode()
  127. local code = luaTextBox.Text
  128. local success, errorMsg = pcall(function()
  129. loadstring(code)()
  130. end)
  131. if not success then
  132. warn("Error executing Lua code:", errorMsg)
  133. end
  134. end
  135.  
  136. -- Listen for changes in speedTextBox
  137. speedTextBox.FocusLost:Connect(updateSpeed)
  138.  
  139. -- Listen for changes in jumpPowerTextBox
  140. jumpPowerTextBox.FocusLost:Connect(updateJumpPower)
  141.  
  142. -- Listen for changes in gravityTextBox
  143. gravityTextBox.FocusLost:Connect(updateGravity)
  144.  
  145. -- Listen for changes in densityTextBox
  146. densityTextBox.FocusLost:Connect(updateDensity)
  147.  
  148. -- Listen for changes in luaTextBox and execute Lua code
  149. luaTextBox.FocusLost:Connect(executeLuaCode)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement