local RankChange = game.ReplicatedStorage.AdminPanelEvents.RankEvents.RankChange
local RankList = {"Default","Fan","VIP","YouTuber","Builder","Mod","Moderator","Admin","Owner"}
local player = game.Players.LocalPlayer
local PlayerName = script.Parent.Parent.PlayerName
local RankName = script.Parent.Parent.RankName
local db = false

script.Parent.MouseButton1Click:Connect(function()
	if db == false then
		db = true
		if game.Players:FindFirstChild(PlayerName.Text) then
			for i, v in pairs(RankList) do
				if RankName.Text == v then
					print(player.Name.." has changed "..PlayerName.Text.."'s rank to "..RankName.Text)
					RankChange:FireServer(PlayerName.Text, RankName.Text)
					wait(0.5)
					game.StarterGui:SetCore("SendNotification",{
						Title = "Rank Change";
						Text = "You changed "..PlayerName.Text.."'s rank to "..RankName.Text.."!"
					})
					db = false
				end
			end
		end
	end
end)

1 comment

0

When the players rank changes i want them to get a notification so they know