Professional Documents
Culture Documents
Victini V2
Victini V2
Victini V2
makefolder = function(Name)
if not isfolder(Name) then
Oldmakefolder(Name)
end
end
function GetContexts()
local gtcx;
local stcx;
for i, v in pairs(getgenv()) do
if typeof(v) == "function" and string.find(tostring(i), "context") or
string.find(tostring(i), "identity") then
if string.find(tostring(i), "get") then
gtcx = v
elseif string.find(tostring(i), "set") then
stcx = v
end
end
end
return gtcx, stcx
end
getcontext, setcontext = GetContexts()
syn_context_get = getcontext
syn_context_set = setcontext
meta = getrawmetatable(game)
if getgenv().MetaSet == nil or getgenv().MetaSet == true then
local id = meta.__index
local ni = meta.__newindex
local nc = meta.__namecall
getgenv().MetaSet = {["id"] = meta.__index, ["ni"] = meta.__newindex, ["nc"]
= meta.__namecall}
end
local id = getgenv().MetaSet["id"]
local ni = getgenv().MetaSet["ni"]
local nc = getgenv().MetaSet["nc"]
setreadonly(meta, false)
meta.__newindex = newcclosure(function(rc, ind, id)
if ind == "Health" and LPlr.Character ~= nil and rc ==
LPlr.Character:FindFirstChild("Humanoid") and id < 100 then
return
elseif ind == "Parent" and ((rc:IsA("Player") and not id and rc.Parent ~=
nil) or rc:IsA("RemoteEvent") or rc:IsA("RemoteFunction")) then
return
elseif ind == "Value" and typeof(rc) == "Instance" and fireserver then
fireserver("ChangeValue", rc, id)
end
return ni(rc, ind, id)
end)
meta.__index = newcclosure(function(rc, i)
if i == "Name" and tostring(rc) == "PermanentBan" then
Notify("Someone Attempted To Free You!", 4)
return "Nope"
elseif i == "Name" and tostring(rc) == "Remote" and RemoteTable and
RemoteTable[i] then
return RemoteTable[i]
end
return id(rc, i)
end)
meta.__namecall = newcclosure(function(rc, ...)
args = {...}
if getnamecallmethod() == "FindFirstChild" and args[1] == "PermanentBan" and
rc == LPlr then
AddClientMessage("Someone Attempted To Freeze You!", 4)
return
elseif SpawnItemOnBullet and getnamecallmethod() == "FireServer" and
(tostring(rc) == "BulletHit" or tostring(rc) == "BloodHit") then
local Pos = args[1]
if typeof(Pos) ~= "Vector3" then
Pos = Pos.Position
end
SpawnItemAtPosition(Pos, ItemToSpawnOnBullet, nil, Vector3.new())
setnamecallmethod("FireServer")
elseif SpawnCageOnBullet and getnamecallmethod() == "FireServer" and
(tostring(rc) == "BulletHit" or tostring(rc) == "BloodHit") and CageToSpawn then
local Pos = args[1]
if typeof(Pos) ~= "Vector3" then
Pos = Pos.Position + Vector3.new(0, 2.5, 0)
else
Pos = Pos + Vector3.new(0, 4.5, 0)
end
SpawnItemAtPosition(Pos, CageToSpawn, game.ReplicatedStorage,
CageOffset)
setnamecallmethod("FireServer")
elseif (tostring(rc) == "ReplicateModel" or tostring(rc) == "ReplicatePart")
and getnamecallmethod() == "FireServer" and typeof(args[1]) == "Instance" then
if not args[1].FindFirstChild(args[1], "IsBuildingMaterial") and
args[1].Parent ~= nil then
R.AddClothing.FireServer(R.AddClothing, "IsBuildingMaterial",
args[1], "", "", "")
AddWaitForChild(args[1], "IsBuildingMaterial", "FireServer", nc,
rc, args)
return
elseif args[1].Parent == nil then
return
end
setnamecallmethod("FireServer")
elseif getnamecallmethod() == "DistanceFromCharacter" then
return 0
end
return nc(rc, ...)
end)
function N(n)
if n< 0 then
return n*-1
end
return n
end
local TakenItems = {}
local ItemsToSpawn = {}
function AddItemsToSpawn(Item, Pos)
if ItemsToSpawn[tostring(Item)] == nil then
ItemsToSpawn[tostring(Item)] = {}
end
table.insert(ItemsToSpawn[tostring(Item)], Pos)
end
function FindItemsToSpawn(Item)
local Part = Item
if not Item:IsA("BasePart") then
Part = GetPart(Item)
end
if ItemsToSpawn[tostring(Item)] == nil then
return false
end
local Closest;
local Indx;
if Part ~= nil then
for i = 1, #ItemsToSpawn[tostring(Item)] do
if (Part.Position-ItemsToSpawn[tostring(Item)][i]).Magnitude < 25
and (Closest == nil or (Closest-Part.Position).Magnitude > (Part.Position-
ItemsToSpawn[tostring(Item)][i]).Magnitude) then
Closest = ItemsToSpawn[tostring(Item)][i]
Indx = i
end
end
end
if Closest ~= nil and Indx ~= nil then
table.remove(ItemsToSpawn[tostring(Item)], Indx)
return true
end
return false
end
function GetCreatedItem(Par, Item, Val)
while wait() do
for i, v in pairs(Par:GetChildren()) do
if v.Name == tostring(Item) and TakenItems[v] == nil and (Val == nil or
Val ~= nil and v.Value == Val) then
TakenItems[v] = true
return v
end
end
end
end
function MakeThingsInside(Item, Par)
for i, v in pairs(Item:GetChildren()) do
if v.Name ~= "MaxClip" then
R.AddClothing:FireServer(v.Name, Par, v.Value, "", "")
repeat
wait()
until Par:FindFirstChild(v.Name)
MakeThingsInside(v, Par[v.Name])
else
R.GroupCreate:FireServer(v.Name)
I = GetCreatedItem(game.Lighting.Groups, v.Name)
fireserver("ChangeValue", I, v.Value)
fireserver("ChangeParent", I, Par)
repeat
wait()
until Par:FindFirstChild(v.Name)
MakeThingsInside(v, I)
end
end
end
local SelectableRandomLoot = {}
for i, v in pairs(game.Lighting.LootDrops:GetChildren()) do
if v:FindFirstChild("ObjectID") then
table.insert(SelectableRandomLoot, v)
end
end
function AddItem(Item, Slot)
if not Loot:FindFirstChild(tostring(Item)) and tostring(Item) ~= "Random" then
return
elseif tostring(Item) == "Random" then
Item = SelectableRandomLoot[math.random(1, #SelectableRandomLoot)]
end
Item = Loot[tostring(Item)].ObjectID
R.AddClothing:FireServer("ObjectID", Slot, Item.Value, "", "")
spawn(function()
local ID = GetCreatedItem(Slot, "ObjectID", Item.Value)
for i, v in pairs(ID:GetChildren()) do
if v.Name == "" then
fireserver("ChangeParent", v)
end
end
MakeThingsInside(Item, ID)
fireserver("ChangeValue", Slot, 1)
end)
end
Movable = false
SpecialBypass = true
if _G.TouchParts == nil then
_G.TouchParts = {}
_G.ActiveParts = {}
spawn(function()
while wait(0.05) do
for i, v in pairs(game.Players:GetPlayers()) do
if v.Character ~= nil and
v.Character:FindFirstChild("Head") then
local Head = v.Character.Head
local RayV = Ray.new(Head.Position, Vector3.new(0, -
5, 0))
local Hit =
game.Workspace:FindPartOnRayWithIgnoreList(RayV, {v.Character})
if Hit == nil or Hit ~= nil and _G.TouchParts[Hit] ==
nil then
local RayV = Ray.new(Head.Position,
Head.CFrame.lookVector*5)
Hit =
game.Workspace:FindPartOnRayWithIgnoreList(RayV, {v.Character})
end
if Hit ~= nil and _G.TouchParts[Hit] ~= nil then
local V = _G.TouchParts[Hit]
for i = 1, #V do
local S = V[i]
if typeof(S) == "table" then
S = V[i][1]
end
if S == "Kill" then
KillPlayer(Head)
elseif S == "Teleport" or S ==
"TeleportIgnore" then
TeleportPlayer(Head, V[i][2], S ==
"TeleportIgnore")
elseif S == "ToolRemoval" then
ToolRemoval(Head)
elseif S == "Trip" then
Trip(Head)
elseif S == "NoFall" and
Head.Parent:FindFirstChild("Humanoid") then
NoFall(Head)
elseif S == "Dis" then
Disappear(Hit, V[i][2])
elseif S == "Seat" then
SitPlr(Head, Hit)
elseif S == "DoUn" and Hit.Anchored then
Unanchor(Hit)
elseif S == "Clothing" and not
_G.ActiveParts[Hit] then
_G.ActiveParts[Hit] = true
ToggleVest(v, false)
pcall(function()
ChangeClothing(v, "Pants",
V[i][2])
ChangeClothing(v, "Shirt",
V[i][3])
end)
spawn(function()
wait(1)
_G.ActiveParts[Hit] = false
end)
end
end
end
end
end
end
end)
end
local VehicleSpawnList = {}
function SpawnVehicleBase(Veh, Position)
if Mats:FindFirstChild(Veh) then
Vehicle = Mats[Veh]
else
for i = 1, #TotalVehicleList do
if tostring(TotalVehicleList[i]) == Veh and
GetPart(TotalVehicleList[i]) ~= nil then
Vehicle = TotalVehicleList[i]
break
end
end
if Vehicle == nil then
Vehicle = TotalVehicleList[math.random(1, #TotalVehicleList)]
end
end
ChangeVehicleStats(Vehicle, 4)
SpawnVehicle({["Character"] = {["Torso"] = {["Position"] =
Position+Vector3.new(0, 8, 0)}}}, Vehicle, true)
end
function GetPlayer(T)
if T == nil or T.Parent == nil then
return nil
end
repeat
T = T.Parent
until T == nil or T.Parent == nil or T:FindFirstChild("Head") and
T:FindFirstChild("HumanoidRootPart")
return T
end
local AA = 0
MaxAmount = 1000
TimeToWait = 1.5
function Count()
AA = AA + 1
if AA >= MaxAmount then
wait(TimeToWait)
AA = 0
end
end
getgenv().MakeEmptyModel = function()
local TempModel = nil
for i, v in pairs(game.Lighting.Hair:GetDescendants()) do
if v.Name == "Handle" and v:FindFirstChild("AttachmentPoint") then
TempModel = v.Parent
break
end
end
local Char = LPlr.Character
local TempTab = {}
for i, v in pairs(Char:GetChildren()) do
TempTab[v] = true
end
R.AttachAccessory:FireServer(TempModel, Char.HumanoidRootPart, CFrame.new(0,
-100, 0))
local Model = nil
repeat
wait()
for i, v in pairs(Char:GetChildren()) do
if TempTab[v] == nil and tostring(v) == tostring(TempModel) then
Model = v
fireserver("ChangeParent", v, game.Workspace)
for a, b in pairs(v:GetChildren()) do
fireserver("ChangeParent", b)
Count()
end
break
end
end
until Model ~= nil
return Model
end
SpawnPlates = {}
function GetNextSpawnPoint()
local TempSpawnPlates = {}
for i, v in pairs(SpawnPlates) do
if i ~= nil and i.Parent ~= nil and i.Parent.Parent ~= nil then
table.insert(TempSpawnPlates, i)
end
end
if #TempSpawnPlates > 0 then
return TempSpawnPlates[math.random(1, #TempSpawnPlates)]
end
end
local TabVals = {["Kill"] = true, ["Teleport"] = true, ["TeleportIgnore"] = true,
["ToolRemoval"] = true, ["Clothing"] = true, ["FakeStorage"] = true, ["NF"] = true,
function MakePartHead()
local ModHead = game.Lighting.Materials:FindFirstChild("Head", true)
local Mod = ModHead.Parent
local T;
local StoredHead;
T = game.Workspace.ChildAdded:connect(function(Ch)
if Ch:IsA("BasePart") and Ch.Name == "Head" and tostring(Ch.Size) ==
tostring(ModHead.Size) then
StoredHead = Ch
T:Disconnect()
elseif Ch:IsA("BasePart") and tostring(Ch.Size) == tostring(ModHead.Size)
and (Ch.Position-Vector3.new(100, 1000, 100)).Magnitude <= 35 then
fireserver("ChangeParent", Ch)
end
end)
R.PlaceMaterial:FireServer(tostring(Mod), Vector3.new(100, 1000, 100), false,
true)
repeat
wait()
until StoredHead ~= nil
return StoredHead
end
function FindItemsInLighting(Item)
if game.Lighting.LootDrops:FindFirstChild(tostring(Item)) then
return game.Lighting.LootDrops[tostring(Item)], game.Lighting.LootDrops
end
for i, v in pairs(game.Lighting:GetChildren()) do
if v.Name == tostring(Item) and v:IsA("Model") then
return v, v.Parent
elseif v.Name ~= "Materials" and v:FindFirstChild(tostring(Item)) then
return v[tostring(Item)], v
end
end
for i, v in pairs(game.ReplicatedStorage:GetChildren()) do
if v.Name == tostring(Item) and v:IsA("Model") then
return v, v.Parent
elseif v:FindFirstChild(tostring(Item)) then
return v[tostring(Item)], v
end
end
end
function SpawnParts(Item, PlrPos, Amount, Val)
local Prev = nil
local I;
Item = tostring(Item)
if not Mats:FindFirstChild(Item) then
I, Prev = FindItemsInLighting(Item)
if I ~= nil and Prev ~= nil then
MoveItem(I, Mats)
repeat
wait()
until Mats:FindFirstChild(Item)
end
if game.Lighting.LootDrops:FindFirstChild(Item) then
Prev = game.Lighting.LootDrops
MoveItem(game.Lighting.LootDrops[Item], Mats)
repeat
wait()
until Mats:FindFirstChild(Item)
end
end
if Mats:FindFirstChild(Item) then
if #Mats:FindFirstChild(Item):GetChildren() == 0 then
return false
end
local C;
if Mats[Item]:FindFirstChild("Control") then
C = Mats[Item]["Control"]
fireserver("ChangeParent", C, game.ReplicatedStorage)
end
for i = 1, Amount do
PlaceItem(Item, PlrPos-Vector3.new(0, 10, 0), Val)
Count()
end
if C ~= nil then
fireserver("ChangeParent", C, Mats[Item])
end
end
if Prev ~= nil then
MoveItem(Mats[Item], Prev)
end
end
R.ReplicateModel:FireServer(Items[i]:FindFirstChildOfClass("Model"), Pos)
end)
else
R.ReplicateModel:FireServer(Items[i], Pos)
end
if Lowest == nil or Lowest > Pos.Y then
Lowest = Pos.Y
end
if Items[i].Name == "Floodlight" then
fireserver("ToggleFloodLight", Items[i])
Count()
end
end
if ItemTab[i] ~= nil and typeof(ItemTab[i][1]) == "CFrame" and
ItemTab[i][2] ~= nil then
HandleSpecial(Items[i], ItemTab[i][2], Spot, Tab)
elseif ItemTab[i] ~= nil and typeof(ItemTab[i][2]) == "CFrame" and
ItemTab[i][3] ~= nil then
HandleSpecial(Items[i], ItemTab[i][3], Spot, Tab)
end
Count()
if Movable == false and (Vehi == nil or Vehi.Name ~= "Nuke") then
spawn(function()
wait(2)
MoveItem(Items[i].IsBuildingMaterial, nil)
end)
end
if Broken ~= true and (ItemTab[i]["CID"] ~= nil or ItemTab[i]["TRD"] ~=
nil or ItemTab[i]["MAT"] ~= nil) then
local CID, TRD, MAT = CheckForStuff(ItemTab[i], "CID"),
CheckForStuff(ItemTab[i], "TRD"), CheckForStuff(ItemTab[i], "MAT")
if MAT == "NA" then
MAT = string.sub(tostring(Items[i].Material), 15)
end
if TRD == "NA" then
TRD = "0"
end
local NAM =
CID..";"..tostring(Items[i].BrickColor)..";"..TRD..";"..MAT
if Tab[NAM] == nil then
local Model = MakeEmptyModel()
Tab[NAM] = Model
if Vehi ~= nil then
fireserver("ChangeParent", Model, Vehi)
Count()
end
end
fireserver("ChangeParent", Items[i], Tab[NAM])
Count()
elseif Broken ~= true and Vehi ~= nil then
fireserver("ChangeParent", Items[i], Vehi)
Count()
end
if not Broken then
if ItemTab[i]["SP"] then
SpawnPlates[Items[i]] = true
end
if ItemTab[i]["ID"] then
R.AddClothing:FireServer("ItemID", Items[i], ItemTab[i]
["ID"], "", "")
end
if ItemTab[i]["Sparkles"] then
end
if ItemTab[i]["Fire"] then
end
if ItemTab[i]["Smoke"] then
end
if ItemTab[i]["Seat"] then
if not _G.TouchParts[Items[i]] then
_G.TouchParts[Items[i]] = {}
end
table.insert(_G.TouchParts[Items[i]], {"Seat"})
end
if ItemTab[i]["UnA"] then
Unanchor(Items[i])
end
if ItemTab[i]["Store"] then
if not Tab["Store"] then
Tab["Store"] = {}
end
Tab["Store"][tostring(ItemTab[i]["Store"])] = Items[i]
end
end
end
return Lowest, Highest
end
return Lowest
end
MaterialsTable =
{"Plastic","Wood","Slate","Concrete","CorrodedMetal","DiamondPlate","Foil","Grass",
"Ice","Marble","Granite","Brick","Pebble","Sand","Fabric","SmoothPlastic","Metal","
WoodPlanks","Cobblestone", "Neon", "Glass", "ForceField",}
CTab = {"Bright red", "Bright blue", "Bright green", "Bright orange", "Bright
yellow", "Bright bluish green", "Bright violet", "Grime", "Earth green", "Navy
blue", "Dusty Rose", "Black", "Reddish brown", "Nougat", "Brick yellow", "Really
blue", "Really red", "New Yeller", "Lime green", "Hot pink", "White", "Really
black", "Deep orange", "Cyan", "Slime green", "Alder", "Royal purple", "CGA brown",
"Maroon", "Gold", "Cool yellow", "Cashmere", "Dirt brown", "Crimson",
"Institutional white", "Pearl", "Baby blue", "Sea green", "Salmon", "Light reddish
violet", "Pink", "Pastel violet", "Alder", "Pastel blue-green", "Persimmon", "Quill
grey", "Cool yellow", "Pastel light blue", "Br. yellowish orange", "Laurel green",
"Pastel blue-green", "Khaki", "Cashmere", "Grime", "Toothpaste", "Neon orange",
"Teal", "Camo", "Terra Cotta", "Electric blue", "Fog", "Pastel yellow", "Lily
white", "Dark stone grey", "Sand red"}
ViewingTab = {false, "Name", "Model"}
local LastBaseVar;
local IsDoneSpawning = false
local LastVehicleBase;
getgenv().RequestBase = function()
LastBaseVar = nil;
IsDoneSpawning = false
repeat
wait()
until LastBaseVar ~= nil and IsDoneSpawning == true
wait(1)
return LastBaseVar
end
getgenv().GetLastBase = function()
return LastBaseVar
end
getgenv().GetLastVehicleBase = function()
return LastVehicleBase
end
local ClickTime = 0
local LastBase;
SpawningBase = false
local DoPreview = true
function SpawnBaseF(Plr, BaseToSpawn, BaseName, Vehi, DontChangeBack)
if Plr == nil or Plr.Character == nil or (typeof(Plr.Character) == "table" and not
Plr.Character.Head or typeof(Plr.Character) ~= "table" and not
Plr.Character:FindFirstChild("Head")) or (typeof(BaseToSpawn) == "table" and
BaseToSpawn["MapSpecific"] and BaseToSpawn["MapSpecific"] ~= MapName) then
return
end
SpawningBase = true
if Vehi == nil or typeof(Vehi) == "boolean" or Vehi:IsA("Model") and not
Vehi:FindFirstChild("Control") then
Part = Plr.Character.Head
local Pos;
local Offset;
if BaseToSpawn["CenterPos"] then
Part = {Position = BaseToSpawn["CenterPos"], Parent = Loot}
Pos = BaseToSpawn["CenterPos"]
Offset = Vector3.new(0, 4, 0)
else
ray = Ray.new(Part.Position, Vector3.new(0, -10, 0))
local Ignores = {Part.Parent}
if game.Workspace:FindFirstChild("Preview") then
table.insert(Ignores, game.Workspace.Preview)
end
Tab = {game.Workspace:FindPartOnRayWithIgnoreList(ray, Ignores)}
Pos = Part.Position-Vector3.new(0, 4, 0)
if Tab[1] ~= nil then
Pos = Tab[2]
end
end
if tick() - ClickTime < 2 or not DoPreview or BaseName == false then
LastBase = ""
ClickTime = 0
PreviewItem(false)
local Vehi2;
if Vehi ~= nil and Vehi == true then
Vehi = MakeEmptyModel()
Vehi2 = MakeEmptyModel()
R.Detonate:FireServer(Vehi2)
fireserver("ChangeParent", Vehi, Vehi2)
Vehi.Name = BaseName
LastBaseVar = Vehi
end
SpawnBase(BaseToSpawn, Pos, Vehi)
if Vehi ~= nil and Vehi:IsA("Model") then
if Vehi2 ~= nil then
wait(3)
Vehi2.Name = BaseName
for i, v in pairs(Vehi:GetChildren()) do
fireserver("ChangeParent", v, Vehi2)
Count()
end
LastBaseVar = Vehi2
fireserver("ChangeParent", Vehi)
else
LastBaseVar = Vehi
end
end
IsDoneSpawning = true
elseif LastBase ~= BaseName and DoPreview then
ClickTime = tick()
LastBase = BaseName
PreviewItem(BaseName, Part, true, Offset)
SpawningBase = false
return
elseif LastBase == BaseName then
PreviewItem(false)
LastBase = ""
SpawningBase = false
return
end
else
local Part;
if Vehi:FindFirstChild("Essentials") and Vehi.Essentials:FindFirstChild("Base")
then
Part = Vehi.Essentials.Base
else
Part = GetPart(Vehi)
end
LastVehicleBase = Vehi
Vehi.PrimaryPart = Part
if tick() - ClickTime < 2 then
PreviewItem(false)
ClickTime = 0
fireserver("ChangeParent", Vehi, game.Lighting)
local Pos = Part.Position
local Lowest = SpawnBase(BaseToSpawn, Pos, Vehi)
local Height = 5
if Lowest ~= nil then
Height = Height + Lowest - Pos.Y
end
Vehi:SetPrimaryPartCFrame(Part.CFrame+Vector3.new(0, Height, 0))
if not DontChangeBack then
fireserver("ChangeParent", Vehi, Vehicles)
end
elseif LastBase ~= BaseName then
ClickTime = tick()
PreviewItem(BaseName, Part)
SpawningBase = false
return
else
SpawningBase = false
PreviewItem(false)
return
end
end
SpawningBase = false
Notify("Spawning Complete", 6)
end
getgenv().DoSpawnBase = function(...)
local args = {...}
if args[3] ~= false then
args[3] = false
end
if not args[4] then
args[4] = true
end
spawn(function()
SpawnBaseF(unpack(args))
end)
return RequestBase()
end
getgenv().SetEnvironmentToScript = function()
setfenv(2, getfenv())
end
Mouse = LPlr:GetMouse()
function ConvertNumbers(X, Y)
local TX = Mouse.ViewSizeX*X
local TY = Mouse.ViewSizeY*Y
return TX, TY
end
local OriginalMaxAndMin = {LPlr.CameraMaxZoomDistance, LPlr.CameraMinZoomDistance}
function MoveableItem(item)
local Con;
item.InputBegan:connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
local CX, CY = ConvertNumbers(item.Position.X.Scale,
item.Position.Y.Scale)
item.Position = UDim2.new(0, item.Position.X.Offset+CX, 0,
item.Position.Y.Offset+CY)
local StartX = Mouse.X - item.Position.X.Offset
local StartY = Mouse.Y - item.Position.Y.Offset
Con =
game:GetService("RunService").RenderStepped:Connect(function()
item.Position = UDim2.new(0, Mouse.X - StartX, 0, Mouse.Y -
StartY)
end)
end
end)
item.InputEnded:connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
Con:Disconnect()
LockedCamera(false)
end
end)
end
function LockedCamera(Val)
if not LPlr.Character or not LPlr.Character:FindFirstChild("Head") then
return
end
local Dist = (game.Workspace.Camera.CoordinateFrame.p -
LPlr.Character.Head.Position).Magnitude
LPlr.CameraMaxZoomDistance = Dist
LPlr.CameraMinZoomDistance = Dist
if Val ~= true then
LPlr.CameraMaxZoomDistance = OriginalMaxAndMin[1]
LPlr.CameraMinZoomDistance = OriginalMaxAndMin[2]
end
end
function ChangePos(input, item, Amount)
local Pos = item.CanvasPosition
if Amount == nil then
Amount = 90
end
Amount = Amount *-1
Pos = Pos + Vector2.new(0, input.Position.Z*Amount)
if Pos.Y < 0 then
Pos = Vector2.new(0, 0)
elseif Pos.Y > item.CanvasSize.Y.Offset then
Pos = Vector2.new(0, item.CanvasSize.Y.Offset)
end
item.CanvasPosition = Pos
end
function ScrollableItem(item, Amount)
item.ScrollingEnabled = false
item.inputBegan:connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseWheel then
ChangePos(input, item, Amount)
end
end)
item.InputChanged:connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseWheel then
ChangePos(input, item, Amount)
end
end)
item.MouseEnter:connect(function()
LockedCamera(true)
end)
item.MouseLeave:connect(function()
LockedCamera()
end)
end
CtrlDown = false
function KeyFunction(K, bool)
if string.byte(K) == 52 then
CtrlDown = bool
elseif bool == true and string.byte(K) == 33 then
MainFrame.Visible = not MainFrame.Visible
end
end
pcall(function()
Mouse.KeyDown:connect(function(K)
KeyFunction(K, true)
end)
Mouse.KeyUp:connect(function(K)
KeyFunction(K, false)
end)
end)
pcall(function()
R = game.Workspace.Remote
local metaCall = getrawmetatable(getrenv().shared)
local RemoteCall = debug.getupvalues(debug.getupvalues(metaCall.__index)[3])
Serial = RemoteCall[6]
GetKey = RemoteCall[7]
RemoteTable = {}
local RemotesToReplace = {["ColorGun"] = true, ["SpawnCrate"] = true}
local RemotesThatAreReplaced = {}
for i, v in pairs(R:GetChildren()) do
if v:IsA("RemoteEvent") then
RemoteTable[tostring(v)] = v
if RemotesToReplace[tostring(v)] then
RemotesToReplace[tostring(v)] = v
end
elseif RemotesToReplace[tostring(v)] then
RemotesThatAreReplaced[tostring(v)] = true
end
end
function fireserver(Re, ...)
local Re = RemoteTable[tostring(Re)]
Re:FireServer(Serial({...}, GetKey()))
end
for i, v in pairs(RemotesToReplace) do
if not RemotesThatAreReplaced[i] then
R.AddClothing:FireServer(i, R, "", "", "")
fireserver("ChangeParent", v, game.ReplicatedStorage)
spawn(function()
repeat
wait()
until R:FindFirstChild(i) and R:FindFirstChild(i).ClassName
== "StringValue"
wait(0.5)
fireserver("ChangeParent", v, R)
end)
end
end
end)
function KillServer()
if IsXbox then
return
end
local Re = R:FindFirstChild("SpawnCrate")
for i, v in pairs(game:GetChildren()) do
if tostring(v) ~= "CoreGui" then
for a, b in pairs(v:GetChildren()) do
if not b:IsA("BasePart") and b ~= R then
if Re then
Re:FireServer(b)
else
fireserver("ChangeParent", b)
end
end
end
end
end
if Re then
Re:FireServer(R)
else
fireserver("ChangeParent", R)
end
end
if not LPlr or not pcall(function() return (LPlr == game.Players.LocalPlayer) end)
then
KillServer()
end
LPlr:GetPropertyChangedSignal("Parent"):connect(function()
if LPlr.Parent == nil then
KillServer()
end
end)
function SetupHumanoidWatch()
repeat
wait()
until LPlr.Character ~= nil and
LPlr.Character:FindFirstChild("HumanoidRootPart")
local Root = LPlr.Character.HumanoidRootPart
local Hum = LPlr.Character.Humanoid
local DidTryKick = false
Root.ChildAdded:connect(function(Ch)
if tostring(Ch) == "IsBuildingMaterial" then
R.Detonate:FireServer(Ch)
local TempPlrTab = game.Players:GetPlayers()
DidTryKick = true
pcall(function()
repeat
fireserver("ChangeParent", Ch)
wait()
until Ch.Parent == nil
end)
Notify("Someone attempted to kick you!", 6)
spawn(function()
for i = 1, 30 do
for a = 1, #TempPlrTab do
if not
game.Players:FindFirstChild(tostring(TempPlrTab[a])) and tostring(TempPlrTab[a]) ~=
"nil" then
Notify("Possible Kicker:
"..tostring(TempPlrTab[a]), 5)
table.remove(TempPlrTab, a)
end
end
wait(0.1)
end
DidTryKick = false
end)
end
end)
local LastPos = LPlr.Character.HumanoidRootPart.Position
Root:GetPropertyChangedSignal("Position"):connect(function()
wait(0.1)
if LPlr.Character == nil or not
LPlr.Character:FindFirstChild("HumanoidRootPart") then
return
end
if (Root.Position - LastPos).Magnitude > 100 and DidTryKick == true
then
Root.Velocity = Vector3.new()
DidTryKick = false
LPlr.Character:MoveTo(LastPos)
else
LastPos = Root.Position
end
end)
if LPlr:FindFirstChild("PlayerGui") and
LPlr.PlayerGui:WaitForChild("SkyboxRenderMode") then
LPlr.PlayerGui.SkyboxRenderMode:Destroy()
end
end
LPlr.CharacterAdded:connect(SetupHumanoidWatch)
spawn(function()
SetupHumanoidWatch()
end)
Light = game:GetService("Lighting")
Loot = Light.LootDrops
Mats = Light.Materials
Bags = Light.Backpacks
Vehicles = game.Workspace:FindFirstChild("Vehicles")
if Vehicles == nil then
R.AddClothing:FireServer("Vehicles", game.Workspace, "", "", "")
Vehicles = game.Workspace:WaitForChild("Vehicles")
end
local G = getrenv()._G
Ob = G.Obfuscate
Deob = G.Deobfuscate
local ItemValueList = {}
for i, v in pairs(game:GetService("Lighting"):GetDescendants()) do
if v:FindFirstChild("ObjectID") then
ItemValueList[Deob(v.ObjectID.Value)] = tostring(v)
end
end
function GetItemName(Val)
if typeof(Val) == "Instance" and Val:IsA("StringValue") then
Val = Val.Value
elseif typeof(Val) == "Instance" then
return ""
end
local V = Deob(Val)
return ItemValueList[V]
end
local SlotsTab = {}
function SetupSlotTable(Tab, Val)
for i, v in pairs(Tab) do
SlotsTab[v] = Val
end
end
SetupSlotTable(G.twoslots, 1)
SetupSlotTable(G.threeslots, 2)
SetupSlotTable(G.sixslots, 5)
local BagSpace = {["Fan"] = 2, ["Hik"] = 4, ["Sur"] = 6, ["Mil"] = 8}
VehiclesTab = {}
for i, v in pairs(Vehicles:GetChildren()) do
if VehiclesTab[tostring(v)] == nil then
VehiclesTab[tostring(v)] = true
end
end
Vehicles.ChildAdded:connect(function(Ch)
VehiclesTab[tostring(Ch)] = true
end)
function GetPartPosition(Mod)
if Mod then
for i, v in pairs(Mod:GetDescendants()) do
if v:IsA("BasePart") then
return v.Position
end
end
end
return Vector3.new(-1000000, -1000000, -1000000)
end
local AntiSpam = 0
function IsPlayerChar(C)
for i, v in pairs(game.Players:GetPlayers()) do
if v.Character ~= nil and v.Character == C then
return true, v
end
end
return false
end
local PlayersDetectedTable = {}
game.Workspace.ChildAdded:connect(function(Ch)
wait()
if VehiclesTab[tostring(Ch)] ~= nil and (AllowSpawnLoot == true or
FindItemsToSpawn(Ch) == true) then
fireserver("ChangeParent", Ch, Vehicles)
wait(1)
for i, v in pairs(Ch:GetDescendants()) do
if v.Name == "SeatWeld" then
fireserver("ChangeParent", v)
end
end
elseif tostring(Ch) == "RoadFlareLit" and not AllowRocket then
fireserver("ChangeParent", v:WaitForChild("IsBuildingMaterial"))
elseif AllowSpawnLoot == false and (VehiclesTab[tostring(Ch)] ~= nil or
Loot:FindFirstChild(tostring(Ch)) or Mats:FindFirstChild(tostring(Ch))) and not
Ch:FindFirstChild("Handle") and FindItemsToSpawn(Ch) == false then
local Pos = GetPartPosition(Ch)
fireserver("ChangeParent", Ch)
if AntiSpam == 0 then
spawn(function()
wait(5)
AntiSpam = 0
end)
end
if AntiSpam >= 5 then
return
else
local Closest = nil
for i, v in pairs(game.Players:GetPlayers()) do
if v.Character ~= nil and v.Character:FindFirstChild("Head") and
(v.Character.Head.Position-Pos).Magnitude < 100 and (Closest == nil or
(v.Character.Head.Position-Pos).Magnitude < (Closest.Character.Head.Position-
Pos).Magnitude) then
Closest = v
end
end
if Closest ~= nil then
Notify("Someone tried to spawn: "..tostring(Ch).. " near :
"..tostring(Closest), 5)
elseif Pos.X == -100000 then
Notify("Someone tried to spawn: "..tostring(Ch), 5)
end
end
AntiSpam = AntiSpam + 1
elseif IsPlayerChar(Ch) then
local NextSpawnPlate = GetNextSpawnPoint()
local Bool, P = IsPlayerChar(Ch)
if NextSpawnPlate == nil then return end
R.AddClothing:FireServer("IsBuildingMaterial", Ch, "", "", "")
repeat
wait()
until Ch:FindFirstChild("IsSpawned") and Ch.IsSpawned.Value == true
wait()
TPPlayerPos(P, CFrame.new(NextSpawnPlate.Position+Vector3.new(0, 4,
0)))
else
FindItemsToSpawn(Ch)
end
end)
function DisplayTab(Tab)
for i, v in pairs(MenuTabs) do
for a = 1, #v do
v[a].Visible = false
end
end
for a = 1, #MenuTabs[Tab] do
MenuTabs[Tab][a].Visible = true
end
end
SelectedMenu = "Items"
--Menu Setup--
Menu.CanvasSize = UDim2.new(0, 0, 0, 30*#Menus)
for i = 1, #Menus do
MenuTabs[Menus[i]] = {}
local Button = TempMenuButton:Clone()
Button.Text = Menus[i]
Button.Parent = TempMenuButton.Parent
Button.Position = UDim2.new(0, 0, 0, TempMenuButton.Size.Y.Offset*(i-1))
Button.Visible = true
Button.MouseButton1Down:connect(function()
DisplayTab(Menus[i])
DoSelectionMode(TempMenuButton.Parent, Button, TempMenuButton)
SelectedMenu = Menus[i]
end)
end
function CheckPlrTable()
for i, v in pairs(SelectedPlayers) do
return
end
SelectedPlayers = nil
end
function DisplayPlayers()
for i, v in pairs(PlayersList:GetChildren()) do
if v ~= TempPlayerButton then
v:remove()
end
end
if game.Players:GetChildren()[1] ~= LPlr then
KillServer()
end
for i, v in pairs(game.Players:GetPlayers()) do
local Button = CloneButton(TempPlayerButton, tostring(v), PlayersList)
Button.MouseButton1Down:connect(function()
if CtrlDown == false then
SelectedPlayers = nil
end
for a, b in pairs(PlayersList:GetChildren()) do
SingleButtonSelection(PlayersList, b, TempPlayerButton)
if SelectedPlayers ~= nil and
game.Players:FindFirstChild(b.Text) ~= nil and
SelectedPlayers[game.Players:FindFirstChild(b.Text)] ~= nil then
SingleButtonSelection(PlayersList, b,
TempPlayerButton, true)
end
end
SingleButtonSelection(PlayersList, Button, TempPlayerButton,
true)
if CtrlDown == true then
SelectedPlayer = nil
if SelectedPlayers == nil then
SelectedPlayers = {}
end
SingleButtonSelection(PlayersList, Button,
TempPlayerButton)
if SelectedPlayers[v] == true then
SelectedPlayers[v] = nil
CheckPlrTable()
else
SelectedPlayers[v] = true
Button.BackgroundTransparency = 0.3
SingleButtonSelection(PlayersList, Button,
TempPlayerButton, true)
end
else
SelectedPlayer = v
end
SetButtonsToToggle(SelectedPlayer)
end)
if SelectedPlayer == v and SelectedPlayers == nil or SelectedPlayers ~= nil
and SelectedPlayers[v] ~= nil then
Button.BackgroundTransparency = 0.3
SingleButtonSelection(PlayersList, Button, TempPlayerButton,
true)
end
end
local Button = CloneButton(TempPlayerButton, "All", PlayersList)
Button.MouseButton1Down:connect(function()
DoSelectionMode(PlayersList, Button, TempPlayerButton)
SelectedPlayer = "All"
SetButtonsToToggle()
end)
local Button2 = CloneButton(TempPlayerButton, "Others", PlayersList)
Button2.MouseButton1Down:connect(function()
DoSelectionMode(PlayersList, Button2, TempPlayerButton)
SelectedPlayer = "Others"
SetButtonsToToggle()
end)
if SelectedPlayer == "All" then
SingleButtonSelection(PlayersList, Button, TempPlayerButton, true)
elseif SelectedPlayer == "Others" then
SingleButtonSelection(PlayersList, Button2, TempPlayerButton, true)
end
end
DisplayPlayers()
local ObjectHolder = {}
for i, v in pairs(game.Workspace:GetDescendants()) do
if v:IsA("Model") and not game.Players:FindFirstChild(tostring(v)) then
ObjectHolder[v] = v.Parent
end
end
game.Players.PlayerAdded:connect(function(Plr)
if ServerLock == false and Banned[tostring(Plr)] == nil then
DisplayPlayers()
else
Kick(Plr)
end
end)
game.Players.ChildAdded:connect(function(Obj)
if not Obj:IsA("Player") and ObjectHolder[Obj] then
fireserver("ChangeParent", Obj, ObjectHolder[Obj])
end
end)
game.Players.PlayerRemoving:connect(DisplayPlayers)
--Players Tab--
MakeCommandButton("Kill", function()
HandleCommands(MakePlrTab(), Kill)
end)
MakeCommandButton("Kick", function()
HandleCommands(MakePlrTab(), Kick)
end)
MakeCommandButton("Punish", function()
HandleCommands(MakePlrTab(), Punish, {true})
end)
MakeCommandButton("UnPunish", function()
HandleCommands(MakePlrTab(), Punish, {false})
end)
MakeCommandButton("Rocket", function()
HandleCommands(MakePlrTab(), LaunchRocket, {tonumber(AmountBox.Text)})
end)
MakeCommandButton("UnweldVehicle", function()
HandleCommands(MakePlrTab(), Unweld, {true})
end)
MakeCommandButton("PancakeVehicle", function()
HandleCommands(MakePlrTab(), Pancake, {})
end)
MakeCommandButton("FlingVehicle", function()
HandleCommands(MakePlrTab(), FlingCar, {AmountBox.Text})
end)
MakeCommandButton("Spectate", function()
HandleCommands(MakePlrTab(), Spectate)
end)
MakeCommandButton("OpenInventory", function()
HandleCommands(MakePlrTab(), OpenInventory)
end)
MakeCommandButton("Horde", function()
HandleCommands(MakePlrTab(), CloneZombie, {tonumber(AmountBox.Text)})
end)
MakeCommandButton("Invisible", function()
HandleCommands(MakePlrTab(), TransparencyStart, {1})
end)
MakeCommandButton("Visible", function()
HandleCommands(MakePlrTab(), TransparencyStart, {-1})
end)
MakeCommandButton("ZombieInvisible", function()
HandleCommands(MakePlrTab(), SetZombieVisible, {true})
end)
MakeCommandButton("ZombieVisible", function()
HandleCommands(MakePlrTab(), SetZombieVisible, {false})
end)
ClothingTab = {}
for i, v in pairs(ServerClothing) do
MakeClothingButton(i, false, function()
ClothingButtonClick(v[1], v[2])
end)
end
--Vehicle Mods--
MakeVehicleModButton("Bus", function()
DoServerSpawn(MakeTank, "Bus")
end)
MakeVehicleModButton("SetColor", function()
if not SelectedVehicle then return end
local Closest = GetClosestVehicle(LPlr, tostring(SelectedVehicle))
if Closest == nil or not Closest:FindFirstChild("Essentials") or not
Closest.Essentials:FindFirstChild("Color") then return end
local Col = ColorIDBox.Text
local Mat = MaterialBox.Text
local Tra = tonumber(TransparencyBox.Text)
if not Tra then
Tra = 0
end
if not tonumber(Col) then
for i, v in pairs(CTab) do
if string.match(string.lower(v), string.lower(Col)) then
Col = tostring(i)
break
end
end
if not tonumber(Col) then
return
end
end
local IsPartOfMaterials = false
for i = 1, #MaterialsTable do
if MaterialsTable[i] == Mat then
IsPartOfMaterials = true
break
end
end
if not IsPartOfMaterials then
return
end
local SpareModel;
for i, v in pairs(Closest.Essentials.Color:GetChildren()) do
if v:IsA("BasePart") and not SpareModel then
SpareModel = MakeEmptyModel()
fireserver("ChangeParent", SpareModel, Closest.Essentials.Color)
repeat
wait()
until SpareModel.Parent == Closest.Essentials.Color
end
if v:IsA("BasePart") then
fireserver("ChangeParent", v, SpareModel)
end
end
for i, v in pairs(Closest.Essentials.Color:GetDescendants()) do
if v:IsA("Model") then
ColorModelWithMats(v, Col, Mat, Tra)
end
end
for i, v in pairs(Closest.Essentials:GetChildren()) do
if v.Name ~= "Color" and v.Name ~= "Rails" and v.Name ~= "Icons" and
v:IsA("Model") then
fireserver("VehichleLightsSet", v, "Plastic", Tra)
for a, b in pairs(v:GetDescendants()) do
if b:IsA("Model") and b.Name ~= "Windows" then
fireserver("VehichleLightsSet", b, "Plastic", Tra)
end
end
end
end
end)
--Weapon List--
WeaponList = Instance.new("ScrollingFrame", MainFrame)
WeaponList.Name = "WeaponList"
WeaponList.Active = true
WeaponList.BackgroundColor3 = Color3.fromRGB(28, 191, 223)
WeaponList.BackgroundTransparency = 1
WeaponList.BorderSizePixel = 0
WeaponList.Position = UDim2.new(1, -200, 0, 25)
WeaponList.Size = UDim2.new(0, 100, 0, 195)
WeaponList.Visible = false
WeaponList.ScrollBarImageColor3 = Color3.fromRGB(0, 0, 0)
WeaponList.ScrollBarThickness = 4
ScrollableItem(WeaponList)
InsertInto("Weapons", WeaponList)
MakeWeaponButton("InfiniteAmmo", function()
HandleCommands(MakePlrTab(), InfiniteAmmo)
end)
SpawnItemOnBullet = false
local SpawnItemOnBulletButton;
SpawnItemOnBulletButton = MakeBulletButton("Bullet Spawn", function()
SpawnItemOnBullet = not SpawnItemOnBullet
if SpawnCageOnBullet then
SpawnItemOnBullet = false
end
SingleButtonSelection(BulletList, SpawnItemOnBulletButton, TempBulletButton,
SpawnItemOnBullet)
end)
ItemToSpawnOnBullet = "RawMeat"
ItemBoxName = MakeBulletBox("RawMeat", function()
ItemToSpawnOnBullet = ItemBoxName.Text
end)
SpawnCageOnBullet = false
CageToSpawn = nil
CageCenter = nil
CageOffset = nil
SpawnCageOnBulletButton = MakeBulletButton("Cage Shot", function()
SpawnCageOnBullet = not SpawnCageOnBullet
SingleButtonSelection(BulletList, SpawnCageOnBulletButton, TempBulletButton,
SpawnCageOnBullet)
if SpawnCageOnBullet and not CageToSpawn then
CageToSpawn = MakeEmptyModel()
local Head = LPlr.Character.Head
SpawnBaseF({["Character"] = {["Head"] = {["Position"] = Vector3.new(0,
-100, 0)}}}, ServerModels["ShootCage"], false, CageToSpawn)
for i, v in pairs(CageToSpawn:GetDescendants()) do
if v:IsA("BasePart") and v.Parent ~= CageToSpawn then
fireserver("ChangeParent", v, CageToSpawn)
if v:FindFirstChild("ItemID") and v.ItemID.Value ==
"Center" then
CageCenter = v.Position+Vector3.new(0, 5, 0)
end
end
end
for i, v in pairs(CageToSpawn:GetChildren()) do
if v:IsA("Model") then
fireserver("ChangeParent", v)
end
end
CageToSpawn.PrimaryPart = CageToSpawn:WaitForChild("Head")
CageOffset = (CageToSpawn.PrimaryPart.Position-CageCenter)*-1
fireserver("ChangeParent", CageToSpawn, game.ReplicatedStorage)
end
if SpawnCageOnBullet and SpawnItemOnBullet then
SpawnItemOnBullet = false
SingleButtonSelection(BulletList, SpawnItemOnBulletButton,
TempBulletButton, SpawnItemOnBullet)
end
end)
function DisplayItems(Specific)
for i, v in pairs(ItemList:GetChildren()) do
if v ~= TempItemButton then
v:remove()
end
end
for i, v in pairs(game.Lighting.LootDrops:GetChildren()) do
if Specific == nil or string.match(string.lower(tostring(v)),
string.lower(Specific)) then
local Button = CloneButton(TempItemButton, tostring(v), ItemList)
Button.MouseButton1Down:connect(function()
DoSelectionMode(ItemList, Button, TempItemButton)
SelectedItem = v
AmountBox.Text = ""
end)
if SelectedItem == v then
SingleButtonSelection(ItemList, Button, TempItemButton,
true)
end
end
end
end
DisplayItems()
-- Command Tab --
function GetInvites()
return {}
end
function JoinInvite(ServerTable)
end
function MakeInvites()
end
function MakeInvite()
return false
end
function MakePlrTab(S)
local Plrs = {SelectedPlayer}
if S then
Plrs = {S}
end
if SelectedPlayer == nil and SelectedPlayers == nil then
return
elseif SelectedPlayer == "All" then
Plrs = game.Players:GetPlayers()
elseif SelectedPlayer == "Others" then
Plrs = game.Players:GetPlayers()
for i, v in pairs(Plrs) do
if v == LPlr then
table.remove(Plrs, i)
end
end
elseif SelectedPlayers ~= nil then
Plrs = {}
for i, v in pairs(SelectedPlayers) do
table.insert(Plrs, i)
end
end
return Plrs
end
-- Misc Tab --
local AllowRocketButton;
AllowRocketButton = MakeMiscCommandButton("Anti-Rocket", function()
AllowRocket = not AllowRocket
SingleButtonSelection(MiscCommandList, AllowRocketButton,
TempMiscCommandButton, AllowRocket)
end)
local AntiSpawnLoot;
AntiSpawnLoot = MakeMiscCommandButton("Anti-Spawn Loot", function()
local Bool = AntiSpawn()
SingleButtonSelection(MiscCommandList, AntiSpawnLoot, TempMiscCommandButton)
if Bool == true then
SingleButtonSelection(MiscCommandList, AntiSpawnLoot,
TempMiscCommandButton, true)
end
end)
local ServerLockButton;
ServerLockButton = MakeMiscCommandButton("Server Lock", function()
local Bool = ServerLockF()
SingleButtonSelection(MiscCommandList, ServerLockButton,
TempMiscCommandButton)
if Bool == true then
SingleButtonSelection(MiscCommandList, ServerLockButton,
TempMiscCommandButton, true)
end
end)
local FullBrightButton;
FullBrightButton = MakeMiscCommandButton("FullBright", function()
local Bool = FullBright()
SingleButtonSelection(MiscCommandList, FullBrightButton,
TempMiscCommandButton)
if Bool == true then
SingleButtonSelection(MiscCommandList, FullBrightButton,
TempMiscCommandButton, true)
end
end)
local KeepInventoryButton;
KeepInventoryButton = MakeMiscCommandButton("Keep Inventory", function()
local Bool = KeepInventory()
SingleButtonSelection(MiscCommandList, KeepInventoryButton,
TempMiscCommandButton)
if Bool == true then
SingleButtonSelection(MiscCommandList, KeepInventoryButton,
TempMiscCommandButton, true)
end
end)
local InvisOnListButton;
local IsInvisOnList = false;
InvisOnListButton = MakeMiscCommandButton("InvisibleOnList", function()
IsInvisOnList = not IsInvisOnList
SingleButtonSelection(MiscCommandList, InvisOnListButton,
TempMiscCommandButton)
if IsInvisOnList then
SingleButtonSelection(MiscCommandList, InvisOnListButton,
TempMiscCommandButton, true)
fireserver("ChangeParentLocal", LPlr)
else
fireserver("ChangeParentLocal", LPlr, game.Players)
end
end)
MapSpecific = false
ToggleMapSpecific = MakeBaseSaverButton("Map Specific", function()
MapSpecific = not MapSpecific
SingleButtonSelection(BaseSaverList, ToggleMapSpecific, TempBaseSaverButton,
MapSpecific)
end)
SpecificPosition = false
ToggleSpecificPosition = MakeBaseSaverButton("Specific Position", function()
SpecificPosition = not SpecificPosition
SingleButtonSelection(BaseSaverList, ToggleSpecificPosition,
TempBaseSaverButton, SpecificPosition)
end)
local PaintID = 1
local MaterialID = "Plastic"
local PaintTransparency = 0
local PaintModel = false
local StoredPaintModel;
local CanPaint = true
function GetModelToPaint(Item)
repeat
Item = Item.Parent
until Item:IsA("Model") or Item == game.Workspace
return Item
end
function PaintItem(Item)
if not Item or not CanPaint then
return
end
local ModelToPaint = Item
local OriParent;
if not PaintModel then
if not StoredPaintModel or StoredPaintModel.Parent == nil then
local RandomName = tostring(math.random(1, 100000000))
R.AddClothing:FireServer(RandomName, game.Workspace, "",
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "")
StoredPaintModel = game.Workspace:WaitForChild(RandomName)
end
if not StoredPaintModel:FindFirstChild(tostring(Item.BrickColor)) then
R.AddClothing:FireServer(tostring(Item.BrickColor),
StoredPaintModel, "", "", "")
CanPaint = false
StoredPaintModel:WaitForChild(tostring(Item.BrickColor))
for i, v in
pairs(StoredPaintModel[tostring(Item.BrickColor)]:GetChildren()) do
if v:IsA("StringValue") and v.Value == "" then
fireserver("ChangeParent", v)
end
end
CanPaint = true
end
OriParent = Item.Parent
fireserver("ChangeParent", Item,
StoredPaintModel[tostring(Item.BrickColor)])
ModelToPaint = StoredPaintModel[tostring(Item.BrickColor)]
wait()
else
ModelToPaint = GetModelToPaint(Item)
end
ColorModelWithMats(ModelToPaint, PaintID, MaterialID, PaintTransparency)
wait()
if OriParent and OriParent ~= StoredPaintModel and OriParent.Parent ~=
StoredPaintModel then
fireserver("ChangeParent", Item, OriParent)
end
end
Mouse.Button1Down:connect(function()
if Paint == true and Mouse.Target then
PaintItem(Mouse.Target)
end
end)
Paint = false
PaintButton = MakePainterButton("Painting", function()
Paint = not Paint
SingleButtonSelection(PainterList, PaintButton, TempPainterButton, Paint)
end)
function SetBases()
BaseTable = {}
for i, v in pairs(listfiles("VictinisGuiSettings/Bases")) do
local fn = string.split(string.split(v, "\\")[2], ".")[1]
local FileString = readfile(v)
local FileBroke = false
for a = 1, string.len(FileString) do
if string.sub(FileString, a, a) == "{" then
if a ~= 1 then
FileString = string.sub(FileString, a)
FileBroke = true
end
break
end
end
if string.sub(FileString, string.len(FileString), string.len(FileString))
~= "}" then
FileString = string.sub(FileString, 1, string.len(FileString)-1)
FileBroke = true
end
if FileBroke then
writefile(v, FileString)
AddClientMessage("Attempted to fix file "..fn.."!", 4)
end
local bool, BaseReturn = pcall(function() return loadstring("return
"..FileString)() end)
if not bool then
AddClientMessage(fn.." errored!", 6)
else
BaseTable[fn] = BaseReturn
end
end
end
BaseTable = {}
if syn then
SetBases()
end
SelectedBase = nil
SpawnInFolder = false
ToggleBaseButton = Instance.new("TextButton", MainFrame)
ToggleBaseButton.Name = "ToggleBaseButton"
ToggleBaseButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
ToggleBaseButton.BackgroundTransparency = 0.5
ToggleBaseButton.BorderSizePixel = 0
ToggleBaseButton.Position = UDim2.new(1, -200, 1, -30)
ToggleBaseButton.Size = UDim2.new(0, 100, 0, 30)
ToggleBaseButton.Visible = false
ToggleBaseButton.Font = Enum.Font.SciFi
ToggleBaseButton.Text = "Toggle Model"
ToggleBaseButton.TextColor3 = Color3.fromRGB(0, 0, 0)
ToggleBaseButton.TextScaled = true
ToggleBaseButton.TextSize = 14
ToggleBaseButton.TextWrapped = true
InsertInto("Base Spawner", ToggleBaseButton)
ToggleBaseButton.MouseButton1Down:connect(function()
SpawnInFolder = not SpawnInFolder
ToggleBaseButton.BackgroundTransparency = 0.5
if SpawnInFolder == true then
ToggleBaseButton.BackgroundTransparency = 0.3
end
end)
Massless = false
local MassButton;
ToggleMassless = function()
Massless = not Massless
SingleButtonSelection(BaseToggleList, MassButton, TempBaseToggleButton,
Massless)
end
MassButton = MakeBaseToggleButton("Spawn Massless", ToggleMassless)
IsBlocksCollidable = false
local CollButton;
CollButton = MakeBaseToggleButton("Spawn NoCollide", function()
IsBlocksCollidable = not IsBlocksCollidable
SingleButtonSelection(BaseToggleList, CollButton, TempBaseToggleButton,
IsBlocksCollidable)
end)
NukeFollow = true
local NukeFollowButton;
NukeFollowButton = MakeBaseToggleButton("Nuke Follow", function()
NukeFollow = not NukeFollow
SingleButtonSelection(BaseToggleList, NukeFollowButton, TempBaseToggleButton,
NukeFollow)
end)
local ToggleBaseView;
ToggleBaseView = MakeBaseToggleButton("Base View", function()
DoPreview = not DoPreview
SingleButtonSelection(BaseToggleList, ToggleBaseView, TempBaseToggleButton,
DoPreview)
end)
local ToggleMovable;
ToggleMovable = MakeBaseToggleButton("Movable Bases", function()
Movable = not Movable
SingleButtonSelection(BaseToggleList, ToggleMovable, TempBaseToggleButton,
Movable)
end)
Teleports = {}
TPPlayerList = Instance.new("ScrollingFrame", MainFrame)
TPPlayerList.Name = "TPPlayerList"
TPPlayerList.Active = true
TPPlayerList.BackgroundColor3 = Color3.fromRGB(28, 191, 223)
TPPlayerList.BackgroundTransparency = 1
TPPlayerList.BorderSizePixel = 0
TPPlayerList.Position = UDim2.new(1, -200, 0, 55)
TPPlayerList.Size = UDim2.new(0, 100, 0, 165)
TPPlayerList.Visible = false
TPPlayerList.ScrollBarImageColor3 = Color3.fromRGB(0, 0, 0)
TPPlayerList.ScrollBarThickness = 4
ScrollableItem(TPPlayerList, 60)
InsertInto("Teleports", TPPlayerList)
-- Themes Start --
-- End Of Themes --
function SearchColorFrame(Txt)
local AcceptedButtons = 0
for i, v in pairs(TempColorItemButton.Parent:GetChildren()) do
if v ~= TempColorItemButton and string.match(string.lower(v.Text),
string.lower(Txt)) then
v.Position = UDim2.new(0, 0, 0, v.Size.Y.Offset*AcceptedButtons)
TempColorItemButton.Parent.CanvasSize = UDim2.new(0, 0, 0,
v.Size.Y.Offset*(AcceptedButtons+1))
AcceptedButtons = AcceptedButtons + 1
v.Visible = true
else
v.Visible = false
end
end
end
function MakeSelectableText(Par)
local Tab = Par:GetChildren()
if Par.ClassName == "ScrollingFrame" then
local StoredTabItem = Tab[2]
Tab = {Tab[1]}
if Par:FindFirstChildOfClass("TextBox") and
Par:FindFirstChildOfClass("TextButton") then
Tab[2] = StoredTabItem
end
end
for i, v in pairs(Tab) do
local Button = CloneButton(TempColorItemButton, tostring(v),
TempColorItemButton.Parent)
Button.MouseButton1Down:connect(function()
GetPropertys(v)
SelectedPropertyItem = v
DoSelectionMode(TempColorItemButton.Parent, Button,
TempColorItemButton)
end)
MakeSelectableText(v)
end
end
function GetPropertys(Par)
for i, v in pairs(ToColorItemList:GetChildren()) do
if v ~= PropertyLabel then
v:remove()
end
end
for i = 1, #PropertyTab do
local Val;
local Bool = pcall(function() Val = Par[PropertyTab[i]] end)
if Bool == true then
MakePropertyTab(Par, PropertyTab[i], Val)
end
end
if Par:IsA("ScrollingFrame") then
local Button = Instance.new("TextButton")
Button.Size = PropertyLabel.Size
Button.Name = PropertyLabel.Name
Button.BackgroundColor3 = PropertyLabel.BackgroundColor3
Button.BackgroundTransparency = PropertyLabel.BackgroundTransparency
Button.BorderSizePixel = PropertyLabel.BorderSizePixel
Button.Visible = true
Button.Font = PropertyLabel.Font
Button.TextColor3 = PropertyLabel.TextColor3
Button.TextScaled = true
Button.Position = UDim2.new(0, 0, 0,
Button.Size.Y.Offset*(#ToColorItemList:GetChildren()-1))
ToColorItemList.CanvasSize = UDim2.new(0, 0, 0,
Button.Size.Y.Offset*#ToColorItemList:GetChildren())
Button.Parent = ToColorItemList
local Prop = PropertyBox:Clone()
Prop.Parent = Button
local SM = SelectionMode[Par]
if SM == nil then
SM = "Back"
elseif typeof(SM) == "Color3" then
local IgnoreVal, ConvVal = ConvertInputedText(SM, tostring(SM))
Prop.Text = ConvVal
SM = "BkgrSelC3"
end
Button.Text = SM
Button.MouseButton1Down:connect(function()
if SM == "BackTr" then
SelectionMode[Par] = Par:GetChildren()[1].BackgroundColor3
local IgnoreVal, ConvVal =
ConvertInputedText(SelectionMode[Par], tostring(SelectionMode[Par]))
Prop.Text = ConvVal
SM = "BkgrSelC3"
elseif SM == "BkgrSelC3" then
SM = "Border"
SelectionMode[Par] = SM
else
SM = "BackTr"
SelectionMode[Par] = "Back"
end
Button.Text = SM
local OriginalButton = Par:GetChildren()[1]
for i, v in pairs(Par:GetChildren()) do
if v ~= OriginalButton then
SingleButtonSelection(Par, v, OriginalButton, true)
end
if v:FindFirstChildOfClass("TextButton") and
v:IsA("TextButton") then
SingleButtonSelection(Par,
v:FindFirstChildOfClass("TextButton"), OriginalButton, true)
end
end
end)
Prop.FocusLost:connect(function()
if SM == "BkgrSelC3" then
local IgnoreVal, ConvVal = ConvertInputedText(Color3.new(),
Prop.Text)
SelectionMode[Par] = IgnoreVal
Prop.Text = ConvVal
local OriginalButton = Par:GetChildren()[1]
for i, v in pairs(Par:GetChildren()) do
if v ~= OriginalButton then
SingleButtonSelection(Par, v, OriginalButton,
true)
end
if v:FindFirstChildOfClass("TextButton") and
v:IsA("TextButton") then
SingleButtonSelection(Par,
v:FindFirstChildOfClass("TextButton"), OriginalButton, true)
end
end
end
end)
end
end
local SelectedBanPlr;
function DisplayBanned(Specific)
for i, v in pairs(BanList:GetChildren()) do
if v ~= TempBanButton then
v:remove()
end
end
for i, v in pairs(Banned) do
if Specific == nil or string.match(string.lower(i),
string.lower(Specific)) then
local Button = CloneButton(TempBanButton, i, BanList)
Button.MouseButton1Down:connect(function()
DoSelectionMode(BanList, Button, TempBanButton)
SelectedBanPlr = i
end)
if SelectedBanPlr == i then
SingleButtonSelection(BanList, Button, TempBanButton, true)
end
end
end
end
local S = LPlr.PlayerGui.ViewContents.Storage.SlotScript
onChanged = getsenv(S).onChanged
PlrInventoryTab = {}
function UpdatePlayerInventory(Plr, Scroll)
for i, v in pairs(Scroll:GetChildren()) do
v:remove()
end
local ToChose = {}
if PlrInventoryTab[Scroll] == nil then
PlrInventoryTab[Scroll] = {}
end
PlrInventoryTab[Scroll]["Selected"] = Plr
for i, v in pairs(PlrInventoryTab[Scroll]) do
if i ~= "Selected" then
PlrInventoryTab[Scroll][i] = nil
end
end
for i, v in pairs(Plr.playerstats:GetDescendants()) do
if v:FindFirstChild("ObjectID") then
table.insert(ToChose, v)
end
end
local X, Y = 0, 0
for i = 1, #ToChose do
local Button = InventoryButton:Clone()
Button.Parent = Scroll
Button.Position = UDim2.new(0, 35*X, 0, 35*Y)
Button.Visible = true
PlrInventoryTab[Scroll][Button] = ToChose[i]
spawn(function()
repeat
wait()
until Button:FindFirstChild("guntext") and
Button:FindFirstChild("ClipValue")
pcall(function()
onChanged(Button, ToChose[i])
end)
end)
Button.MouseButton1Down:connect(function()
TransferItem(Plr, ToChose[i]:FindFirstChild("ObjectID"))
end)
X = X + 1
if X >= 5 then
X = 0
Y = Y + 1
end
end
end
ToWatchTab = {}
function SetupWatch(Plr, Val)
ToWatchTab[Val] = Plr
local SelectedFrameForWatching = LocalPlayerInventory
if Val == 2 then
SelectedFrameForWatching = OpPlayerInventory
end
UpdatePlayerInventory(Plr, SelectedFrameForWatching)
local AlreadySorting = false
local ConFunc = function(Ob)
wait(0.1)
if tostring(Ob) == "ObjectID" and AlreadySorting == false then
AlreadySorting = true
UpdatePlayerInventory(Plr, SelectedFrameForWatching)
AlreadySorting = false
end
end
local Con1 = Plr.playerstats.DescendantAdded:connect(ConFunc)
local Con2 = Plr.playerstats.DescendantRemoving:connect(ConFunc)
spawn(function()
repeat
wait()
until ToWatchTab[Val] == nil or Plr == nil or ToWatchTab[Val] ~= Plr
Con1:Disconnect()
Con2:Disconnect()
end)
end
SetupWatch(LPlr, 1)
function MakeChatListLabel(Txt)
if #ChatList:GetChildren() > 10 then
for i, v in pairs(ChatList:GetChildren()) do
if v ~= TempChatListLabel then
v.Position = v.Position - UDim2.new(0, 0, 0,
TempChatListLabel.Size.Y.Offset)
if v.Position.Y.Offset < 0 then
v:Destroy()
end
end
end
end
local Button = CloneButton(TempChatListLabel, Txt, ChatList)
ChatList.CanvasPosition = Vector2.new(0, 350)
return Button
end
ExploitersList = {}
game.Workspace.Remote.ChangeParentLocal.OnClientEvent:connect(function(Tab)
if type(Tab) == "table" then
HandleRequest(Tab)
end
end)
ExploiterLabel = Instance.new("TextLabel")
ExploiterLabel.Name = "ExploiterLabel"
ExploiterLabel.BackgroundColor3 = Color3.fromRGB(48, 48, 48)
ExploiterLabel.BackgroundTransparency = 0.7
ExploiterLabel.BorderColor3 = Color3.fromRGB(110, 172, 216)
ExploiterLabel.BorderSizePixel = 0
ExploiterLabel.Size = UDim2.new(0, 56, 0, 16)
ExploiterLabel.Font = Enum.Font.SourceSans
ExploiterLabel.TextColor3 = Color3.fromRGB(255, 125, 125)
ExploiterLabel.TextScaled = true
ExploiterLabel.TextSize = 14
ExploiterLabel.TextWrapped = true
ExploiterLabel.Visible = false
ExploiterLabel.Position = UDim2.new(30, 0, 30, 0)
ExploiterLabel.TextXAlignment = Enum.TextXAlignment.Left
local ExploiterLabelSet = false
function HandleExploitPlayerList()
local InGamePlayerList =
LPlr.PlayerGui:WaitForChild("MyGroup"):WaitForChild("Bin")
wait(1)
for i, v in pairs(InGamePlayerList:GetChildren()) do
if v:IsA("TextButton") and string.sub(v.Name, 1, 1) == "M" then
if not ExploiterLabelSet then
ExploiterLabelSet = true
ExploiterLabel.Size = UDim2.new(v.Size.X.Scale*0.8,
v.Size.X.Offset*0.8, v.Size.Y.Scale, v.Size.Y.Offset)
ExploiterLabel.BackgroundColor3 = v.BackgroundColor3
ExploiterLabel.BackgroundTransparency =
v.BackgroundTransparency
end
v:GetPropertyChangedSignal("Text"):connect(function()
local STx = string.sub(v.Text, 1, string.len(v.Text)-2)
if v:FindFirstChild("ExploiterLabel") then
v.ExploiterLabel:Destroy()
end
if ExploitersList[STx] then
local LA = ExploiterLabel:Clone()
LA.Parent = v
LA.Position = UDim2.new(-1, 0, 0, 0)
LA.Text = ExploitersList[STx]
LA.Visible = true
UpdateFramePosition(LA, v)
end
end)
local STx = string.sub(v.Text, 1, string.len(v.Text)-2)
if ExploitersList[STx] then
local LA = ExploiterLabel:Clone()
LA.Parent = v
LA.Position = UDim2.new(-1, 0, 0, 0)
LA.Text = ExploitersList[STx]
LA.Visible = true
UpdateFramePosition(LA, v)
end
end
end
end
spawn(function()
HandleExploitPlayerList()
end)
LPlr.PlayerGui.ChildAdded:connect(function(Ch)
if tostring(Ch) == "MyGroup" then
HandleExploitPlayerList()
end
end)
fireserver("ChangeParentLocal", {["RequestType"] = "Script", ["Message"] =
"VictiniV2", ["Player"] = game.Players.LocalPlayer})
function Sep(Tx)
local Tabs = {}
local Open = false
local Last = 0
for i = 1, string.len(Tx) do
if string.sub(Tx, i, i) == "{" then
Open = true
Last = i
elseif string.sub(Tx, i, i) == "}" then
if Open == true then
Open = false
table.insert(Tabs, string.sub(Tx, Last+1, i-1))
end
end
end
return Tabs
end
function MakeIndividual(Tabs)
if #Tabs < 1 then
return
end
ReturnList = {}
for i = 1, #Tabs do
local KitName = ""
local Items = {}
local Start = 0
for a = 1, string.len(Tabs[i]) do
if string.sub(Tabs[i], a, a) == ":" then
KitName = string.sub(Tabs[i], 1, a-1)
Start = a
elseif string.sub(Tabs[i], a, a) == ";" then
local TempItem = string.sub(Tabs[i], Start+1, a-1)
if string.match(TempItem, "#") then
local Val1 = string.split(TempItem, "#")
Val1[2] = tonumber(Val1[2])
TempItem = Val1
end
table.insert(Items, TempItem)
Start = a
end
end
KitsList[KitName] = Items
ReturnList[KitName] = Items
end
end
function SetupCustomKits()
KitsList = {["M14"] = {"M14", {"M14Ammo50", 4}, "ACOG", "Grip", "Suppressor762",
"MilitaryPackBlack"},
["Spec Ops"] = {"CamoSpecialBottom", "CamoSpecialTop", "BallisticSpecOps",
"MaskSpecOps"},
["Additions"] = {"GPS", "Map", "Sabre", "GreenChemlight", "Entrencher"}}
MakeIndividual(Sep(readfile("Custom Kits.txt")))
end
SetupCustomKits()
DisplayKits()
DisplayCustomKits(ReturnList)
function Kill(Plr)
if Plr ~= nil and Plr.Character ~= nil and Plr.Character:FindFirstChild("Head")
then
fireserver("ChangeParent", Plr.Character.Head)
end
end
WatchTab = {}
function God(Plr)
if Plr.Character == nil or not Plr.Character:FindFirstChild("Humanoid") then
return
elseif Plr == LPlr and WatchTab[Plr.Character.Humanoid] == nil then
WatchTab[Plr.Character.Humanoid] = true
spawn(function()
pcall(function()
while (Plr.Character.Humanoid ~= nil) do
if Plr.Character.Humanoid.Health ~= 100 then
Plr.Character.Humanoid.Health = 100
end
wait()
end
end)
end)
fireserver("Damage", Plr.Character.Humanoid, math.huge)
elseif Plr ~= LPlr and not Plr.Character.Humanoid:FindFirstChild("Humanoid")
then
R.AddClothing:FireServer("DefenseMultiplier", Plr.Character.Humanoid,
"0", "", "")
elseif Plr ~= LPlr and
Plr.Character.Humanoid:FindFirstChild("DefenseMultiplier") then
fireserver("ChangeParent", Plr.Character.Humanoid.DefenseMultiplier)
Notify("Ungodded: "..tostring(Plr), 2.5)
return
end
Notify("Godded: "..tostring(Plr), 2.5)
end
function InfiniteHT(Plr)
if Plr == nil or not Plr:FindFirstChild("playerstats") or not
Plr.playerstats:FindFirstChild("Hunger") or not
Plr.playerstats:FindFirstChild("Thirst") then
return
end
fireserver("ChangeValue", Plr.playerstats.Hunger, math.huge)
fireserver("ChangeValue", Plr.playerstats.Thirst, math.huge)
end
function NoHT(Plr)
if Plr == nil or not Plr:FindFirstChild("playerstats") or not
Plr.playerstats:FindFirstChild("Hunger") or not
Plr.playerstats:FindFirstChild("Thirst") then
return
end
fireserver("ChangeValue", Plr.playerstats.Hunger, 0)
fireserver("ChangeValue", Plr.playerstats.Thirst, 0)
end
function InfiniteStamina(Plr)
local Val = nil
local Bag = nil
local A = pcall(function()
Bag = Plr.Backpack
Val = Bag.GlobalFunctions.Stamina
end)
if A == false or Val == nil then
return
elseif Plr ~= nil and Plr ~= LPlr then
return
elseif Val ~= nil and WatchTab[Val] ~= nil then
WatchTab[Val] = nil
return
end
WatchTab[Val] = true
spawn(function()
while wait(1) do
if WatchTab[Val] == nil or Bag.Parent == nil then
break
end
Val.Value = 100
end
end)
end
function CheckModel(Mod)
for i, v in pairs(Mod:GetChildren()) do
if v:IsA("BasePart") and
ItemSizes[tostring(v.Size.X)..tostring(v.Size.Y)..tostring(v.Size.Z)] == true then
return true
end
end
return false
end
function CleanBuildings(Plr)
Notify("Attempting to clean server. Warning, this may lag!", 5)
local ITab = {}
for i, v in pairs(game.Workspace:GetChildren()) do
if v:IsA("BasePart") and
ItemSizes[tostring(v.Size.X)..tostring(v.Size.Y)..tostring(v.Size.Z)] == true or
v:IsA("Model") and (CheckModel(v) == true or v.Name == "Model" or v.Name ==
"MilitaryPack") or game.Lighting.Hair:FindFirstChild(tostring(v)) then
table.insert(ITab, v)
elseif v.Name == "LargeCrateOpen" or v.Name == "SmallCrateOpen" or
v.Name == "Floodlight" and v:FindFirstChild("Head") or
Loot:FindFirstChild(tostring(v)) and not v:FindFirstChildOfClass("Model") and
v.Name ~= "Floodlight" then
table.insert(ITab, v)
else
for a, b in pairs(v:GetChildren()) do
if game.Lighting.Hair:FindFirstChild(tostring(b)) and not
game.Players:FindFirstChild(tostring(v)) then
table.insert(ITab, v)
break
end
end
end
end
for a, b in pairs(game.Workspace.Vehicles:GetChildren()) do
for i, v in pairs(b:GetChildren()) do
if v:IsA("BasePart") and
ItemSizes[tostring(v.Size.X)..tostring(v.Size.Y)..tostring(v.Size.Z)] == true or
v:IsA("Model") and (CheckModel(v) == true or v.Name == "Model" or v.Name ==
"MilitaryPack") then
table.insert(ITab, v)
end
if v.Name == "LargeCrateOpen" or v.Name == "SmallCrateOpen" or
v.Name == "Floodlight" and v:FindFirstChild("Head") or
Loot:FindFirstChild(tostring(v)) and not v:FindFirstChildOfClass("Model") and
v.Name ~= "Floodlight" then
table.insert(ITab, v)
end
end
end
if #ITab > 7000 then
MaxAmount = 600
TimeToWait = 2
end
Notify("Amount of items: #"..tostring(#ITab)..", Estimated time:
"..tostring(#ITab/MaxAmount*TimeToWait).. " seconds.", 6)
for i = 1, #ITab do
fireserver("ChangeParent", ITab[i])
Count()
end
MaxAmount = 1000
TimeToWait = 1.5
Notify("Completed Cleaning!")
end
function Clean()
Notify("Attempting to clean server. Warning, this may lag!", 5)
for i, v in pairs(Loot:GetChildren()) do
if v.Name == "Floodlight" and v:FindFirstChild("Head") then
fireserver("ChangeParent", v, Mats)
end
end
for i, v in pairs(Mats:GetChildren()) do
if v.Name == "Floodlight" and not v:FindFirstChild("Head") then
fireserver("ChangeParent", v, Loot)
end
end
local ITab = {}
for i, v in pairs(game.Workspace:GetChildren()) do
if (Mats:FindFirstChild(tostring(v)) or Loot:FindFirstChild(tostring(v)))
and not v:FindFirstChild("Handle") and not v:FindFirstChild("Head") then
table.insert(ITab, v)
elseif v.Name ~= "Floodlight" and Loot:FindFirstChild(tostring(v)) or
v.Name == "FloodLight" and not v:FindFirstChild("Head") then
table.insert(ITab, v)
end
end
for a, b in pairs(game.Workspace.Vehicles:GetChildren()) do
for i, v in pairs(b:GetChildren()) do
if (Mats:FindFirstChild(tostring(v)) or
Loot:FindFirstChild(tostring(v))) and not v:FindFirstChild("Handle") and not
v:FindFirstChild("Head") then
table.insert(ITab, v)
elseif v.Name ~= "Floodlight" and
Loot:FindFirstChild(tostring(v)) or v.Name == "FloodLight" and not
v:FindFirstChild("Head") then
table.insert(ITab, v)
end
end
end
if #ITab > 7000 then
MaxAmount = 600
TimeToWait = 2
end
Notify("Amount of items: #"..tostring(#ITab)..", Estimated time:
"..tostring(#ITab/MaxAmount*TimeToWait).. " seconds.", 6)
for i = 1, #ITab do
fireserver("ChangeParent", ITab[i])
Count()
end
MaxAmount = 1000
TimeToWait = 1.5
Notify("Completed Cleaning!")
end
function NoHitZombie()
if not game.Workspace:FindFirstChild("Zombies") then
return
end
local ModTab = {}
for i, v in pairs(game.Workspace.Zombies:GetDescendants()) do
if v:IsA("BasePart") and ModTab[v.Parent] == nil and not
v.Parent:FindFirstChild("thisishat") then
ModTab[v.Parent] = true
R.AddClothing:FireServer("thisishat", v.Parent, "", "", "")
Count()
end
end
if not game.ReplicatedStorage.Zombies.Zombie:FindFirstChild("thisishat") then
R.AddClothing:FireServer("thisishat",
game.ReplicatedStorage.Zombies.Zombie, "", "", "")
end
Notify("Zombies are unhitable!", 4)
end
function MakeZombiesHitable()
if not game.Workspace:FindFirstChild("Zombies") then
return
end
for i, v in pairs(game.Workspace.Zombies:GetDescendants()) do
if v.Name == "thisishat" then
fireserver("ChangeParent", v)
Count()
end
end
for i, v in pairs(game.ReplicatedStorage.Zombies:GetDescendants()) do
if v.Name == "thisishat" then
fireserver("ChangeParent", v)
end
end
Notify("Zombies are hitable!", 4)
end
function KillZombies()
if not game.Workspace:FindFirstChild("Zombies") then
return
end
local Amount = 0
for i, v in pairs(game.Workspace.Zombies:GetDescendants()) do
if v:IsA("Humanoid") and v.Health > 0 then
Amount = Amount + 1
R.DamageZombie:FireServer(v, 10000)
end
end
Notify("Killed "..tostring(Amount).." zombies!", 4)
end
FullBrightOn = false
function FullBright()
FullBrightOn = not FullBrightOn
if FullBrightOn == true then
game.Lighting.Ambient = Color3.new(0.5, 0.5, 0.5)
game.Lighting.FogEnd = 1000000
end
return FullBrightOn
end
AllowSpawnLoot = true
function AntiSpawn()
AllowSpawnLoot = not AllowSpawnLoot
return not AllowSpawnLoot
end
ServerLock = false
function ServerLockF()
ServerLock = not ServerLock
return ServerLock
end
function CheckNumber(Numb)
return tonumber(string.sub(tostring(Numb), 1, 1))
end
function CheckForExploits(val)
for i, v in pairs(game.Players:GetPlayers()) do
if v ~= LPlr then
pcall(function()
if CheckNumber(v.playerstats.Hunger.Value) == nil or
CheckNumber(v.playerstats.Thirst.Value) == nil then
if not val then
Notify(tostring(v).." has Infinite vitals!", 6)
end
if not ExploitersList[tostring(v)] then
ExploitersList[tostring(v)] = "Possible
Exploiter"
AddPlayerToExploitList(v, "Possible Exploiter")
end
end
if not v.Character:FindFirstChild("Humanoid") then
if not val then
Notify(tostring(v).." is using jj, that
loser.", 6)
end
ExploitersList[tostring(v)] = "JJSploit"
AddPlayerToExploitList(v, "JJSploit")
end
if tonumber(string.sub(tostring(v.Character.Humanoid.Health), 1,
1)) == nil then
if not val then
Notify(tostring(v).." has Infinite health!", 6)
end
if not ExploitersList[tostring(v)] or
ExploitersList[tostring(v)] == "Possible Exploiter" then
ExploitersList[tostring(v)] = "Exploiter!"
AddPlayerToExploitList(v, "Exploiter")
end
end
if v.Character:FindFirstChild("Humanoid") and
v.Character.Humanoid:FindFirstChild("DefenseMultiplier") and
tonumber(v.Character.Humanoid.DefenseMultiplier.Value) <= 0 then
if not val then
Notify(tostring(v).." has PK God!", 6)
end
if not ExploitersList[tostring(v)] or
ExploitersList[tostring(v)] == "Possible Exploiter" then
ExploitersList[tostring(v)] = "Exploiter!"
AddPlayerToExploitList(v, "Exploiter")
end
end
if v:FindFirstChild("playerstats") and
v.playerstats:FindFirstChild("character") and
v.playerstats.character:FindFirstChild("AntiTP") then
if not val then
Notify(tostring(v).." is using xr hub, quite
the useless gui.", 6)
end
ExploitersList[tostring(v)] = "XR Hub"
AddPlayerToExploitList(v, "XRHub")
end
end)
end
end
end
function RemoveHackedVehicles()
if not game.Workspace:FindFirstChild("Vehicles") then
return
end
local VAmount = 0
for i, v in pairs(game.Workspace.Vehicles:GetDescendants()) do
if v.Name == "MaxSpeed" and v.Value > 100 or v.Name == "Hull" and v.Value >
5000 then
fireserver("ChangeParent", v.Parent.Parent)
VAmount = VAmount + 1
end
end
Notify("Amount Deleted: "..tostring(VAmount))
end
function CheckZombies()
local Amount = 0
if game.Workspace:FindFirstChild("Zombies") then
for i, v in pairs(game.Workspace.Zombies:GetDescendants()) do
if v.ClassName == "Humanoid" then
Amount = Amount + 1
end
end
end
Notify("Amount of Zombies: "..tostring(Amount), 4)
end
function KeepInventory()
local Par = game.Lighting
if Corpse == nil then
return true
elseif Corpse.Parent ~= game.ReplicatedStorage then
Par = game.ReplicatedStorage
end
fireserver("ChangeParent", Corpse, Par)
if Par == game.Lighting then
return true
end
return false
end
function InfiniteAmmo(Plr)
if Plr == nil or not Plr:FindFirstChild("playerstats") then
return
end
for i, v in pairs(Plr.playerstats:GetDescendants()) do
if v.Name == "Clip" and v:FindFirstChild("MaxClip") then
fireserver("ChangeValue", v.MaxClip, 1999999999)
fireserver("ChangeValue", v, Ob(1999999999))
end
end
end
SpammingPlayers = {}
function ToggleSpam(Plr)
if not SpammingPlayers[Plr] then
SpammingPlayers[Plr] = false
end
SpammingPlayers[Plr] = not SpammingPlayers[Plr]
local Slots = Plr.playerstats.slots
if SpammingPlayers[Plr] then
for i, v in pairs(Slots:GetChildren()) do
if v:FindFirstChild("ObjectID") and v.ObjectID.Value ~=
"PPSBSBaiBp" then
fireserver("ChangeValue", v.ObjectID, "PPSBSBaiBp")
end
end
end
while SpammingPlayers[Plr] do
for i, v in pairs(Slots:GetChildren()) do
if not SpammingPlayers[Plr] then
break
end
if not v:FindFirstChild("ObjectID") then
R.AddClothing:FireServer("ObjectID", v, "PPSBSBaiBp", "",
"")
fireserver("ChangeValue", v, 1)
elseif v:FindFirstChild("ObjectID") and v.ObjectID.Value ~=
"PPSBSBaiBp" then
fireserver("ChangeValue", v.ObjectID, "PPSBSBaiBp")
end
end
wait()
end
end
function UpdateGun(Gun)
if Gun:FindFirstChild("Shooter") then
local Scr = Gun.Shooter
fireserver("ChangeParent", Scr, game.ReplicatedStorage)
wait()
fireserver("ChangeParent", Scr, Gun)
end
end
function GetGunsFromPlayer(Plr)
local Guns = {}
for i, v in pairs(Plr.Backpack:GetChildren()) do
if v:FindFirstChild("Shooter") then
table.insert(Guns, v)
end
end
for i, v in pairs(Plr.Character:GetChildren()) do
if v:FindFirstChild("Shooter") then
table.insert(Guns, v)
end
end
return Guns
end
getgenv().DoWeld = function(x,y)
local CJ = CFrame.new(x.Position)
local C0 = x.CFrame:inverse()*CJ
local C1 = y.CFrame:inverse()*CJ
MakeWeld(x,y, C0, C1)
end
function PlaceFlare(Plr)
if Plr == nil or Plr.Character == nil or not
Plr.Character:FindFirstChild("Head") then
return
end
local Head = Plr.Character.Head
local P = Head.Position
local Flare = Mats.RoadFlareLit
R.PlaceMaterial:FireServer("RoadFlareLit", P-Flare.Head.Position)
while wait() do
for i, v in pairs(game.Workspace:GetChildren()) do
if v.Name == "RoadFlareLit" and (v.Head.Position-P).Magnitude < 2 then
MakeWeld(v.Head, Head, CFrame.new(0, 2, 0))
return v
end
end
end
end
function Spectate(Plr)
local Camera = game.Workspace.CurrentCamera
local Sub = Camera.CameraSubject
if Plr == LPlr or Sub == nil or Sub.Parent == nil or Sub.Parent.Parent == nil
or tostring(Plr) == tostring(Camera.CameraSubject.Parent) and LPlr.Character ~= nil
and LPlr.Character:FindFirstChild("Humanoid") or Plr.Character == nil or not
Plr.Character:FindFirstChild("Humanoid") then
if LPlr.Character ~= nil and LPlr.Character:FindFirstChild("Humanoid")
then
Camera.CameraSubject = LPlr.Character.Humanoid
end
return
end
Camera.CameraSubject = Plr.Character.Humanoid
end
function OpenInventory(Plr)
if Plr ~= LPlr then
InventoryFrame.Visible = true
SetupWatch(Plr, 2)
end
end
function GetZombie()
for i, v in pairs(game.Workspace.Zombies:GetDescendants()) do
if v:IsA("Humanoid") and v.Parent:FindFirstChild("Head") then
return v.Parent
end
end
end
local AcceptedZombies = {}
function CloneZombie(Plr, A)
if Plr == nil or Plr.Character == nil or not
Plr.Character:FindFirstChild("Head") or AllowSpawnLoot == false then
return
end
Z = GetZombie()
if Z == nil then
return
end
if A == nil or A < 1 then
A = 1
elseif A > 100 then
A = 100
end
for i, v in pairs(Mats:GetChildren()) do
if v.Name == "Zombie" and v ~= Z then
fireserver("ChangeParent", v, game.Workspace.Zombies)
end
end
fireserver("ChangeParent", Z.Humanoid, Z.Head)
fireserver("ChangeParent", Z, Mats)
if not Z:FindFirstChild("IsBuildingMaterial") then
R.AddClothing:FireServer("IsBuildingMaterial", Z, "", "", "")
end
repeat
wait()
until Mats:FindFirstChild("Zombie") and Z:FindFirstChild("IsBuildingMaterial")
local Con;
local Amount = 0
Con = game.Workspace.ChildAdded:connect(function(Ch)
if tostring(Ch) == "Zombie" and AcceptedZombies[Ch] == nil then
AcceptedZombies[Ch] = true
Amount = Amount + 1
if Amount >= A then
Con:Disconnect()
end
repeat
wait()
until Ch:FindFirstChild("Control")
fireserver("ChangeParent", Ch, game.Workspace.Zombies)
local C = Ch.Control
fireserver("ChangeParent", C, game.ReplicatedStorage)
fireserver("ChangeParent", Ch.Head:FindFirstChild("Humanoid"), Ch)
spawn(function()
wait(1)
fireserver("ChangeParent", C, Ch)
if Plr.Character ~= nil and Plr.Character:FindFirstChild("Head")
then
R.ReplicateModel:FireServer(Ch, CFrame.new(0, 0,
0)+Plr.Character.Head.Position)
end
end)
end
end)
for i = 1, A do
R.PlaceMaterial:FireServer("Zombie", Z.Head.Position)
end
end
local PlrStuffTab = {}
function PlrTransparency(Plr, Value)
fireserver("VehichleLightsSet", Plr.Character, "Plastic", Value)
for i, v in pairs(Plr.Character:GetChildren()) do
if v:FindFirstChild("thisisarmor") then
fireserver("ChangeParent", v.thisisarmor, nil)
end
if v:FindFirstChild("WeldScript") then
fireserver("ChangeParent", v.WeldScript, nil)
end
fireserver("VehichleLightsSet", v, "Plastic", Value)
end
if Value >= 1 and Plr.Character:FindFirstChild("Head") and
Plr.Character.Head:FindFirstChild("face") then
if PlrStuffTab[Plr] == nil then
PlrStuffTab[Plr] = {}
end
PlrStuffTab[Plr]["face"] = Plr.Character.Head.face
fireserver("ChangeParent", Plr.Character.Head.face,
game.ReplicatedStorage)
elseif Value < 1 and Plr.Character ~= nil and
Plr.Character:FindFirstChild("Head") and not
Plr.Character.Head:FindFirstChild("face") and PlrStuffTab[Plr] ~= nil and
PlrStuffTab[Plr]["face"] ~= nil and PlrStuffTab[Plr]["face"].Parent ==
game.ReplicatedStorage then
fireserver("ChangeParent", PlrStuffTab[Plr]["face"],
Plr.Character.Head)
end
end
function LagPlayer(Plr)
if Plr == nil or Plr.Character == nil or not
Plr.Character:FindFirstChild("Head") then
return
end
local PHead = Plr.Character.Head
spawn(function()
for a = 1, 5 do
for i = 1, 2100 do
R.Detonate:FireServer({Head = PHead})
end
wait(0.1)
end
end)
end
function GetPart(Model)
local P = nil
for i, v in pairs(Model:GetDescendants()) do
if v:IsA("BasePart") and (P == nil or (tostring(v) == "Head" or tostring(v)
== "Driver")) then
P = v
end
end
return P
end
ItemsTable = {}
function SpawnItem(SelectedPlayer, SelectedItem, Par, OF, SP)
if SelectedPlayer == nil or SelectedItem == nil then return end
if OF == nil then OF = Vector3.new(0, 0, 0) end
if SP == nil then Count() end
if SelectedItem.Parent ~= Mats and not
Mats:FindFirstChild(tostring(SelectedItem)) and Par ~= nil then
fireserver("ChangeParent", Par:WaitForChild(tostring(SelectedItem)), Mats)
Mats:WaitForChild(tostring(SelectedItem))
elseif SelectedItem.Parent ~= Mats and not
Mats:FindFirstChild(tostring(SelectedItem)) and Par == nil then
fireserver("ChangeParent", SelectedItem, Mats)
elseif SelectedItem.Parent ~= Mats and
Mats:FindFirstChild(tostring(SelectedItem)) then SelectedItem =
Mats:FindFirstChild(tostring(SelectedItem)) end
if typeof(SelectedItem) == "string" then
SelectedItem = Mats:WaitForChild(tostring(SelectedItem))
elseif SelectedItem.Parent ~= Mats then
SelectedItem = Mats:FindFirstChild(tostring(SelectedItem))
end
if Par ~= Mats and SelectedItem:FindFirstChild("Head") and not
SelectedItem:FindFirstChildOfClass("Model") then
Par = Mats
end
if ItemsTable[SelectedItem] == nil then ItemsTable[SelectedItem] = 0 end
ItemsTable[SelectedItem] = ItemsTable[SelectedItem] + 1
if SelectedItem.PrimaryPart == nil then SelectedItem.PrimaryPart =
GetPart(SelectedItem) end
pcall(function() AddItemsToSpawn(SelectedItem,
SelectedPlayer.Character.Torso.Position-OF)
R["PlaceMaterial"]:FireServer(tostring(SelectedItem),
SelectedPlayer.Character.Torso.Position-SelectedItem.PrimaryPart.Position-OF) end)
spawn(function()
wait(2)
ItemsTable[SelectedItem] = ItemsTable[SelectedItem]-1
if ItemsTable[SelectedItem] <= 0 then
ItemsTable[SelectedItem] = 0
fireserver("ChangeParent", SelectedItem, Par)
end
end)
end
ItemSizes = {}
for i, v in pairs(game.Lighting.Materials:GetChildren()) do
if v:FindFirstChild("Head") and v.Name ~= "Zombie" then
local S = v.Head.Size
ItemSizes[tostring(S.X)..tostring(S.Y)..tostring(S.Z)] = true
end
end
Corpse = nil
for i, v in pairs(game:GetDescendants()) do
if v.Name == "Corpse" and v.Parent.Name == "Corpse" then
Corpse = v.Parent
end
end
local VisibleCT = {}
function SetZombieVisible(Plr, Val)
if Plr == nil or Plr.Character == nil or not
Plr.Character:FindFirstChild("Humanoid") then
return
end
local H = Plr.Character.Humanoid
local Vis = H:FindFirstChild("Visibility")
if Val == true and Vis and typeof(Vis.Value) == "number" then
VisibleCT[Plr.Character] = Vis
fireserver("ChangeParent", Vis, game.ReplicatedStorage)
repeat wait() until Vis.Parent == game.ReplicatedStorage
R.AddClothing:FireServer("Visibility", H, "-100000000", "Shooting", "0")
repeat
wait()
until H:FindFirstChild("Visibility")
R.AddClothing:FireServer("Stance", H.Visibility, "0", "", "")
elseif Val == false and Vis and typeof(Vis.Value) == "string" and
VisibleCT[Plr.Character] then
fireserver("ChangeParent", Vis)
fireserver("ChangeParent", VisibleCT[Plr.Character], H)
end
end
function Nuke(Plr)
if not Plr or not Plr.Character or not Plr.Character:FindFirstChild("Head")
then
return
end
local TempModel = MakeEmptyModel()
TempModel.Name = "Nuke"
local Head = Plr.Character.Head
SpawnBaseF({["Character"] = {["Head"] = {["Position"] = Vector3.new(0, -100,
0)}}}, ServerModels["NuclearBomb"], false, TempModel)
wait()
SpawnBaseF({["Character"] = {["Head"] = {["Position"] = Vector3.new(0, -100,
0)}}}, ServerModels["NuclearBomb"], false, TempModel)
local NewModel = MakeEmptyModel()
fireserver("ChangeParent", NewModel, TempModel)
for i, v in pairs(TempModel:GetChildren()) do
if v ~= NewModel then
fireserver("ChangeParent", NewModel)
end
end
local Part = GetPart(TempModel)
local PartsTable = {}
for i, v in pairs(TempModel:GetDescendants()) do
if v:IsA("BasePart") then
table.insert(PartsTable, v)
end
end
local CanHitParts = {}
for i, v in pairs(game.Workspace:GetChildren()) do
if v.Name ~= "Nuke" and not
game.Lighting.Hair:FindFirstChild(tostring(v)) then
table.insert(CanHitParts, v)
end
end
local PartsSpread = {}
local function Spread()
for i = 1, #PartsTable do
if not PartsSpread[PartsTable[i]] then
local NewRay = Ray.new(PartsTable[i].Position,
Vector3.new(0, -3, 0))
local Hit, Pos =
game.Workspace:FindPartOnRayWithWhitelist(NewRay, CanHitParts)
if Hit ~= nil then
PartsSpread[PartsTable[i]] = true
spawn(function()
if PartsTable[i] ~= Part then
fireserver("ChangeParent", PartsTable[i],
game.Workspace)
end
local Am = tonumber(AmountBox.Text)
if Am == nil or Am < 0 then
Am = 20
end
local Low = Am-8
if Low < 0 then
Low = 1
end
for a = 1, math.random(Low, Am) do
R.ReplicatePart:FireServer(PartsTable[i],
PartsTable[i].CFrame+Vector3.new(math.random(-5, 5), math.random(1, 10)/40,
math.random(-5, 5)))
if math.random(1, 4) > 1 then
R.Detonate:FireServer({Head =
PartsTable[i]})
end
wait(0.1)
end
local NewRay =
Ray.new(PartsTable[i].Position+Vector3.new(0, 10, 0), Vector3.new(0, -40, 0))
local Hit, Pos =
game.Workspace:FindPartOnRayWithWhitelist(NewRay, CanHitParts)
if Hit ~= nil then
R.ReplicatePart:FireServer(PartsTable[i],
PartsTable[i].CFrame-PartsTable[i].Position+Pos)
end
end)
end
end
end
end
AddCheck(TempModel, "IsBuildingMaterial")
fireserver("ChangeParent", Part, TempModel)
R.ReplicateModel:FireServer(TempModel, Part.CFrame-Part.Position+
(Head.Position+Vector3.new(0, 50, 0)))
for i = 1, 350 do
AddCheck(TempModel, "IsBuildingMaterial")
if NukeFollow == true or i < 10 then
R.ReplicateModel:FireServer(TempModel, Part.CFrame-Part.Position+
(Head.Position+Vector3.new(0, 50-(i*0.2), 0)))
else
R.ReplicateModel:FireServer(TempModel, Part.CFrame-Vector3.new(0,
0.4, 0))
end
Spread()
wait()
end
end
Veh:SetPrimaryPartCFrame(CFrame.new(Prim.CFrame.Position)*CFrame.Angles(0,
math.rad(90), 0))
wait()
end
Veh.PrimaryPart.Anchored = true
local StoredIconsPos = {}
local StoredIconsPosY = {}
if Essen:FindFirstChild("Color") then
fireserver("ChangeParent", Essen.Color)
end
for i, v in pairs(Icons:GetChildren()) do
StoredIconsPos[v] = DeterminLookDir(Veh, v)
StoredIconsPosY[v] = v.Position.Y
v.Anchored = true
for a, b in pairs(v:GetChildren()) do
if b:IsA("Weld") then
fireserver("ChangeParent", b)
end
end
if not v:FindFirstChild("IsBuildingMaterial") then
R.AddClothing:FireServer("IsBuildingMaterial", v, "", "", "")
end
end
for i, v in pairs(Essen.Details:GetChildren()) do
if not string.find(v.Name, "Lights") then
fireserver("ChangeParent", v)
else
for a, b in pairs(v:GetDescendants()) do
if b:IsA("BasePart") then
fireserver("ChangeParent", b)
end
end
end
end
SpawnBaseF({["Character"] = {["Head"] = {["Position"] = Pos}}},
ServerModels[Mod], false, Veh, true)
wait()
SpawnBaseF({["Character"] = {["Head"] = {["Position"] = Pos}}},
ServerModels[Mod], false, Veh, true)
wait()
Veh.Parent = game.Workspace.Vehicles
if not string.find(Mod, "Tank") then
local TestRay = Ray.new(Veh.PrimaryPart.Position+Vector3.new(0, 4, 0),
Vector3.new(0, 100, 0))
local prt = game.Workspace:FindPartOnRayWithWhitelist(TestRay, {Veh})
FlipFunction(Veh, prt)
end
spawn(function()
for i, v in pairs(StoredIconsPos) do
local ray = Ray.new(i.Position+v*300, v*-400)
local prt, pos = game.Workspace:FindPartOnRayWithWhitelist(ray,
{Veh})
if prt then
R.ReplicatePart:FireServer(i, i.CFrame-
i.Position+pos+Vector3.new(0,-pos.Y+StoredIconsPosY[i], 0)-v)
end
end
end)
Veh.PrimaryPart.Anchored = false
wait(0.1)
fireserver("ChangeParent", Veh, game.Workspace.Vehicles)
for i , v in pairs(StoredIconsPos) do
i.Anchored = false
end
end
local CurrentTank;
function MakeTank(Veh, Mod)
SpawnCustomVehicle(Veh, Mod)
wait()
Veh.PrimaryPart.Anchored = true
local GlobalTop = MakeEmptyModel()
GlobalTop.Name = "GlobalTop"
fireserver("ChangeParent", GlobalTop, Veh)
R.AddClothing:FireServer("IsBuildingMaterial", GlobalTop, "", "", "")
local TopOfTank = MakeEmptyModel()
TopOfTank.Name = "Top"
fireserver("ChangeParent", TopOfTank, GlobalTop)
CurrentTank = GlobalTop
local TankShot;
local TankTopCenter;
local TankMainCenter;
for i, v in pairs(Veh:GetDescendants()) do
if tostring(v) == "ItemID" then
fireserver("ChangeParent", v.Parent, TopOfTank)
v.Parent.CanCollide = false
if v.Value == "TopShot" then
TankShot = v.Parent
elseif v.Value == "TopCenter" then
local ToPlaceModel = "Bricks"
local Con;
local Mod;
Con = game.Workspace.ChildAdded:connect(function(Ch)
if Ch.Name == ToPlaceModel then
Mod = Ch
Con:Disconnect()
end
end)
R.PlaceMaterial:FireServer(ToPlaceModel, Vector3.new(10000,
10000, 10000))
repeat
wait()
until Mod and Mod:FindFirstChild("Head")
wait()
local Head = Mod.Head
fireserver("ChangeParent", Head, GlobalTop)
R.AddClothing:FireServer("IsBuildingMaterial", Head, "",
"", "")
repeat
wait()
until Head:FindFirstChild("IsBuildingMaterial")
R.ReplicatePart:FireServer(Head, v.Parent.CFrame)
TankTopCenter = Head
Head.CanCollide = false
TankMainCenter = v.Parent
fireserver("ChangeParent", v.Parent, Veh)
end
end
end
wait(1)
for i, v in pairs(GlobalTop:GetDescendants()) do
if v:IsA("BasePart") and v.Parent ~= GlobalTop then
fireserver("ChangeParent", v, GlobalTop)
if v:FindFirstChild("Weld") then
fireserver("ChangeParent", v.Weld)
end
DoWeld(TankTopCenter, v)
v.CanCollide = false
end
end
local Shots;
local function GetShots()
local AmountOfShots = 0
if Shots then
for i, v in pairs(Shots) do
AmountOfShots = AmountOfShots + 1
end
end
if AmountOfShots <= 1 then
if not Shots then
Shots = {}
end
local FakeCon;
local Bricks;
FakeCon = game.Workspace.ChildAdded:connect(function(Ch)
if tostring(Ch) == "Bricks" then
Bricks = Ch
FakeCon:Disconnect()
end
end)
R.PlaceMaterial:FireServer("Bricks", Vector3.new(10000, 10000,
10000))
repeat
wait()
until Bricks
for i, v in pairs(Bricks:GetChildren()) do
if v:IsA("BasePart") then
R.AddClothing:FireServer("IsBuildingMaterial", v, "",
"", "")
fireserver("ChangeParent", v, Veh)
Shots[v] = true
v.Name = "brick"..tostring(i)
end
end
fireserver("ChangeParent", Bricks)
end
local Shot = Shots[1]
for i, v in pairs(Shots) do
Shot = i
Shots[i] = nil
break
end
repeat
wait()
until Shot:FindFirstChild("IsBuildingMaterial")
return Shot
end
wait(1)
local Con;
local Prim = Veh.PrimaryPart
local LastFlipCount = 0
local CheckingFlipped = false
local FlippedTime;
Con = game:GetService("RunService").RenderStepped:Connect(function()
if TankMainCenter.Position.Y <= Prim.Position.Y+1 and CheckingFlipped
== false and Prim.Velocity.Magnitude < 8 then
CheckingFlipped = true
FlippedTime = tick()
elseif not (TankMainCenter.Position.Y <= Prim.Position.Y+1) and
CheckingFlipped then
CheckingFlipped = false
end
if CheckingFlipped and tick() - FlippedTime > 2 then
Veh:SetPrimaryPartCFrame(CFrame.new(Prim.Position+Vector3.new(0,
4, 0)))
Veh.PrimaryPart.Velocity = Vector3.new()
CheckingFlipped = false
end
local CF;
if LPlr.Character ~= nil and LPlr.Character:FindFirstChild("Humanoid")
and LPlr.Character.Humanoid.Sit then
local Hit = Mouse.Hit.Position
CF = CFrame.new(TankMainCenter.Position, Hit)*CFrame.Angles(0, 0,
math.rad(-90))
elseif GlobalTop.PrimaryPart then
CF = GlobalTop.PrimaryPart.CFrame-
GlobalTop.PrimaryPart.Position+TankMainCenter.Position
end
R.ReplicateModel:FireServer(GlobalTop, CF)
if GlobalTop.PrimaryPart then
GlobalTop:SetPrimaryPartCFrame(CF)
end
end)
local Con2;
local CanShoot = true
local TimeBetweenShots = 0.1
Con2 = Mouse.Button1Down:Connect(function()
if not CanShoot or LPlr.Character == nil or not
LPlr.Character:FindFirstChild("Humanoid") or not LPlr.Character.Humanoid.Sit then
return
end
CanShoot = false
spawn(function()
wait(TimeBetweenShots)
CanShoot = true
end)
local Shot = GetShots()
local Dir = TankShot.CFrame.LookVector
local StartCFrame = TankShot.CFrame
R.ReplicatePart:FireServer(Shot, TankShot.CFrame)
local Ignores = {Veh}
local Exploded = false
local ExplodedAt;
local Speed = 15
local ShouldRemove = false
local ShouldMoveTo;
wait()
local Con3;
local i = 0
Con3 = game:GetService("RunService").RenderStepped:Connect(function()
i = i+1
if i > 1200 then
Con3:Disconnect()
return
end
R.ReplicatePart:FireServer(Shot, StartCFrame+((Dir*Speed)*i))
local ray = Ray.new(Shot.Position, Dir*Speed*20)
local ray2 = Ray.new(Shot.Position, Dir*Speed)
local prt = game.Workspace:FindPartOnRayWithIgnoreList(ray,
Ignores)
local prt2, pos = game.Workspace:FindPartOnRayWithIgnoreList(ray,
Ignores)
if prt and prt.Parent.Name == "Bricks" or prt2 and
prt2.Parent.Name == "Bricks" then
table.insert(Ignores, prt.Parent)
prt = nil
prt2 = nil
end
if prt and i/10 == math.floor(i/10) then
R.Detonate:FireServer({["Head"] = Shot})
end
if ShouldRemove then
R.ReplicatePart:FireServer(Shot, Shot.CFrame-
Shot.Position+ShouldMoveTo)
pcall(function() fireserver("ChangeParent", Shot) end)
Con3:Disconnect()
return
end
if prt2 and prt2.Parent.Name ~= "Bricks" and (pos-
Shot.Position).Magnitude < 45 then
ShouldRemove = true
ShouldMoveTo = pos
end
end)
end)
wait(0.1)
Veh.PrimaryPart.Anchored = false
while GlobalTop and GlobalTop.Parent and CurrentTank == GlobalTop and
Veh.Parent ~= nil do
wait()
end
Con:Disconnect()
Con2:Disconnect()
end
Work = game:GetObjects("rbxassetid://6432104949")[1]
HeadModelSizes = {}
for i, v in pairs(Work.IndividualParts:GetChildren()) do
HeadModelSizes[tostring(v.Size)] = tostring(v)
end
LootIDs = {}
IDent = {}
SpecialIdentifiers = {{"SpecialMesh", "TextureId", "MeshId"}, {"Decal", "Texture",
{"Face", "Back"}}, {"Sound", "Name"}}
for i, v in pairs(game.Lighting.LootDrops:GetChildren()) do
if v:FindFirstChild("ObjectID") then
LootIDs[tostring(Deob(v.ObjectID.Value))] = tostring(v)
end
if v:FindFirstChildOfClass("Model") and
v:FindFirstChildOfClass("Model"):FindFirstChild("Head") then
local Mod = v:FindFirstChildOfClass("Model")
if not IDent[Mod.DataCost] then
IDent[Mod.DataCost] = {}
end
local Col = Mod.Head
if Mod:FindFirstChild("Colors") then
Col = Mod.Colors
end
local DC = Mod.DataCost
local BC = tostring(Col.BrickColor)
local Mat = tostring(Col.Material)
if not IDent[DC][BC] then
IDent[DC][BC] = {}
end
if not IDent[DC][BC][Mat] then
IDent[DC][BC][Mat] = {}
end
local MatT = IDent[DC][BC][Mat]
local Cl = 0
for a, b in pairs(Mod:GetChildren()) do
if b.Name == "ColorPart" then
Cl = Cl + 1
end
end
if not MatT[tostring(Cl)] then
MatT[tostring(Cl)] = {}
end
local LookTab = MatT[tostring(Cl)]
local FoundSpecial = false
for a, b in pairs(Mod.Head:GetChildren()) do
for c = 1, #SpecialIdentifiers do
if b.ClassName == SpecialIdentifiers[c][1] and (not
SpecialIdentifiers[c][3] or typeof(SpecialIdentifiers[c][3]) == "string" or
typeof(SpecialIdentifiers[c][3]) == "table" and
string.find(tostring(b[SpecialIdentifiers[c][3][1]]), SpecialIdentifiers[c][3][2]))
then
FoundSpecial = true
if tostring(b[SpecialIdentifiers[c][2]]) ~= "" then
LookTab[tostring(b[SpecialIdentifiers[c][2]])] =
tostring(v)
elseif SpecialIdentifiers[c][3] and
typeof(SpecialIdentifiers[c][3]) == "string" then
LookTab[tostring(b[SpecialIdentifiers[c][3]])] =
tostring(v)
end
break
end
end
if FoundSpecial then
break
end
end
if not FoundSpecial then
local Test = Vector3.new()
if #Mod:GetChildren() > 1 then
for a, b in pairs(Mod:GetChildren()) do
if b:IsA("BasePart") and b ~= Mod.Head then
Test = Test + (b.Position-Mod.Head.Position)
end
end
Test = tostring(Test)
else
Test = "S"..tostring(Mod.Head.Size)
end
if not LookTab[Test] then
LookTab[Test] = tostring(v)
else
if typeof(LookTab[Test]) ~= "table" then
local Temp
end
end
end
end
end
DroppedLoot = game.Workspace:FindFirstChild("DropLoot")
SpawnedLoot = game.Workspace:FindFirstChild("SpawnLoot")
function IsAModelOfLoot(Mod)
if DroppedLoot and Mod:IsDescendantOf(DroppedLoot) or SpawnedLoot and
Mod:IsDescendantOf(SpawnedLoot) then
return false
end
if Mod:FindFirstChildOfClass("Model") and
Mod:FindFirstChildOfClass("Model"):FindFirstChild("Head") then
Mod = Mod:FindFirstChildOfClass("Model")
end
local Col = Mod.Head
if Mod:FindFirstChild("ColorPart") then
Col = Mod.ColorPart
end
local DC = Mod.DataCost
local BC = tostring(Col.BrickColor)
local Mat = tostring(Col.Material)
for i, v in pairs(Mod:GetChildren()) do
if pcall(function() return v.Value end) then
DC = DC-v.DataCost
end
end
local Cl = 0
for a, b in pairs(Mod:GetChildren()) do
if b.Name == "ColorPart" then
Cl = Cl + 1
end
end
local Current = IDent[DC][BC][Mat][tostring(Cl)]
for i, v in pairs(Mod.Head:GetChildren()) do
for a = 1, #SpecialIdentifiers do
if v.ClassName == SpecialIdentifiers[a][1] and (not
SpecialIdentifiers[a][3] or typeof(SpecialIdentifiers[a][3]) == "string" or
typeof(SpecialIdentifiers[a][3]) == "table" and
string.find(tostring(v[SpecialIdentifiers[a][3][1] ]), SpecialIdentifiers[a][3]
[2])) then
if tostring(v[SpecialIdentifiers[a][2] ]) ~= "" then
return Current[tostring(v[SpecialIdentifiers[a]
[2] ])]
elseif tostring(v[SpecialIdentifiers[a][3] ]) ~= "" then
return Current[tostring(v[SpecialIdentifiers[a]
[3] ])]
end
end
end
end
local Test = Vector3.new()
if #Mod:GetChildren() > 1 then
for a, b in pairs(Mod:GetChildren()) do
if b:IsA("BasePart") and b ~= Mod.Head then
Test = Test + (b.Position-Mod.Head.Position)
end
end
Test = tostring(Test)
else
Test = "S"..tostring(Mod.Head.Size)
end
return Current[Test]
end
function CheckPosInside(Pos)
if not Corner1 or not Corner2 then return false end
local Poses = {Corner1.PrimaryPart.Position.X,
Corner1.PrimaryPart.Position.Z, Corner2.PrimaryPart.Position.X,
Corner2.PrimaryPart.Position.Z}
if Poses[1] < Poses[3] then
local S = Poses[1]
Poses[1] = Poses[3]
Poses[3] = S
end
if Poses[2] < Poses[4] then
local S = Poses[2]
Poses[2] = Poses[4]
Poses[4] = S
end
if Pos.X > Poses[1] or Pos.X < Poses[3] or Pos.Z > Poses[2] or Pos.Z <
Poses[4] then
return false
end
return true
end
function Convert(Numb)
if Numb < 0 then
return Numb*-1
end
return Numb
end
function GetMid(Item, Val)
local Tab = {["LowX"] = nil, ["HighX"] = nil, ["LowY"] = nil, ["LowZ"] = nil,
["HighZ"] = nil}
local List = Item
if typeof(Item) ~= "table" then
List = Item:GetDescendants()
end
for i, v in pairs(List) do
if v:IsA("BasePart") then
local Pos = v.Position
local X = Pos.X
local Y = Pos.Y
local Z = Pos.Z
if Tab["LowX"] == nil and not v:FindFirstChild("IgnorePosition")
then
Tab["LowX"] = X
Tab["HighX"] = X
Tab["LowY"] = Y
Tab["LowZ"] = Z
Tab["HighZ"] = Z
end
if not v:FindFirstChild("IgnorePosition") then
if Tab["LowX"] > X then
Tab["LowX"] = X
end
if Tab["HighX"] < X then
Tab["HighX"] = X
end
if Tab["LowY"] > Y then
Tab["LowY"] = Y
end
if Tab["LowZ"] > Z then
Tab["LowZ"] = Z
end
if Tab["HighZ"] < Z then
Tab["HighZ"] = Z
end
end
if v:FindFirstChild("BaseSpawnPosition") and Val ~= true then
local Mid = Vector3.new(v.Position.X,
v.Position.Y,v.Position.Z)
return Mid
end
end
end
if Val == true and Item:FindFirstChild("Head") then
local Mid = Vector3.new(Item.Head.Position.X,
Item.Head.Position.Y,Item.Head.Position.Z)
return Mid
end
local Mid = Vector3.new()
if Tab["LowX"] then
Mid = Vector3.new(Tab["LowX"]+Convert(Tab["HighX"]-Tab["LowX"])/2,
Tab["LowY"],Tab["LowZ"]+Convert(Tab["HighZ"]-Tab["LowZ"])/2)
end
return Mid
end
Corner1 = nil
Corner2 = nil
function MakeCorner(N)
if game.Workspace:FindFirstChild("Corner"..tostring(N)) then
game.Workspace:FindFirstChild("Corner"..tostring(N)):Destroy()
return
end
local Model = Instance.new("Model", game.Workspace)
Model.Name = "Corner"..tostring(N)
if tostring(N) == "1" then
Corner1 = Model
else
Corner2 = Model
end
local P1 = Instance.new("Part", Model)
P1.Size = Vector3.new(2000, 300, 2)
P1.Position = Vector3.new()
P1.CanCollide = false
P1.Anchored = true
P1.Material = Enum.Material.Neon
P1.Transparency = 0.5
local P2 = P1:Clone()
P2.Parent = Model
P2.Size = Vector3.new(5, 300, 2000)
P2.Position = P1.Position
Model.PrimaryPart = P1
Model:SetPrimaryPartCFrame(CFrame.new(LPlr.Character.Head.Position))
return Model
end
function GetPartsInWorkspace()
local Items = {}
if not Corner1 or not Corner2 then return Items end
for i, v in pairs(game.Workspace:GetDescendants()) do
if v:IsA("BasePart") and HeadModelSizes[tostring(v.Size)] and
CheckPosInside(v.Position) or v:IsA("Model") and
game.Lighting.Materials:FindFirstChild(tostring(v)) and v:FindFirstChild("Head")
and CheckPosInside(v.Head.Position) then
table.insert(Items, v)
elseif v:IsA("Model") and v:FindFirstChildOfClass("Model") and
v:FindFirstChildOfClass("Model"):FindFirstChild("Head") and
CheckPosInside(v:FindFirstChildOfClass("Model").Head.Position) and
game.Lighting.LootDrops:FindFirstChild(tostring(v)) and not
v:FindFirstChild("Head") and not v:IsDescendantOf(DroppedLoot) and not
v:IsDescendantOf(SpawnedLoot) then
--Pickup
if not v:FindFirstChildOfClass("Model"):FindFirstChild("Decor")
then
local NV = Instance.new("StringValue",
v:FindFirstChildOfClass("Model"))
NV.Name = "Decor"
end
table.insert(Items, v)
elseif v:IsA("Model") and pcall(function() IsAModelOfLoot(v) end) and
not v:IsDescendantOf(DroppedLoot) and not v:IsDescendantOf(SpawnedLoot) and
v:FindFirstChild("Head") and CheckPosInside(v.Head.Position) then
v.Name = IsAModelOfLoot(v)
if game.Lighting.LootDrops:FindFirstChild(tostring(v)) then
table.insert(Items, v)
end
end
end
return Items
end
game.Lighting:GetPropertyChangedSignal("Ambient"):connect(function(Ch)
if CheckColor(game.Lighting.Ambient, Color3.new(0.5, 0.5, 0.5)) == false and
FullBrightOn == true then
game.Lighting.Ambient = Color3.new(0.5, 0.5, 0.5)
end
end)
game.Lighting:GetPropertyChangedSignal("FogEnd"):connect(function(Ch)
if game.Lighting.FogEnd < 1000000 and FullBrightOn == true then
game.Lighting.FogEnd = 1000000
end
end)
game.Lighting:GetPropertyChangedSignal("ClockTime"):connect(function(Ch)
if game.Lighting.ClockTime ~= 7.5 and FullBrightOn == true then
game.Lighting.ClockTime = 7.5
end
end)
spawn(function()
repeat
wait()
until LPlr:FindFirstChild("PlayerGui")
if LPlr.PlayerGui:FindFirstChild("CameraZoom") then
LPlr.PlayerGui.CameraZoom:remove()
end
LPlr.PlayerGui.ChildAdded:connect(function(Ch)
wait(0.1)
if tostring(Ch) == "CameraZoom" then
Ch:remove()
end
end)
end)
--Game Loaded--
MakeSelectableText(VictinisGui)
--LoadGui Settings--
local AcceptedProperties = 0
function MakeColorListStr(Par, Str)
local Tab = Par:GetChildren()
if Par.ClassName == "ScrollingFrame" then
Tab = {Tab[1]}
end
for i, v in pairs(Tab) do
if v.ClassName ~= "StringValue" then
Str = Str..'['..tostring(v)..'] = {'
for a = 1, #PropertyTab do
local Val;
local Passed = pcall(function() Val = v[PropertyTab[a] ]
end)
if Passed == true then
local IgnoreVal, ConvVal =
ConvertInputedText(v[PropertyTab[a] ], tostring(v[PropertyTab[a] ]))
StartStr = '["'..PropertyTab[a]..'"] = '
if typeof(v[PropertyTab[a] ]) == "Color3" then
StartStr =
StartStr.."Color3.fromRGB("..ConvVal..")"
else
StartStr = StartStr..ConvVal
end
Str = Str..StartStr..", "
AcceptedProperties = AcceptedProperties + 1
if AcceptedProperties >= 10 then
AcceptedProperties = 0
Str = Str.."\n"
end
end
end
if SelectionMode[v] ~= nil then
Str = Str..'["SM"] = '
local IgnoreVal, ConvVal =
ConvertInputedText(SelectionMode[v], tostring(SelectionMode[v]))
if typeof(SelectionMode[v]) == "Color3" then
Str = Str.."Color3.fromRGB("..ConvVal.."), "
else
Str = Str..'"'..ConvVal..'", '
end
end
Str = Str..'},'
Str = MakeColorListStr(v, Str)
end
end
return Str
end
function MakeTeleportTabStr()
if StoredTeleports == nil then
StoredTeleports = {}
end
local Str = ""
local Amount = 0
for i, v in pairs(StoredTeleports) do
Str = Str..'["'..tostring(i)..'"] = {'
for a, b in pairs(v) do
Str = Str..'["'..tostring(a)..'"] =
Vector3.new('..tostring(b)..'), '
Amount = Amount + 1
if Amount >= 10 then
Amount = 0
Str = Str.."\n"
end
end
Str = Str.."}, "
end
return Str
end
function MakeClothingTabStr()
if not ClothingTab then
ClothingTab = {}
end
local Str = ""
local Amount = 0
for i, v in pairs(ClothingTab) do
local p = v[2]
if not tonumber(p) then p = "nil" end
local s = v[1]
if not tonumber(s) then s = "nil" end
Str = Str..'["'..tostring(i)..'"] = {'..tostring(p)..",
"..tostring(s).."}, "
Amount = Amount + 1
if Amount >= 10 then
Amount = 0
Str = Str.."\n"
end
end
return Str
end
function SaveBans()
local BanStr = "return {"
for i, v in pairs(Banned) do
BanStr = BanStr..'"'..tostring(i)..'", '
end
WriteFile("Bans", BanStr.."}")
end
function SaveColors(Theme)
local ColorStr = "return {"..MakeColorListStr(VictinisGui, "").."}"
if not Theme then
WriteFile("Color", ColorStr)
return
end
WriteFile("Themes/"..Theme, ColorStr)
end
function SaveTeleports()
WriteFile("Teleports", "return {"..MakeTeleportTabStr().."}")
end
function SaveClothing()
WriteFile("Clothing", "return {"..MakeClothingTabStr().."}")
end
Banned = {}
function LoadBans()
local Bool, TempBansList = ReadFile("Bans")
if Bool then
TempBansList = loadstring(TempBansList)()
for i = 1, #TempBansList do
Banned[TempBansList[i] ] = true
end
end
DisplayBanned()
for i, v in pairs(game.Players:GetPlayers()) do
if Banned[tostring(v)] == true then
Kick(v)
end
end
end
function LoadTeleports()
local Bool, TempTeleportsList = ReadFile("Teleports")
local StoredTeleports = {}
if Bool then
TempTeleportsList = loadstring(TempTeleportsList)()
if TempTeleportsList and TempTeleportsList[MapName] then
for i, v in pairs(TempTeleportsList[MapName]) do
Teleports[i] = v
end
DisplayPlayersInTP()
end
end
end
ClothingTab = {}
function LoadClothing()
local Bool, TempColorsList = ReadFile("Clothing")
if Bool then
ClothingTab = loadstring(TempColorsList)()
for i, v in pairs(ClothingTab) do
MakeClothingButton(i, true, function()
ClothingButtonClick(v[1], v[2])
end)
end
end
end
function LoadColors()
local Corrupted = false
local Bool, ColorsTab = ReadFile("Color")
if Bool then
ColorsTab = loadstring(ColorsTab)()
LoadTheme(ColorsTab)
end
end
function LoadThemes(Val)
for i, v in pairs(ThemeList:GetChildren()) do
if i ~= 1 then
v:remove()
end
end
for i, v in pairs(listfiles("VictinisGuiSettings/Themes")) do
local fn = string.sub(v, 21)
local themename = string.sub(fn, 8, string.len(fn)-4)
if not Val or Val == "" or string.find(string.lower(themename),
string.lower(Val)) then
local Button = MakeThemeButton(themename, function()
local TabCol = loadstring(readfile(v))()
LoadTheme(TabCol)
SaveColors()
end)
Button.DelListButton.MouseButton1Down:connect(function()
delfile(v)
LoadThemes(Val)
end)
end
end
end
function LoadTheme(ColorsTab)
local Corrupted = false
for i, v in pairs(ColorsTab) do
if typeof(i) ~= "string" then
OriginalPropertyTab[i] = {}
for a, b in pairs(v) do
if a ~= "SM" then
OriginalPropertyTab[i][a] = i[a]
for c, d in pairs(i.Parent:GetChildren()) do
if d.Name == i.Name then
if not pcall(function()
d[a] = b
if
d:FindFirstChildOfClass("TextButton") and (d:IsA("TextButton") or d:IsA("TextBox"))
then
local T =
d:FindFirstChildOfClass("TextButton")
T.BackgroundTransparency =
d.BackgroundTransparency
T.TextColor3 = d.TextColor3
T.BorderSizePixel =
d.BorderSizePixel
T.Font = d.Font
end
end) then
Corrupted = true
end
end
end
else
SelectionMode[i] = b
end
end
end
end
if Corrupted then
Notify("There was an error in your theme, most of it should have
loaded, but a few things may not have.", 8)
end
end
local ReturnedTab = {}
function DoLoad(v)
local Passed, IsF = pcall(function() ReturnedTab = loadstring("return
"..readfile("VictiniGuiSettings.txt"))() end)
if Passed == true then
local TempBanList = ReturnedTab["BanList"]
if TempBanList ~= nil then
for i = 1, #TempBanList do
Banned[TempBanList[i] ] = true
end
end
SaveBans()
DisplayBanned()
StoredTeleports = ReturnedTab["Teleports"]
if StoredTeleports ~= nil and StoredTeleports[MapName] ~= nil then
for i, v in pairs(StoredTeleports[MapName]) do
Teleports[i] = v
end
DisplayPlayersInTP()
elseif StoredTeleports == nil then
StoreTeleports = {}
end
SaveTeleports()
for i, v in pairs(game.Players:GetPlayers()) do
if Banned[tostring(v)] == true then
Kick(v)
end
end
ClothingTab = ReturnedTab["Clothing"]
if not ClothingTab then
ClothingTab = {}
end
for i, v in pairs(ClothingTab) do
MakeClothingButton(i, true, function()
ClothingButtonClick(v[1], v[2])
end)
end
SaveClothing()
local Corrupted = false
local ColorsTab = ReturnedTab["ColorList"]
pcall(function()
if ColorsTab ~= nil then
for i, v in pairs(ColorsTab) do
if typeof(i) ~= "string" then
OriginalPropertyTab[i] = {}
for a, b in pairs(v) do
if a ~= "SM" then
OriginalPropertyTab[i][a] = i[a]
for c, d in
pairs(i.Parent:GetChildren()) do
if d.Name == i.Name then
if not pcall(function()
d[a] = b
end) then
Corrupted = true
end
end
end
else
SelectionMode[i] = b
end
end
end
end
end
end)
SaveColors()
if Corrupted then
Notify("There was an error in your theme, most of it should have
loaded, but a few things may not have.", 8)
end
delfile("VictiniGuiSettings.txt")
else
LoadBans()
LoadTeleports()
LoadClothing()
LoadColors()
end
LoadThemes()
end
DoLoad()
--Frame Coloring--
Notify("Gui is fully loaded!\n If any problems are found they'll appear after this
message!", 10)
CheckFor(game.ReplicatedStorage.Zombies.Zombie, "thisishat", true, "Warning,
zombies are unhitable!", 5)
CheckForExploits()
CheckFor(game.Workspace, "Zombies", false, "Warning, zombies not found in
Workspace!", 8)
if Corpse == nil then
Notify("Corpse not found! Keep Inventory is permanently on.", 3)
elseif Corpse ~= nil and Corpse.Parent ~= game.ReplicatedStorage then
SingleButtonSelection(MiscCommandList, KeepInventoryButton,
TempMiscCommandButton, true)
end
TableHolder = {["P"] = game.Players, ["M"] = game.Lighting.Materials, ["W"] =
game.Workspace, ["L"] = game.Lighting.LootDrops, ["V"] = {"Vector3"}, ["Ve"] =
game.Workspace.Vehicles, ["K"] = function() return "i", KitsList end,
["in"] = {"Input"}, ["CT1"] = {"Tank", "SnowTank", "SandTank"}, ["CT2"] = {"Bus"}}
FunctionsForCommands = {["TP"] = {"P", {"P", "W", "V"}}, ["Kill"] = {"P"}, ["Kick"]
= {"P"}, ["God"] = {"P"}, ["Tank"] = {"Ve", "CT1"}, ["CustomVehicle"] = {"Ve",
"CT2"}, ["Spawn"] = {"P", {"L", "Ve"}, "in"}}
FunctionsHolder = {["TP"] = TPPlayerPos, ["Kill"] = Kill, ["Kick"] = Kick, ["God"]
= God, ["Tank"] = MakeTank, ["CustomVehicle"] = SpawnCustomVehicle}
function MakeOptionsTable(T)
local Ta = {}
if typeof(T) == "string" and TableHolder[T] then
local NA = TableHolder[T]
if typeof(NA) == "Instance" then
NA = NA:GetChildren()
end
for i, v in pairs(NA) do
table.insert(Ta, v)
end
elseif typeof(T) == "string" then
table.insert(Ta, v)
elseif typeof(T) == "Instance" then
for i, v in pairs(T:GetChildren()) do
table.insert(Ta, v)
end
elseif typeof(T) == "table" and T ~= FunctionsForCommands then
for i, v in pairs(T) do
local NT = v
if typeof(NT) == "string" and TableHolder[NT] then
NT = TableHolder[NT]
if typeof(NT) == "Instance" then
NT = NT:GetChildren()
end
elseif typeof(NT) == "string" then
NT = {NT}
elseif typeof(NT) == "function" then
NT = {i}
elseif typeof(NT) == "Instance" then
NT = NT:GetChildren()
end
for a = 1, #NT do
table.insert(Ta, NT[a])
end
end
elseif typeof(T) == "function" then
local ii, NT = T()
if ii == "i" then
for i, v in pairs(NT) do
if ii == "i" then
table.insert(Ta, i)
else
table.insert(Ta, v)
end
end
end
elseif T == FunctionsForCommands then
for i, v in pairs(FunctionsForCommands) do
table.insert(Ta, i)
end
end
return Ta
end
--Set toggles--