Skip to content

Commit

Permalink
Made :invisible also make currently equipped tool invisible (#1573)
Browse files Browse the repository at this point in the history
  • Loading branch information
EasternBloxxer authored Aug 5, 2024
1 parent 67a30b1 commit cdbb5ee
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions MainModule/Server/Commands/Moderators.luau
Original file line number Diff line number Diff line change
Expand Up @@ -3754,6 +3754,13 @@ return function(Vargs, env)
end
elseif obj:IsA("Accoutrement") and obj:FindFirstChild("Handle") then
obj.Handle.Transparency = 1
elseif obj:IsA("Tool") then
for _, Descendant in obj:GetDescendants() do
if Descendant:IsA("BasePart") or Descendant:IsA("Decal") or Descendant:IsA("UnionOperation") then
Descendant:SetAttribute('ADONIS_OriginalTransparency',Descendant.Transparency)
Descendant.Transparency = 1
end
end
elseif obj:IsA("ForceField") then
obj.Visible = false
elseif obj:IsA("BillboardGui") then
Expand Down Expand Up @@ -3790,6 +3797,14 @@ return function(Vargs, env)
end
elseif obj:IsA("Accoutrement") and obj:FindFirstChild("Handle") then
obj.Handle.Transparency = 0
elseif obj:IsA("Tool") then
for _, Descendant in obj:GetDescendants() do
if Descendant:IsA("BasePart") or Descendant:IsA("Decal") or Descendant:IsA("UnionOperation") then
local Transparency = Descendant:GetAttribute('ADONIS_OriginalTransparency') or 0
Descendant.Transparency = Transparency
Descendant:SetAttribute('ADONIS_OriginalTransparency',nil)
end
end
elseif obj:IsA("ForceField") and obj.Name ~="ADONIS_FULLGOD" then
obj.Visible = true
elseif obj:IsA("BillboardGui") then
Expand Down

0 comments on commit cdbb5ee

Please sign in to comment.