Created
December 15, 2022 00:41
-
-
Save Melodi17/7bf302ea02c09d1996384922b17d2f97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local TweenService = game:GetService("TweenService") | |
local UserInputService = game:GetService("UserInputService") | |
local ReplicatedStorage = game:GetService("ReplicatedStorage") | |
local Chat = game:GetService("Chat") | |
local RunService = game:GetService("RunService") | |
local ScreenGui = Instance.new("ScreenGui") | |
local MainFrame = Instance.new("Frame") | |
local SearchFrame = Instance.new("Frame") | |
local SheetFrame = Instance.new("Frame") | |
local UICorner = Instance.new("UICorner") | |
local TextBox = Instance.new("TextBox") | |
local ResultFrame = Instance.new("Frame") | |
local UICorner_2 = Instance.new("UICorner") | |
local ScrollingFrame = Instance.new("ScrollingFrame") | |
local Items = Instance.new("Folder") | |
local Result = Instance.new("Frame") | |
local UICorner_3 = Instance.new("UICorner") | |
local ImageLabel = Instance.new("ImageLabel") | |
local UICorner_4 = Instance.new("UICorner") | |
local TextLabel = Instance.new("TextLabel") | |
local UIListLayout = Instance.new("UIListLayout") | |
ScreenGui.Name = "QuickBar" | |
ScreenGui.Parent = game.CoreGui | |
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling | |
MainFrame.Name = "MainFrame" | |
MainFrame.Parent = ScreenGui | |
MainFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
MainFrame.BackgroundTransparency = 1.000 | |
MainFrame.Position = UDim2.new(0.5, -250, 0.5, -100) | |
MainFrame.Size = UDim2.new(0, 500, 0, 320) | |
MainFrame.ZIndex = 0 | |
SearchFrame.Visible = false | |
SearchFrame.Name = "SearchFrame" | |
SearchFrame.Parent = MainFrame | |
SearchFrame.AnchorPoint = Vector2.new(0.5, 0) | |
SearchFrame.BackgroundColor3 = Color3.fromRGB(33, 33, 33) | |
SearchFrame.BackgroundTransparency = 0.250 | |
SearchFrame.Position = UDim2.new(0.5, 0, 0, 0) | |
SearchFrame.Size = UDim2.new(1, 0, 0, 60) | |
UICorner.CornerRadius = UDim.new(0, 17) | |
UICorner.Parent = SearchFrame | |
TextBox.Parent = SearchFrame | |
TextBox.AnchorPoint = Vector2.new(0.5, 0.5) | |
TextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
TextBox.BackgroundTransparency = 1.000 | |
TextBox.ClearTextOnFocus = false | |
TextBox.Position = UDim2.new(0.5, 0, 0.5, 0) | |
TextBox.Size = UDim2.new(1, -23, 1, -5) | |
TextBox.Font = Enum.Font.Roboto | |
TextBox.PlaceholderText = "Do anything..." | |
TextBox.Text = "" | |
TextBox.TextColor3 = Color3.fromRGB(255, 255, 255) | |
TextBox.TextSize = 25.000 | |
TextBox.TextXAlignment = Enum.TextXAlignment.Left | |
TextBox.TextTruncate = Enum.TextTruncate.AtEnd | |
ResultFrame.Visible = false | |
ResultFrame.Name = "ResultFrame" | |
ResultFrame.Parent = MainFrame | |
ResultFrame.AnchorPoint = Vector2.new(0.5, 0) | |
ResultFrame.BackgroundColor3 = Color3.fromRGB(33, 33, 33) | |
ResultFrame.BackgroundTransparency = 0.250 | |
ResultFrame.Position = UDim2.new(0.5, 0, 0, 70) | |
ResultFrame.Size = UDim2.new(1, 0, 0, 274) | |
UICorner_2.CornerRadius = UDim.new(0, 17) | |
UICorner_2.Parent = ResultFrame | |
ScrollingFrame.Parent = ResultFrame | |
ScrollingFrame.Active = true | |
ScrollingFrame.AnchorPoint = Vector2.new(0.5, 0.5) | |
ScrollingFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
ScrollingFrame.BackgroundTransparency = 1.000 | |
ScrollingFrame.Position = UDim2.new(0.5, 0, 0.5, 0) | |
ScrollingFrame.Size = UDim2.new(1, -17, 1, -17) | |
ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0.5, 0) | |
ScrollingFrame.ScrollBarThickness = 5 | |
Items.Name = "Items" | |
Items.Parent = ScrollingFrame | |
UIListLayout.Parent = Items | |
UIListLayout.SortOrder = Enum.SortOrder.Name | |
UIListLayout.Padding = UDim.new(0, 5) | |
local Blur = Instance.new("BlurEffect", game.Workspace.Camera) | |
Blur.Size = 0 | |
callbacks = {} | |
states = { | |
NoClipping = nil, | |
LightingDefaults = {abt = game.Lighting.Ambient, oabt = game.Lighting.OutdoorAmbient, brt = game.Lighting.Brightness, time = game.Lighting.ClockTime, fe = game.Lighting.FogEnd, fs = game.Lighting.FogStart, gs = game.Lighting.GlobalShadows}, | |
} | |
function destroyResults() | |
for _, v in pairs(Items:GetChildren()) do | |
if v:IsA("Frame") then | |
v:Destroy() | |
end | |
end | |
table.clear(callbacks) | |
end | |
function createResult(res) | |
local Result = Instance.new("Frame") | |
local UICorner_5 = Instance.new("UICorner") | |
local ImageLabel_2 = Instance.new("ImageLabel") | |
local UICorner_6 = Instance.new("UICorner") | |
local TextLabel_2 = Instance.new("TextLabel") | |
local TextLabel_3 = Instance.new("TextLabel") | |
local CallbackIdValue = Instance.new("NumberValue") | |
local PrefixValue = Instance.new("StringValue") | |
--Properties: | |
Result.Name = "Result" | |
Result.Parent = Items | |
Result.AnchorPoint = Vector2.new(0.5, 0) | |
Result.BackgroundColor3 = Color3.fromRGB(44, 44, 44) | |
Result.BackgroundTransparency = 0.250 | |
Result.Position = UDim2.new(0.5, 0, 0, 0) | |
Result.Size = UDim2.new(1, 0, 0, 60) | |
CallbackIdValue.Parent = Result | |
CallbackIdValue.Name = "CallbackIdValue" | |
CallbackIdValue.Value = #callbacks + 1 | |
callbacks[#callbacks + 1] = res.Callback | |
PrefixValue.Parent = Result | |
PrefixValue.Name = "PrefixValue" | |
PrefixValue.Value = res.Prefix or "" | |
UICorner_5.CornerRadius = UDim.new(0, 17) | |
UICorner_5.Parent = Result | |
ImageLabel_2.Parent = Result | |
ImageLabel_2.AnchorPoint = Vector2.new(0, 0.5) | |
ImageLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
ImageLabel_2.Position = UDim2.new(0, 0, 0.5, 0) | |
ImageLabel_2.Size = UDim2.new(0, 60, 0, 60) | |
if res.Icon then | |
ImageLabel_2.Image = "http://www.roblox.com/asset/?id=" .. res.Icon | |
end | |
UICorner_6.CornerRadius = UDim.new(0, 17) | |
UICorner_6.Parent = ImageLabel_2 | |
TextLabel_2.Parent = Result | |
TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
TextLabel_2.BackgroundTransparency = 1.000 | |
TextLabel_2.Position = UDim2.new(0.142857149, 0, 0.0833333358, 0) | |
TextLabel_2.Size = UDim2.new(0, 404, 0, 50) | |
TextLabel_2.Font = Enum.Font.Roboto | |
TextLabel_2.Text = res.Name | |
TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255) | |
TextLabel_2.TextSize = 20.000 | |
TextLabel_2.TextWrapped = false | |
TextLabel_2.TextXAlignment = Enum.TextXAlignment.Left | |
TextLabel_3.Name = "DescriptionLabel" | |
TextLabel_3.Parent = Result | |
TextLabel_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255) | |
TextLabel_3.BackgroundTransparency = 1.000 | |
TextLabel_3.Position = UDim2.new(0.142857149, 0, 0.0833333358, 18) | |
TextLabel_3.Size = UDim2.new(0, 404, 0, 50) | |
TextLabel_3.Font = Enum.Font.Roboto | |
TextLabel_3.Text = res.Description or "" | |
TextLabel_3.TextColor3 = Color3.fromRGB(200, 200, 200) | |
TextLabel_3.TextSize = 12.000 | |
TextLabel_3.TextWrapped = true | |
TextLabel_3.TextXAlignment = Enum.TextXAlignment.Left | |
TextLabel_3.TextTransparency = 1 | |
end | |
function setState(value) | |
if value == true then | |
TextBox.Text = '' | |
SearchFrame.Visible = true | |
end | |
local info = TweenInfo.new(0.1, Enum.EasingStyle.Linear) | |
local tween = TweenService:Create(SearchFrame, info, { | |
Transparency = (value and 0.25 or 1), | |
--Position = (value and UDim2.new(0.5, 0, 0, 0) or UDim2.new(0.5, 0, 0, 60)) | |
}) | |
local blurTween = TweenService:Create(Blur, info, {Size = value and 10 or 0}) | |
tween:Play() | |
blurTween:Play() | |
tween.Completed:Wait() | |
if value == false then SearchFrame.Visible = false end | |
if value then | |
TextBox:CaptureFocus() | |
else | |
TextBox:ReleaseFocus() | |
ResultFrame.Visible = false | |
destroyResults() | |
end | |
end | |
function starts(String,Start) | |
return string.sub(String,1,string.len(Start))==Start | |
end | |
function cs(String,start) | |
return starts(String:lower(), start) and String:sub(#start + 1) or String | |
end | |
function search(term) | |
local results = { | |
{ | |
Name = "Chat '" .. cs(cs(term, "!"), "chat ") .. "'", | |
SearchByName = "Chat", | |
Description = "Send chat message", | |
Prefix = "!", | |
Icon = "11588292999", | |
Callback = function(msg) | |
local chatEvents = ReplicatedStorage:FindFirstChild("DefaultChatSystemChatEvents") | |
if chatEvents then | |
local messageRequest = chatEvents:FindFirstChild("SayMessageRequest") | |
if messageRequest then | |
messageRequest:FireServer(cs(msg, "chat "), "All") | |
end | |
end | |
end, | |
}, | |
{ | |
Name = "Use '" .. cs(cs(term, "/"), "use ") .. "'", | |
SearchByName = "Use", | |
Description = "Attempts to download and loadstring the specified script", | |
Prefix = "/", | |
Icon = "11589165413", | |
Callback = function(msg) | |
local url = cs(msg, "use "):lower() | |
if not starts(url, "https://") then | |
url = "https://" .. url | |
end | |
loadstring(game:HttpGet(url))() | |
end, | |
}, | |
{ | |
Name = "Kick", | |
Description = "Kick yourself from the game", | |
Icon = "11588305429", | |
Callback = function(msg) | |
game.Players.LocalPlayer:Kick("Kicked by client") | |
end, | |
}, | |
{ | |
Name = "Exit", | |
Description = "Exit the game", | |
Icon = "11590860948", | |
Callback = function(msg) | |
game:shutdown() | |
end, | |
}, | |
{ | |
Name = "Game id '" .. game.GameId .. "'", | |
SearchByName = "Game id", | |
Description = "Copy game id to clipboard", | |
Icon = "11588319999", | |
Callback = function(msg) | |
setclipboard(game.GameId) | |
end, | |
}, | |
{ | |
Name = "Destroy", | |
Description = "Destroy this GUI", | |
Icon = "11588323886", | |
Callback = function(msg) | |
ScreenGui:Destroy() | |
end, | |
}, | |
--{ | |
-- Name = "Exploit", | |
-- Description = "Exploit the current game", | |
-- Icon = "11589176928", | |
-- Callback = function(msg) | |
-- print("Not developed") | |
-- end, | |
--}, | |
{ | |
Name = "NoClip", | |
Description = "Disables the player's ability to collide with objects", | |
Icon = "11590743630", | |
Callback = function(msg) | |
local function NoclipLoop() | |
for _, child in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do | |
if child:IsA("BasePart") and child.CanCollide == true then | |
child.CanCollide = false | |
end | |
end | |
end | |
states.NoClipping = RunService.Stepped:Connect(NoclipLoop) | |
end, | |
}, | |
{ | |
Name = "ReClip", | |
Description = "Re-Enables the player's ability to collide with objects", | |
Icon = "11590743980", | |
Callback = function(msg) | |
if states.NoClipping then | |
states.NoClipping:Disconnect() | |
states.NoClipping = nil | |
end | |
end, | |
}, | |
{ | |
Name = "NoRender", | |
Description = "Disables 3D rendering", | |
Icon = "11591573258", | |
Callback = function(msg) | |
RunService:Set3dRenderingEnabled(false) | |
end, | |
}, | |
{ | |
Name = "ReRender", | |
Description = "Re-Enables 3D rendering", | |
Icon = "11591573474", | |
Callback = function(msg) | |
RunService:Set3dRenderingEnabled(true) | |
end, | |
}, | |
{ | |
Name = "Anchor", | |
Description = "Anchor the player's character", | |
Icon = "11591612885", | |
Callback = function(msg) | |
for i, x in next, game.Players.LocalPlayer.Character:GetDescendants() do | |
if x:IsA("BasePart") and not x.Anchored then | |
x.Anchored = true | |
end | |
end | |
end, | |
}, | |
{ | |
Name = "Free", | |
Description = "Un-Anchor the player's character", | |
Icon = "11591613057", | |
Callback = function(msg) | |
for i, x in next, game.Players.LocalPlayer.Character:GetDescendants() do | |
if x:IsA("BasePart") and x.Anchored then | |
x.Anchored = false | |
end | |
end | |
end, | |
}, | |
{ | |
Name = "Fullbright", | |
Description = "Makes the game brighter", | |
Icon = "11591613229", | |
Callback = function(msg) | |
game.Lighting.Brightness = 2 | |
game.Lighting.ClockTime = 14 | |
game.Lighting.FogEnd = 100000 | |
game.Lighting.GlobalShadows = false | |
game.Lighting.OutdoorAmbient = Color3.fromRGB(128, 128, 128) | |
end, | |
}, | |
{ | |
Name = "Ambient", | |
Description = "Resets the game's lighting", | |
Icon = "11591613393", | |
Callback = function(msg) | |
game.Lighting.Ambient = states.LightingDefaults.abt | |
game.Lighting.OutdoorAmbient = states.LightingDefaults.oabt | |
game.Lighting.Brightness = states.LightingDefaults.brt | |
game.Lighting.ClockTime = states.LightingDefaults.time | |
game.Lighting.FogEnd = states.LightingDefaults.fe | |
game.Lighting.FogStart = states.LightingDefaults.fs | |
game.Lighting.GlobalShadows = states.LightingDefaults.gs | |
end, | |
} | |
} | |
local output = {} | |
for i = 1, #results do | |
local cur = results[i] | |
local searchableName = cur.SearchByName or cur.Name | |
searchableName = searchableName:lower() | |
if cur.Prefix and starts(term, cur.Prefix) then | |
table.insert(output, cur) | |
--if #term == #cur.Prefix then | |
-- table.insert(output, cur) | |
--elseif searchableName:sub(#cur.Prefix + 1):find(term:lower(), 1, true) then | |
-- table.insert(output, cur) | |
--end | |
else | |
if (searchableName:find(term:lower(), 1, true) or starts(term, searchableName)) and not cur.HideGlobals then | |
table.insert(output, cur) | |
end | |
end | |
end | |
return output | |
end | |
local state = false | |
local index = 1 | |
setState(state) | |
function getFromIndex() | |
local ci = 1 | |
for _, v in pairs(Items:GetChildren()) do | |
if v:IsA("Frame") then | |
if ci == index then | |
return v | |
end | |
ci = ci + 1 | |
end | |
end | |
return nil | |
end | |
function updateFromIndex(fromArrow) | |
local ci = 1 | |
for _, v in pairs(Items:GetChildren()) do | |
if v:IsA("Frame") then | |
local info = TweenInfo.new(fromArrow and 0.3 or 0, Enum.EasingStyle.Linear) | |
local object_tween = TweenService:Create(v, info, {BackgroundColor3 = ci == index and Color3.fromRGB(190, 90, 244) or Color3.fromRGB(44, 44, 44)}) | |
local description_tween = TweenService:Create(v.DescriptionLabel, info, {TextTransparency = ci == index and 0 or 1}) | |
object_tween:Play() | |
description_tween:Play() | |
ci = ci + 1 | |
end | |
end | |
end | |
function searchInputBegan(input) | |
if input.KeyCode == Enum.KeyCode.Return then | |
submit() | |
elseif input.KeyCode == Enum.KeyCode.Up then | |
if index > 1 then | |
index = index - 1 | |
updateFromIndex(true) | |
end | |
elseif input.KeyCode == Enum.KeyCode.Down then | |
if index < #Items:GetChildren() - 1 then | |
index = index + 1 | |
updateFromIndex(true) | |
end | |
elseif input.KeyCode == Enum.KeyCode.Escape then | |
state = false | |
setState(state) | |
end | |
end | |
function inputBegan(input) | |
if input.KeyCode == Enum.KeyCode.RightShift then | |
state = not state | |
setState(state) | |
end | |
if state then | |
searchInputBegan(input) | |
end | |
end | |
function submit() | |
local obj = getFromIndex() | |
if obj then | |
if #obj.PrefixValue.Value > 0 then -- has prefix | |
callbacks[obj.CallbackIdValue.Value](cs(TextBox.Text, obj.PrefixValue.Value)) | |
else | |
callbacks[obj.CallbackIdValue.Value](TextBox.Text) | |
end | |
end | |
end | |
function searchChange() | |
destroyResults() | |
if TextBox.Text:len() > 0 then | |
local results = search(TextBox.Text) | |
for i = 1, math.min(#results, 4) do | |
local cur = results[i] | |
createResult(cur) | |
end | |
ResultFrame.Visible = #results > 0 | |
else | |
ResultFrame.Visible = false | |
end | |
index = 1 | |
updateFromIndex() | |
end | |
function inputUnfocused(enterPressed, lossInput) | |
if enterPressed then | |
submit() | |
end | |
state = false | |
setState(state) | |
end | |
TextBox:GetPropertyChangedSignal("Text"):Connect(searchChange) | |
TextBox.InputBegan:Connect(searchInputBegan) | |
TextBox.FocusLost:Connect(inputUnfocused) | |
UserInputService.InputBegan:Connect(inputBegan) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment