local Players = game:GetService("Players")
local player = Players.LocalPlayer
if player.MembershipType == Enum.MembershipType.Premium then
script.MorphGui:Clone().Parent = player.PlayerGui
end
✓ ANSWER ACCEPTED
what should i do? i want to make it that roblox premium members can only see this gui.
2 answers
✓ Accepted answer
Hello! In order to use this, you need to make a normal script to clone the GUI everytime a player dies. Put the GUI in ServerStorage and name it "PremiumGui"
game.Players.PlayerAdded:Connect(function(player)
wait(2)
if player.MembershipType == Enum.MembershipType.Premium then
local clone = game.ServerStorage:FindFirstChild("PremiumGui"):Clone()
clone.Parent = player:FindFirstChild("PlayerGui")
player.Character:FindFirstChild("Humanoid").Died:Conect(function()
wait(7)
local clone = game.ServerStorage:FindFirstChild("PremiumGui"):Clone()
clone.Parent = player:FindFirstChild("PlayerGui")
end
end
end
EDIT
Put this LOCALSCRIPT inside the GUI and put the GUI in Starter GUI and tick enabled to false in properties
local Player = game.Players.LocalPlayer
if Player.MembershipType = Enum.MembershipType.Premium then
script.Parent.Enabled = false
end
Put this inside a local script inside StarterGui:
local Players = game:GetService("Players")
local player = Players.LocalPlayer
game.Players.PlayerAdded:Connect(function()
if player.MembershipType == Enum.MembershipType.Premium then
local clone = script.MorphGui:Clone()
clone.Parent = player.PlayerGui
end
end)
It should work.
If this helped please accept this answer.
7 comments
0
Local Script doesn't work in Workspace
0
I think he meant put it inside the starter gui
0
Yeah sorry.
0
where does the gui go?
0
does it go in the script?
0
Yes.
0
But be aware that when a player dies the GUI will reset.
This discussion is preserved as it was. New answers, comments, and votes are closed.

10 comments
Why the down vote? This 100% works!
where do i put the script?
Just make it a normal script and put it in ServerScriptService
it does not work :(
the "end" in line 13 is red
That usually means to delete an end or add a ) to the last end
i did those did not work
Ok I am sorry then. I tried to help, but it did not work. I'm sorry. Line 3 should at least help you.
ok thanks it works now
Yw :)