Advertisement
hacimiks

SERO W SILENT AIM (PC)

Apr 9th, 2024 (edited)
469
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.00 KB | None | 0 0
  1. --NOTE:
  2. -- THIS SCRIPT IS MEANT TO BE READ IN ORDER TO TEACH HOW TO USE THE LIBRBARY.
  3. -- THIS MEANS SOME TOGGLES MAY CHANGE THE VALUES OF OTHER ELEMENTS ON THE UI
  4. -- THESE AREN'T BUGS, THEY'RE JUST SHOWING YOU HOW TO DO THINGS
  5.  
  6. local UI = loadstring(game:HttpGet("https://raw.githubusercontent.com/cueshut/saves/main/compact"))()
  7. UI = UI.init("Showcase", "v1.0.0", "SHOWCASE")
  8.  
  9. local AimOne, AimTwo = UI:AddTab("Aim", "Silent Aim") do
  10. local Section = AimOne:AddSeperator("Silent Aim") do
  11. local masterToggle = Section:AddToggle({
  12. title = "Enabled",
  13. desc = "This is a small tip which will appear when the user hovers over this toggle. It works on all elements",
  14. callback = function(state)
  15. print("Toggled: ", state)
  16. end
  17. })
  18.  
  19. local fovToggle, fovColor
  20. fovToggle, fovColor = Section:AddToggle({
  21. title = "Display field of view",
  22. checked = true,
  23. callback = function(state)
  24. print("FOV display toggled", state)
  25. print("FOV color", fovToggle.colorpicker.getColor(), fovColor.getColor())
  26. print("silent aim enabled", masterToggle.getToggled())
  27.  
  28. fovColor.setColor(Color3.new(0,1,0))
  29. end,
  30. colorpicker = {
  31. default = Color3.new(0,0.5,1),
  32. callback = function(color)
  33. print("New FOV color selected: ", color)
  34. end
  35. }
  36. })
  37.  
  38.  
  39. local slider = Section:AddSlider({
  40. title = "Field of view",
  41. values = {min=0,max=250,default=50},
  42. callback = function(set)
  43. print("FOV has been set to: ", set)
  44. end,
  45. })
  46.  
  47. Section:AddToggle({
  48. title = "Test slider return",
  49. callback = function()
  50. print(slider.getValue())
  51. slider.setPercent(0.8) --DESPITE "setPercent" IT EXPECTS VALUE 0-1. 80% of 250
  52. wait(3)
  53. slider.setValue(75) --set literally to 75
  54. end
  55. })
  56.  
  57. local bodyparts = { "Head", "Torso", "Left Arm", "Right Arm", "Left Leg", "Right Arm" }
  58. local selection = Section:AddSelection({
  59. title = "Bodyparts",
  60. options = bodyparts,
  61. callback = function(selected)
  62. print("Selected the following:")
  63. for _,i in pairs(selected) do print(" -", bodyparts[i]) end
  64. end
  65. })
  66.  
  67. Section:AddToggle({
  68. title = "Test selection",
  69. callback = function()
  70. print("Currently selected: ")
  71. for _,i in pairs(selection.getSelected()) do print(" -", i) end
  72. selection.setDropdownExpanded(true)
  73. wait(1)
  74. selection.setSelected({1,2,5}) --head, torso, left leg
  75. wait(2)
  76. selection.setOptions({"carrot", "rhubarb", "olive"})
  77.  
  78. end
  79. })
  80. end
  81. local Section = AimTwo:AddSeperator("Tuning") do
  82.    Section:AddToggle({
  83.        title = "Do tuning"
  84.    })
  85.  
  86. local fruit = {"lime", "lemon", "mango", "nut"}
  87. local dropdown = Section:AddDropdown({
  88. title = "Demonstrative dropdown",
  89. options = fruit,
  90. callback = function(selected, actual) --selected = the index of the item in the "options" list. Actual = its actual text
  91. print(selected, fruit[selected], actual)
  92. end
  93. })
  94.  
  95. Section:AddToggle({
  96. title = "Test dropdown",
  97. callback = function()
  98. print("Selected", dropdown.getSelected())
  99. dropdown.setDropdownExpanded(true)
  100. wait(1)
  101. dropdown.setSelected(3) --mango
  102. wait(2)
  103. dropdown.setOptions({"carrot", "rhubarb", "olive"})
  104.  
  105. end
  106. })
  107. end
  108. end
  109. local TabTwo = UI:AddTab("Second tab", "some other things")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement