New Text Document
New Text Document
-- Variables
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Ignore = workspace:FindFirstChild("Ignore") or
workspace:WaitForChild("Ignore")
-- Tables
local Connections = {}
local Debounce = {}
-- Match Model
-- Change Properties
-- Entities
local Entities = {}
-- Entities | Info
local EntityInfo = {
-- Nature
["Tree"] = {["Type"] = "Nature", ["Color"] = Color3.fromRGB(44, 101, 29)},
["Cactus"] = {["Type"] = "Nature", ["Color"] = Color3.fromRGB(148, 190,
129)},
["Berry Bush"] = {["Type"] = "Nature", ["Color"] = Color3.fromRGB(31, 128,
29)},
-- Base
["Cabinet"] = {["Type"] = "Base", ["Color"] = Color3.fromRGB(175, 148, 131)},
["Small Box"] = {["Type"] = "Base", ["Color"] = Color3.fromRGB(175, 148,
131)},
["Medium Box"] = {["Type"] = "Base", ["Color"] = Color3.fromRGB(175, 148,
131)},
["Mega Foundry"] = {["Type"] = "Base", ["Color"] = Color3.fromRGB(163, 162,
165)},
["Claim Stone"] = {["Type"] = "Base", ["Color"] = Color3.fromRGB(0, 16,
176)},
["Respawn Totem"] = {["Type"] = "Base", ["Color"] = Color3.fromRGB(0, 16,
176)},
-- Items
["Backpack"] = {["Type"] = "Items", ["Color"] = Color3.fromRGB(148, 190,
129)},
["Parts Box"] = {["Type"] = "Items", ["Color"] = Color3.fromRGB(138, 124,
98)},
["Military Crate"] = {["Type"] = "Items", ["Color"] = Color3.fromRGB(105, 64,
40)},
["Vending Machine"] = {["Type"] = "Items", ["Color"] = Color3.fromRGB(166, 0,
0)},
["Transport Crate"] = {["Type"] = "Items", ["Color"] = Color3.fromRGB(124,
156, 107)},
-- Ores
["Iron Ore"] = {["Type"] = "Ores", ["Color"] = Color3.fromRGB(199, 172,
120)},
["Stone Ore"] = {["Type"] = "Ores", ["Color"] = Color3.fromRGB(105, 102,
92)},
["Nitrate Ore"] = {["Type"] = "Ores", ["Color"] = Color3.fromRGB(248, 248,
248)}
}
-- Entities | Setup Entities
for _, Model in workspace:GetChildren() do
if Model:IsA("Model") then
for Entity, Info in EntityInfo do
if Info["Type"] == "Nature" and not string.find(Entity, " ") then
for Index = 1, 2 do
if
MatchModel(ReplicatedStorage.Entities:FindFirstChild(Entity .. tostring(Index)),
Model) then
Entities[Model] = Entity; break
end
end
elseif
MatchModel(ReplicatedStorage.Entities:FindFirstChild(string.gsub(Entity, " ", "")),
Model) then
Entities[Model] = Entity; break
end
end
end
end
-- Entities | Update Entities
Connections["Update Entities"] = workspace.ChildAdded:Connect(function(Model)
if Model:IsA("Model") then
for Entity, Info in EntityInfo do
if Info["Type"] == "Nature" and not string.find(Entity, " ") then
for Index = 1, 2 do
if
MatchModel(ReplicatedStorage.Entities:FindFirstChild(Entity .. tostring(Index)),
Model) then
Entities[Model] = Entity;
Debounce[EntityInfo[Entity]["Type"]] = false; break
end
end
elseif
MatchModel(ReplicatedStorage.Entities:FindFirstChild(string.gsub(Entity, " ", "")),
Model) then
Entities[Model] = Entity; Debounce[EntityInfo[Entity]
["Type"]] = false; break
end
end
end
end)
-- Entities | Remove Entities
Connections["Remove Entities"] = workspace.ChildRemoved:Connect(function(Model)
if Entities[Model] then
Entity = Entities[Model]; Entities[Model] = nil;
Debounce[EntityInfo[Entity]["Type"]] = false
end
end)
-- LocalPlayer
local LocalPlayer = {
["Arm"] = {},
["Tool"] = {}
}
-- LocalPlayer | Setup LocalPlayer
for _, Part in Ignore:GetDescendants() do
if Part:IsA("BasePart") then
if Part:FindFirstAncestor("FPSArms") then
if Part:FindFirstAncestor("Armor") or Part.Parent ==
Part:FindFirstAncestor("FPSArms") then
table.insert(LocalPlayer["Arm"], Part)
elseif Part.Parent:IsA("Model") then
table.insert(LocalPlayer["Tool"], Part)
end
elseif Part.Parent:IsA("Model") then
table.insert(LocalPlayer["Tool"], Part)
end
end
end
-- LocalPlayer | Update LocalPlayer
Connections["Update LocalPlayer"] = Ignore.DescendantAdded:Connect(function(Part)
if Part:IsA("BasePart") then
if Part:FindFirstAncestor("FPSArms") then
if Part:FindFirstAncestor("Armor") or Part.Parent ==
Part:FindFirstAncestor("FPSArms") then
table.insert(LocalPlayer["Arm"], Part)
elseif Part.Parent:IsA("Model") then
table.insert(LocalPlayer["Tool"], Part)
end
elseif Part.Parent:IsA("Model") then
table.insert(LocalPlayer["Tool"], Part)
end
end
end)
-- LocalPlayer | Remove LocalPlayer
Connections["Remove LocalPlayer"] =
Ignore.DescendantRemoving:Connect(function(Part)
if table.find(LocalPlayer["Arm"], Part) then
table.remove(Players, table.find(LocalPlayer["Arm"], Part))
elseif table.find(LocalPlayer["Tool"], Part) then
table.remove(Players, table.find(LocalPlayer["Tool"], Part))
end
end)
-- UI Library
-- UI Library | Repository
local Repository = "https://raw.githubusercontent.com/wally-rblx/LinoriaLib/main/"
-- UI Library | Links
local Library = loadstring(game:HttpGet(Repository .. "Library.lua"))()
local ThemeManager =
loadstring(game:HttpGet("https://raw.githubusercontent.com/rxn-xyz/Themes/main/
BBot.lua"))()
local SaveManager = loadstring(game:HttpGet(Repository ..
"addons/SaveManager.lua"))()
-- UI Library | Window
local Window = Library:CreateWindow({
Title = "Trident Survival",
Center = true,
AutoShow = true,
})
-- Window | Tabs
local Tabs = {
["Main"] = Window:AddTab("Main"),
["UI Settings"] = Window:AddTab("UI Settings"),
}
-- Main | Boxes
local Boxes = {
["Hitbox Expander"] = Tabs["Main"]:AddLeftGroupbox("Hitbox Expander"),
["Visuals"] = Tabs["Main"]:AddRightTabbox("Visuals"),
}
-- Visuals
Visuals = {
["Chams"] = Boxes["Visuals"]:AddTab("Chams"),
["Local"] = Boxes["Visuals"]:AddTab("Local")
}
-- Visuals | Variables
local ChamsFolder = game:GetService("CoreGui"):FindFirstChild("Chams") or
Instance.new("Folder", game:GetService("CoreGui")); ChamsFolder.Name = "Chams"
-- Hitbox Expander
-- UI Settings
local MenuGroup = Tabs["UI Settings"]:AddLeftGroupbox("Menu")
-- Setup
MenuGroup:AddButton("Unload", function() Library:Unload() for _, Connection in
next, Connections do Connection:Disconnect() end end)
MenuGroup:AddLabel("Menu bind"):AddKeyPicker("MenuKeybind", { Default = "LeftAlt",
NoUI = true, Text = "Menu keybind" }); Library.ToggleKeybind = Options.MenuKeybind
-- Theme Manager
ThemeManager:SetLibrary(Library)
-- Save Manager
SaveManager:SetLibrary(Library)
-- Setup
SaveManager:IgnoreThemeSettings()
SaveManager:SetIgnoreIndexes({ "MenuKeybind" })
ThemeManager:SetFolder("MyScriptHub")
SaveManager:SetFolder("MyScriptHub/specific-game")
SaveManager:BuildConfigSection(Tabs["UI Settings"])
ThemeManager:ApplyToTab(Tabs["UI Settings"])