Skip to content

Documentation

7GrandDad edited this page Jul 30, 2023 · 28 revisions

Getting Started

The main basics in the top of your script should be this

shared.VapeIndependent = true
shared.CustomSaveVape = "name of file to save"
local GuiLibrary = loadstring(game:HttpGet("https://raw.githubusercontent.com/7GrandDadPGN/VapeV4ForRoblox/main/NewMainScript.lua", true))()

This will get the library that vape is made from when you execute vape.

All objects are stored in a table called ObjectsThatCanBeSaved to make saving and loading easier

This table will have everything, tabs, buttons, toggles, etc

GuiLibrary.ObjectsThatCanBeSaved

From this point we will move on to creating modules

Creating Modules

In the script we have tabs like Combat, Blatant, etc. Getting tabs is done by going through ObjectsThatCanBeSaved

local Combat = GuiLibrary.ObjectsThatCanBeSaved.CombatWindow.Api
local Blatant = GuiLibrary.ObjectsThatCanBeSaved.BlatantWindow.Api
local Render = GuiLibrary.ObjectsThatCanBeSaved.RenderWindow.Api
local Utility = GuiLibrary.ObjectsThatCanBeSaved.UtilityWindow.Api
local World = GuiLibrary.ObjectsThatCanBeSaved.WorldWindow.Api

Now that we have got the tabs its time to create buttons Creating stuff is done using tables

local ESP = Render.CreateOptionsButton({
    Name = "ESP", -- name of object
    Function = function(callback) -- function that is called when toggled
        if callback then
            print("enabled")
        else
            print("disabled")
        end
    end,
    HoverText = "Placeholder", -- text that will show up after hovering over the button (optional)
    Default = true, -- enabled on startup (optional)
    ExtraText = function() return " Placeholder" end -- text that goes next to the button in Text GUI (optional)
})

Creating options inside buttons is the same as doing it in tabs Here is a list of options you can put in modules.

Slider

ESP.CreateSlider({
    Name = "Slider1", -- name of object
    Min = 0,
    Max = 100,
    Function = function(val) -- function that is called when the slider changes
        print(val)
    end,
    HoverText = "Placeholder", -- text that will show up after hovering over the button (optional)
    Default = 50, -- default value (optional)
    Double = 10 -- decimal formatting, to get the value do val / amount (10)
})

ColorSlider

ESP.CreateColorSlider({
    Name = "Slider1", -- name of object
    HoverText = "Placeholder", -- text that will show up after hovering over the button (optional)
    Function = function(val) -- function that is called when the slider changes
        print(val)
    end
})

Toggle

ESP.CreateToggle({
    Name = "Toggle1", -- name of object
    HoverText = "Placeholder", -- text that will show up after hovering over the button (optional)
    Function = function(callback) -- function that is called when toggled
        if callback then
            print("Toggle Enabled")
        else
            print("Toggle Disabled")
        end
    end,
    Default = true -- Value upon launch (optional)
})

Dropdown

ESP.CreateDropdown({
	Name = "Mode", -- name of object
	List = {"apple", "banana"}, -- list of strings to choose from
	Function = function(val) -- function that is called when you choose a string
            print(val)
	end
})

TextList

ESP.CreateTextList({
	Name = "TextList1", -- name of the object
	TempText = "Placeholder", -- text that is shown
	AddFunction = function(val) -- called when a entry is added (optional)
		print("Added : ", val)
    	end,
   	RemoveFunction = function(val) -- called when a entry is removed (optional)
    	   print("Removed : ", val)
   	end,
   	CustomFunction = function(obj, val) -- called when the entry is finished rendering so you can add custom rendering (optional)
   	    print("Finished Rendering : ", obj, " : ", val)
   	end
})

CustomWindow

local overlay = GuiLibrary.CreateCustomWindow({
	Name = "Overlay", 
	Icon = "vape/assets/TargetIcon1.png", -- currently you have to use vape assets for icons, this may change in the future
	IconSize = 16 -- size in width to not look ugly
})
overlay.Bypass = true -- making the window position save properly
--overlay.SetVisible(true) -- not a toggle, pass in true or false
-- you can put objects in
-- overlay.GetCustomChildren()

Things like toggling buttons and what not can be done like this.

 -- button name + OptionsButton
 -- button can be a var, else you use GuiLibrary.ObjectsThatCanBeSaved.ESPOptionsButton.Api to get objects outside your code.
button.ToggleButton(false) -- toggles button
button.SetKeybind("KeyCode in text, example LeftShift") -- sets keybind
GuiLibrary.ObjectsThatCanBeSaved.ESPOptionsButton.Object -- gets the object of the button for customization and what not

Finally you put this flag at the end for saving to be handled automatically.

shared.VapeManualLoad = true

If you need more help, contact vaperoblox on discord.

Clone this wiki locally