0% found this document useful (0 votes)
6 views3 pages

Message

The document outlines the creation of a GUI for a weapon inserter in a game, featuring a main frame, title, subtitle, text box for weapon ID input, and a submit button. It includes functionality for adding weapons to the player's inventory and provides user feedback for successful or erroneous inputs. Additionally, it incorporates an RGB border effect and animations to enhance the visual appeal of the interface.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Message

The document outlines the creation of a GUI for a weapon inserter in a game, featuring a main frame, title, subtitle, text box for weapon ID input, and a submit button. It includes functionality for adding weapons to the player's inventory and provides user feedback for successful or erroneous inputs. Additionally, it incorporates an RGB border effect and animations to enhance the visual appeal of the interface.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

-- Create GUI

local ScreenGui = Instance.new("ScreenGui")


local MainFrame = Instance.new("Frame")
local UICorner = Instance.new("UICorner")
local Title = Instance.new("TextLabel")
local Subtitle = Instance.new("TextLabel") -- New Subtitle Text
local WeaponIDTextBox = Instance.new("TextBox") -- TextBox for inputting weapon ID
local SubmitButton = Instance.new("TextButton") -- Submit button to confirm input
local InfoText = Instance.new("TextLabel")
local BorderFrame = Instance.new("Frame") -- The frame for the RGB border effect
local UIStroke = Instance.new("UIStroke") -- Adding a stroke for RGB effect
local Line = Instance.new("Frame") -- Grey transparent line after title

-- Parent GUI to CoreGui


ScreenGui.Parent = game.CoreGui

-- Main Frame (smaller and draggable)


MainFrame.Parent = ScreenGui
MainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
MainFrame.Size = UDim2.new(0, 350, 0, 180) -- Adjusted size for new content
MainFrame.Position = UDim2.new(0.5, -175, 0.5, -90)
MainFrame.BorderSizePixel = 0
MainFrame.Active = true
MainFrame.Draggable = true

UICorner.Parent = MainFrame -- Rounded corners

-- Title (changed to Huge Hunter and font style adjusted)


Title.Parent = MainFrame
Title.Text = "Weapon Inserter"
Title.Size = UDim2.new(1, 0, 0, 30)
Title.TextColor3 = Color3.fromRGB(255, 255, 255)
Title.BackgroundTransparency = 1
Title.Font = Enum.Font.GothamBold -- Changed font style to "GothamBold"
Title.TextSize = 24 -- Adjusted font size

-- Add a larger gap between title and subtitle


Subtitle.Parent = MainFrame
Subtitle.Text = "Insert Weapon ID to Add to Inventory"
Subtitle.Size = UDim2.new(1, 0, 0, 25)
Subtitle.Position = UDim2.new(0, 0, 0.25, 0) -- Keep the subtitle at the same
position
Subtitle.TextColor3 = Color3.fromRGB(255, 255, 255)
Subtitle.BackgroundTransparency = 1
Subtitle.Font = Enum.Font.SourceSansBold
Subtitle.TextSize = 18 -- Increased font size

-- Move grey transparent line up but keep subtitle as is


Line.Parent = MainFrame
Line.Size = UDim2.new(1, 0, 0, 2) -- Thin line
Line.Position = UDim2.new(0, 0, 0.2, 0) -- Moved line up above subtitle
Line.BackgroundColor3 = Color3.fromRGB(169, 169, 169) -- Grey color
Line.BackgroundTransparency = 0.7 -- Slight transparency

-- Weapon ID TextBox for input


WeaponIDTextBox.Parent = MainFrame
WeaponIDTextBox.Text = ""
WeaponIDTextBox.PlaceholderText = "Enter Weapon ID (e.g., TravelerAxe)"
WeaponIDTextBox.Size = UDim2.new(0.8, 0, 0, 40)
WeaponIDTextBox.Position = UDim2.new(0.1, 0, 0.45, 0)
WeaponIDTextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
WeaponIDTextBox.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
WeaponIDTextBox.Font = Enum.Font.SourceSansBold
WeaponIDTextBox.TextSize = 18

-- Submit Button to confirm the weapon ID


SubmitButton.Parent = MainFrame
SubmitButton.Text = "Submit Weapon ID"
SubmitButton.Size = UDim2.new(0.8, 0, 0, 40)
SubmitButton.Position = UDim2.new(0.1, 0, 0.60, 0)
SubmitButton.TextColor3 = Color3.fromRGB(255, 255, 255)
SubmitButton.BackgroundColor3 = Color3.fromRGB(0, 128, 255) -- Initial color is
blue
SubmitButton.Font = Enum.Font.SourceSansBold
SubmitButton.TextSize = 18

-- Add rounded corners to the button, just like the main GUI
local buttonUICorner = Instance.new("UICorner")
buttonUICorner.Parent = SubmitButton

-- Info Text (Created By)


InfoText.Parent = MainFrame
InfoText.Text = "V6.02.5 | Made By Blox Zilla"
InfoText.Size = UDim2.new(1, 0, 0, 20)
InfoText.Position = UDim2.new(0, 0, 0.80, 0)
InfoText.TextColor3 = Color3.fromRGB(255, 255, 0)
InfoText.BackgroundTransparency = 1
InfoText.Font = Enum.Font.SourceSansBold
InfoText.TextSize = 14

-- Create a border with RGB lighting effect


BorderFrame.Parent = MainFrame
BorderFrame.Size = UDim2.new(1, 0, 1, 0) -- Border same size as MainFrame
BorderFrame.Position = UDim2.new(0, 0, 0, 0)
BorderFrame.BackgroundTransparency = 1

UIStroke.Parent = BorderFrame
UIStroke.Thickness = 5
UIStroke.Color = Color3.fromRGB(255, 0, 0) -- Initial color for the border
UIStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
UICorner.Parent = BorderFrame -- Rounded border edges

-- RGB color change effect on the border


local function changeBorderColor()
while true do
for i = 0, 1, 0.02 do -- Faster color change (lower step size for quicker
transitions)
UIStroke.Color = Color3.fromHSV(i, 1, 1)
wait(0.03) -- Faster change in colors
end
end
end

-- Start the RGB animation in a separate thread


spawn(changeBorderColor)

-- Function to add the weapon to the player's inventory


local function addWeaponToInventory(weaponId)
-- Assuming PlayerData and Weapons are correctly set up in your game
local Player = game.Players.LocalPlayer
local PlayerData = Player:WaitForChild("PlayerData")
local pw = PlayerData:WaitForChild("Weapons")

pw.Owned = pw.Owned or {}
pw.Owned[weaponId] = pw.Owned[weaponId] or 0
pw.Owned[weaponId] = pw.Owned[weaponId] + 1
end

-- Submit Button Click Function


SubmitButton.MouseButton1Click:Connect(function()
local weaponId = WeaponIDTextBox.Text

if weaponId == "" then


-- Provide a simple feedback to the user if no weapon ID is entered
WeaponIDTextBox.Text = "Please enter a valid weapon ID!"
WeaponIDTextBox.TextColor3 = Color3.fromRGB(255, 0, 0) -- Red text for
error
wait(2)
WeaponIDTextBox.Text = ""
WeaponIDTextBox.TextColor3 = Color3.fromRGB(255, 255, 255) -- Reset to
white text
else
-- Add the weapon to the inventory and provide success feedback
addWeaponToInventory(weaponId)
WeaponIDTextBox.Text = "Weapon '" .. weaponId .. "' added to inventory!"
WeaponIDTextBox.TextColor3 = Color3.fromRGB(0, 255, 0) -- Green text for
success
wait(2)
WeaponIDTextBox.Text = "" -- Clear the text box after showing the success
message
end
end)

print("Weapon Inserter GUI Loaded!")

You might also like