0% found this document useful (0 votes)
886 views4 pages

Roblox Script GUI Setup

This document contains code for creating a GUI interface in Roblox with various buttons and functions. It includes code to: - Create instances like frames, buttons, and labels for the GUI - Set properties like names, parents, positions and colors for the GUI elements - Add scripts to buttons to toggle features like a hitbox modifier and bunny hopping on/off - Add a script to minimize/maximize the GUI frame when clicking a button - Add a script to allow dragging and repositioning of the GUI frame - Add a script to toggle the visibility of the GUI using a keyboard shortcut.

Uploaded by

Luca Sult
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)
886 views4 pages

Roblox Script GUI Setup

This document contains code for creating a GUI interface in Roblox with various buttons and functions. It includes code to: - Create instances like frames, buttons, and labels for the GUI - Set properties like names, parents, positions and colors for the GUI elements - Add scripts to buttons to toggle features like a hitbox modifier and bunny hopping on/off - Add a script to minimize/maximize the GUI frame when clicking a button - Add a script to allow dragging and repositioning of the GUI frame - Add a script to toggle the visibility of the GUI using a keyboard shortcut.

Uploaded by

Luca Sult
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/ 4

-- Instances:

local HeraScript = Instance.new("ScreenGui")


local TopBg = Instance.new("Frame")
local UIGradient = Instance.new("UIGradient")
local Body = Instance.new("Frame")
local UIGradient_2 = Instance.new("UIGradient")
local HitBox = Instance.new("TextButton")
local UICorner = Instance.new("UICorner")
local BHop = Instance.new("TextButton")
local UICorner_2 = Instance.new("UICorner")
local minimize = Instance.new("ImageButton")
local TextLabel = Instance.new("TextLabel")

--Properties:

HeraScript.Name = "HeraScript"
HeraScript.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
HeraScript.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
HeraScript.ResetOnSpawn = false

TopBg.Name = "TopBg"
TopBg.Parent = HeraScript
TopBg.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
TopBg.BorderColor3 = Color3.fromRGB(27, 42, 53)
TopBg.BorderSizePixel = 0
TopBg.Position = UDim2.new(0.267471403, 0, 0.242474914, 0)
TopBg.Size = UDim2.new(0, 142, 0, 21)

UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00,
Color3.fromRGB(137, 0, 254)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(223,
0, 255))}
UIGradient.Parent = TopBg

Body.Name = "Body"
Body.Parent = TopBg
Body.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Body.BorderColor3 = Color3.fromRGB(27, 42, 53)
Body.BorderSizePixel = 0
Body.Position = UDim2.new(0, 0, 0.976190448, 0)
Body.Size = UDim2.new(0, 142, 0, 66)

UIGradient_2.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00,
Color3.fromRGB(55, 0, 103)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(223, 0,
255))}
UIGradient_2.Parent = Body

HitBox.Name = "HitBox"
HitBox.Parent = Body
HitBox.BackgroundColor3 = Color3.fromRGB(43, 41, 83)
HitBox.BackgroundTransparency = 0.250
HitBox.BorderSizePixel = 0
HitBox.Position = UDim2.new(0, 0, 0.0799999982, 0)
HitBox.Size = UDim2.new(0, 142, 0, 24)
HitBox.Font = Enum.Font.SourceSansBold
HitBox.Text = "HitBox: OFF"
HitBox.TextColor3 = Color3.fromRGB(255, 98, 140)
HitBox.TextSize = 14.000
UICorner.CornerRadius = UDim.new(1, 8)
UICorner.Parent = HitBox

BHop.Name = "BHop"
BHop.Parent = Body
BHop.BackgroundColor3 = Color3.fromRGB(43, 41, 83)
BHop.BackgroundTransparency = 0.250
BHop.BorderSizePixel = 0
BHop.Position = UDim2.new(0, 0, 0.5, 0)
BHop.Size = UDim2.new(0, 142, 0, 24)
BHop.Font = Enum.Font.SourceSansBold
BHop.Text = "BHop: OFF"
BHop.TextColor3 = Color3.fromRGB(255, 98, 140)
BHop.TextSize = 14.000

UICorner_2.CornerRadius = UDim.new(1, 8)
UICorner_2.Parent = BHop

minimize.Name = "minimize"
minimize.Parent = TopBg
minimize.BackgroundTransparency = 1.000
minimize.Position = UDim2.new(0.823943675, 0, -0.119047642, 0)
minimize.Size = UDim2.new(0, 25, 0, 25)
minimize.ZIndex = 2
minimize.Image = "rbxassetid://3926307971"
minimize.ImageRectOffset = Vector2.new(164, 484)
minimize.ImageRectSize = Vector2.new(36, 36)

TextLabel.Parent = TopBg
TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
TextLabel.BackgroundTransparency = 1.000
TextLabel.BorderSizePixel = 0
TextLabel.Size = UDim2.new(0, 142, 0, 20)
TextLabel.Font = Enum.Font.SourceSansBold
TextLabel.Text = "Critical Strike"
TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
TextLabel.TextSize = 15.000

-- Scripts:

local function JYYCNA_fake_script() -- HitBox.HitBox


local script = Instance.new('LocalScript', HitBox)

_G.HeadSize = 20
_G.Hitboxes = false
script.Parent.MouseButton1Click:Connect(function()
if _G.Hitboxes == false then
_G.Hitboxes = true
script.Parent.TextColor3 = Color3.fromRGB(67, 241, 41)
script.Parent.Text = "HitBox: ON"
_G.HitBox = game:GetService('RunService').RenderStepped:connect(function()
for i,v in next, game:GetService('Players'):GetPlayers() do
if v.Name ~= game:GetService('Players').LocalPlayer.Name then
pcall(function()
v.Character.HumanoidRootPart.Size =
Vector3.new(_G.HeadSize,_G.HeadSize,_G.HeadSize)
v.Character.HumanoidRootPart.Transparency = 0.7
v.Character.HumanoidRootPart.BrickColor = BrickColor.new(123, 0, 123)
v.Character.HumanoidRootPart.Material = "Smooth Plastic"
v.Character.HumanoidRootPart.CanCollide = false
end)
end
end
end)
else
_G.Hitboxes = false
_G.HitBox:Disconnect()
script.Parent.TextColor3 = Color3.fromRGB(255, 98, 140)
script.Parent.Text = "HitBox: OFF"
end
end)
end
coroutine.wrap(JYYCNA_fake_script)()
local function STQTRU_fake_script() -- BHop.BHOP
local script = Instance.new('LocalScript', BHop)

_G.BHop = false
script.Parent.MouseButton1Click:Connect(function()
if _G.BHop == false then
_G.BHop = true
script.Parent.TextColor3 = Color3.fromRGB(67, 241, 41)
script.Parent.Text = "BHop: ON"
_G.Bhopping = game:GetService('RunService').Stepped:Connect(function()
game:GetService("Players").LocalPlayer.Character.AntiBhopScript:Destroy()
wait()
end)
else
_G.BHop = false
_G.Bhopping:Disconnect()
script.Parent.TextColor3 = Color3.fromRGB(255, 98, 140)
script.Parent.Text = "BHop: OFF"
end
end)
end
coroutine.wrap(STQTRU_fake_script)()
local function MEJDD_fake_script() -- minimize.LocalScript
local script = Instance.new('LocalScript', minimize)

script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Body.Visible = not script.Parent.Parent.Body.Visible
end)
end
coroutine.wrap(MEJDD_fake_script)()
local function MOCSGR_fake_script() -- TopBg.Drag
local script = Instance.new('LocalScript', TopBg)

local UserInputService = game:GetService("UserInputService")


local gui = script.Parent
local dragging
local dragInput
local dragStart
local startPos

local function update(input)


local delta = input.Position - dragStart
gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X,
startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
gui.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType ==
Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = gui.Position

input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)

gui.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType
== Enum.UserInputType.Touch then
dragInput = input
end
end)

UserInputService.InputChanged:Connect(function(input)
if input == dragInput and dragging then
update(input)
end
end)
end
coroutine.wrap(MOCSGR_fake_script)()
local function UHKRX_fake_script() -- TopBg.ToggleUI
local script = Instance.new('LocalScript', TopBg)

local UIS = game:GetService("UserInputService")


UIS.InputBegan:Connect(function(tecla,gameprocess)
if not gameprocess then
if tecla.KeyCode == Enum.KeyCode.RightShift then
script.Parent.Parent.TopBg.Visible = not script.Parent.Parent.TopBg.Visible
end
end
end)
end
coroutine.wrap(UHKRX_fake_script)()

You might also like