Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to add admins permissions which are saved into scripts to it ?

Asked by 5 years ago
gamepass = nil



warps = {

{"1", Vector3.new(240.37435913086, 240.37435913086, -125.1050491333)},

}



--Unless you know what you're doing, don't change anything under this line.



game.Players.PlayerAdded:connect(function(player)

if gamepass then

if game:GetService("GamePassService"):PlayerHasPass(player, gamepass) then

access = true

end

else

access = true

end

if access then

Instance.new("Configuration", player).Name = "PersonalWarps"

player.Chatted:connect(function(chat)

if string.lower(string.sub(chat, 1, 6)) == "!spec " and string.len(chat) > 6 then

spec = string.lower(string.sub(chat, 7))

coordinates = nil

for w = 1, #warps do

if warps[w][1] == spec then

coordinates = warps[w][2]

end

end

mywarps = player.PersonalWarps:GetChildren()

for w = 1, #mywarps do

if mywarps[w].Name == spec then

coordinates = mywarps[w].Value

end

end

if coordinates then

player.Character:MoveTo(coordinates)

h = Instance.new("Hint", player.PlayerGui)

wait(5)

h:Destroy()

else

h = Instance.new("Hint", player.PlayerGui)

h.Text = "There is no warp called '" .. spec .. "'."

wait(5)

h:Destroy()

end

elseif string.lower(chat) == "warplist" then

h = Instance.new("Hint", player.PlayerGui)

mywarps = player.PersonalWarps:GetChildren()

if #warps == 0 and #mywarps == 0 then

h.Text = "No warps set. Say 'setwarp [name of warp]' to create a warp."

else

if #warps > 0 then

for w = 1, #warps do

h.Text = warps[w][1]

wait(1)

end

end

if #mywarps > 0 then

for w = 1, #mywarps do

h.Text = mywarps[w].Name

wait(1)

end

end

end

h:Destroy()

elseif string.lower(string.sub(chat, 1, 8)) == "setwarp " and string.len(chat) > 8 then

spec = string.lower(string.sub(chat, 9))

alreadyexists = false

for w = 1, #warps do

if warps[w][1] == spec then

alreadyexists = true

end

end

mywarps = player.PersonalWarps:GetChildren()

for w = 1, #mywarps do

if mywarps[w].Name == spec then

alreadyexists = true

end

end

if not alreadyexists then

mywarp = Instance.new("Vector3Value", player.PersonalWarps)

mywarp.Name = spec

mywarp.Value = Vector3.new(player.Character:GetModelCFrame().x, player.Character:GetModelCFrame().y, player.Character:GetModelCFrame().z)

h = Instance.new("Hint", player.PlayerGui)

h.Text = "Successfully created warp '" .. spec .. "' to X = " .. mywarp.Value.x .. ", Y =" .. mywarp.Value.x .. ", Z = " .. mywarp.Value.z .. "."

wait(5)

h:Destroy()

else

h = Instance.new("Hint", player.PlayerGui)

wait(5)

h:Destroy()

end

elseif string.lower(string.sub(chat, 1, 10)) == "clearwarps" then

player.PersonalWarps:ClearAllChildren()

h = Instance.new("Hint", player.PlayerGui)

wait(5)

h:Destroy()

elseif string.lower(string.sub(chat, 1, 11)) == "removewarp " then

warp = string.lower(string.sub(chat, 12))

if player.PersonalWarps:findFirstChild(warp) then

player.PersonalWarps:findFirstChild(warp):Destroy()

h = Instance.new("Hint", player.PlayerGui)

wait(5)

h:Destroy()

else

h = Instance.new("Hint", player.PlayerGui)

wait(5)

h:Destroy()

end

end

end)

end

access = false

end)
0
Did you just post a free model script? CaptainAlien132 225 — 5y
0
What even is this for? I don't understand how you get "admins permissions" from this. Unless you're talking about saving if they have permissions or not then you use datastores and values. ItsBankai 31 — 5y
0
must be a old fm script it uses hints hellmatic 1523 — 5y

Answer this question