atease.MouseButton1Down:Connect(function()
if debounce == true then
for i = 1,#ranks do
if rank == i then
-- Same thing as written above, already made it rank-locked for you.
rease:FireServer()
end
end
else
return
end
end)
That is the function, and the following is the associated variables:
-- Miscellaneous References
local debounce = false
local replicatedstorage = game:GetService("ReplicatedStorage")
local player = game.Players.LocalPlayer
-- Reference Group Ranks
local ranks = {"Regulation Enforcement", "Adroit Enforcer", "Proficient Enforcer", "Auror Division", "Meister Auror", "Veteran Auror", "Magical Architects", "Division Foreman", "Professor"}
local rank = player:GetRoleInGroup(3736685)
print(rank)
-- Remote Events
local rbow = replicatedstorage:WaitForChild("MobileBow")
local rease = replicatedstorage:WaitForChild("MobileEase")
