Currently updating model, so it’s offsale!
Hello, and this is my second post on devforum!
I wanted to show my admin Gui I made, you can take it here:
Note: All tools aren’t mine, it’s free models, but I’m not that good scripter to make something like building tools…or sword
This is how Gui looks:
Is it good enough? Maybe I need to add something in it? And I think it’s best of my free models, I made before…
You can see scripts from model here:
Local script in Gui:
local player = script.Parent.Parent.Parent
local tool
local toolFolder = game.ReplicatedStorage.Tools
local text = "zilibobi's"
local openButton = script.Parent.OpenButton
openButton.Text = "Open "..text.." Admin Gui"
local musicInput = script.Parent.AdminFrame.MusicInputId
local timeInput = script.Parent.AdminFrame.TimeInput
local playMusic = script.Parent.AdminFrame.PlayMusic
local setTime = script.Parent.AdminFrame.SetTime
local musicEvent = game.ReplicatedStorage:FindFirstChild("MusicEvent")
local clockTimeEvent = game.ReplicatedStorage:FindFirstChild("SetClockTimeEvent")
local kickEvent = game.ReplicatedStorage:FindFirstChild("KickPlayerEvent")
local teleportToPlayerEvent = game.ReplicatedStorage:FindFirstChild("TeleportToPlayerEvent")
local giveToolEvent = game.ReplicatedStorage:FindFirstChild("GiveToolEvent")
local kickFrame = script.Parent.KickFrame
local teleportButton = script.Parent.AdminFrame.TeleportButton
local giveBtoolsButton = script.Parent.AdminFrame.GiveBtools
local giveSwordButton = script.Parent.AdminFrame.GiveSword
local giveNoclipTool = script.Parent.AdminFrame.GiveNoclipTool
local givePistolTool = script.Parent.AdminFrame.GivePistol
local creditsButton = script.Parent.AdminFrame.OpenCredits
local openKickGui = script.Parent.AdminFrame.OpenKickGui
local kickButton = kickFrame.KickButton
local reasonInput = kickFrame.Reason
local playerName = kickFrame.PlayerName
local playerToTeleportInput = script.Parent.AdminFrame.TeleportInput
local debounce = false
local opened = false
local isOpened = false
local credits = false
playMusic.MouseButton1Click:Connect(function()
if debounce == false then
debounce = true
musicEvent:FireServer(musicInput.Text)
wait(1)
debounce = false
end
end)
setTime.MouseButton1Click:Connect(function()
if debounce == false then
debounce = true
clockTimeEvent:FireServer(timeInput.Text)
wait(1)
debounce = false
end
end)
teleportButton.MouseButton1Click:Connect(function()
if debounce == false then
debounce = true
teleportToPlayerEvent:FireServer(playerToTeleportInput.Text)
wait(1)
debounce = false
end
end)
openKickGui.MouseButton1Click:Connect(function()
if opened == false then
opened = true
openKickGui.Text = "Close Kick Gui"
script.Parent.AdminFrame.KickMainText.Text = "Close Kick Gui"
kickFrame.Visible = true
else
opened = false
openKickGui.Text = "Open Kick Gui"
script.Parent.AdminFrame.KickMainText.Text = "Open Kick Gui"
kickFrame.Visible = false
end
end)
kickButton.MouseButton1Click:Connect(function()
if debounce == false then
debounce = true
kickEvent:FireServer(reasonInput.Text, playerName.Text)
wait(1)
debounce = false
end
end)
openButton.MouseButton1Click:Connect(function()
if isOpened == false then
isOpened = true
openButton.Text = "Close "..text.." Admin Gui"
script.Parent.AdminFrame.Visible = true
else
isOpened = false
openButton.Text = "Open "..text.." Admin Gui"
script.Parent.AdminFrame.Visible = false
end
end)
creditsButton.MouseButton1Click:Connect(function()
if credits == false then
credits = true
creditsButton.Text = "Close Credits"
script.Parent.AdminFrame.CreditsMainTittle.Text = "Close Credits"
script.Parent.CreditsFrame.Visible = true
else
creditsButton.Text = "Credits"
script.Parent.AdminFrame.CreditsMainTittle.Text = "Credits"
script.Parent.CreditsFrame.Visible = false
end
end)
giveBtoolsButton.MouseButton1Click:Connect(function()
if debounce == false then
debounce = true
tool = toolFolder["Building Tools"]
giveToolEvent:FireServer(tool)
wait(1)
debounce = false
end
end)
--// Sword
giveSwordButton.MouseButton1Click:Connect(function()
if debounce == false then
debounce = true
tool = toolFolder["Sword"]
giveToolEvent:FireServer(tool)
wait(1)
debounce = false
end
end)
--// Noclip tool
giveNoclipTool.MouseButton1Click:Connect(function()
if debounce == false then
debounce = true
tool = toolFolder["Noclip Tool"]
giveToolEvent:FireServer(tool)
wait(1)
debounce = false
end
end)
--// Pistol
givePistolTool.MouseButton1Click:Connect(function()
if debounce == false then
debounce = true
tool = toolFolder["Pistol"]
giveToolEvent:FireServer(tool)
wait(1)
debounce = false
end
end)
Server script:
local admins = {"zilibobi", "","",""}
local musicEvent = game.ReplicatedStorage:WaitForChild("MusicEvent")
local clockTimeEvent = game.ReplicatedStorage:WaitForChild("SetClockTimeEvent")
local kickEvent = game.ReplicatedStorage:WaitForChild("KickPlayerEvent")
local teleportToPlayerEvent = game.ReplicatedStorage:WaitForChild("TeleportToPlayerEvent")
local giveToolEvent = game.ReplicatedStorage:WaitForChild("GiveToolEvent")
game.Players.PlayerAdded:Connect(function(plr)
for _, i in pairs(admins) do
if plr.Name == i then
local adminGuiClone = script:WaitForChild("AdminGui")
adminGuiClone.Parent = plr.PlayerGui
adminGuiClone.Enabled = true
end
end
end)
musicEvent.OnServerEvent:Connect(function(player, text)
local musicID = text
if workspace:FindFirstChild("AdminSound") then game.Workspace.AdminSound:Destroy() end
local sound = Instance.new("Sound", workspace)
sound.Name = "AdminSound"
sound.Looped = true
sound.Playing = true
sound.SoundId = "http://www.roblox.com/asset/?id="..musicID
end)
clockTimeEvent.OnServerEvent:Connect(function(player, timeCount)
local clockTime = timeCount
game.Lighting.ClockTime = timeCount
end)
kickEvent.OnServerEvent:Connect(function(player, reason, playerToKick)
local PlayerToKick = playerToKick
local reasonWhy = reason
if game.Players:WaitForChild(PlayerToKick) then
game.Players:WaitForChild(PlayerToKick):Kick(reason)
end
end)
teleportToPlayerEvent.OnServerEvent:Connect(function(player, playerName)
local playerToTeleport = playerName
if game.Players:WaitForChild(playerToTeleport) then
local character = game.Workspace:WaitForChild(player.Name)
local targetPlayer = game.Workspace:WaitForChild(playerName)
character.HumanoidRootPart.CFrame = CFrame.new(targetPlayer.HumanoidRootPart.Position + Vector3.new(0, 1.5, 0))
end
end)
giveToolEvent.OnServerEvent:Connect(function(player, Tool)
if player.Backpack:FindFirstChild(Tool.Name) then return end
local toolClone = Tool:Clone()
toolClone.Parent = player.Backpack
end)