Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -
- Download Here --> https://tinyurl.com/5eabk3ee (Copy and Paste Link)
- 1ForeverHD/HDAdminV2
- This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Name already in use
- A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
- Sign In Required
- Please sign in to use Codespaces.
- Launching GitHub Desktop
- If nothing happens, download GitHub Desktop and try again.
- Launching GitHub Desktop
- If nothing happens, download GitHub Desktop and try again.
- Launching Xcode
- If nothing happens, download Xcode and try again.
- Launching Visual Studio Code
- Your codespace will open once ready.
- There was a problem preparing your codespace, please try again.
- Latest commit
- Git stats
- Files
- Failed to load latest commit information.
- README.md
- Important update 2021
- This repository does not reflect the latest code from HD Admin, you can find that instead at the MainModule.
- HD Admin was a passion project I began working on all the way back in 2016, almost 5 years ago now. It’s been overwhelming to see the positive reception and uptake of the application, however to say it was outdated would be a slight understatement.
- While I still provide regular bug-fixes/patches for HD Admin, you may have noticed we haven’t added new features or commands for a few years now. This is because over the last 2 years we’ve been working towards a new administration system to release 2021 - Nanoblox. You can follow our progress at github.com/nanoblox.
- HD Admin is an open-source admin application for the Roblox platform. It is comprised of an extensive range of features and commands designed to enhance games for both player and developer.
- local hdMain = require(game:GetService("ReplicatedStorage"):WaitForChild("HDAdminSetup")):GetMain() local hd = hdMain:GetModule("API")
- player - the player instance (e.g. local player = game:GetService("Players").ForeverHD )
- rank - the rankId or rankName (e.g. 1 or "VIP")
- rankType - determines the duration the player keeps their rank for:
- "Perm" - for all servers for an infinite period of time
- "Server" - for the server the rank is given in until the server ends
- "Temp" - for the server the rank is given in until the player leaves
- hd:SetRank(player, rank, rankType)
- Sets the Rank and RankType for the specified player. Example: hd:SetRank(player, "Mod", "Perm")
- Sets the Rank to 0 (NonAdmin) and clears the RankType for the specified player. Example: hd:UnRank(player)
- Returns the rankId, rankName and rankType for the specified player. Example: local rankId, rankName, rankType = hd:GetRank(player)
- Disables the ability to use commands for the specified player when set to true. Example: hd:DisableCommands(player, true)
- Sets the transparency of the HD Topbar. Example: hd:SetTopbarTransparency(0.5)
- Hides and disables the HD Topbar when set to false. Example: hd:SetTopbarEnabled(false)
- Returns the corresponding rankName from the given rankId. Example: local rankName = hd:GetRankName(1)
- Returns the corresponding rankId from the given rankName. Example: local rankId = hd:GetRankId("VIP")
- Displays a notification to the specified player. If used on the client, 'player' must be the LocalPlayer. Example: `hd:Notice(player, "Hello world!")'
- Displays an error notification to the specified player. If used on the client, 'player' must be the LocalPlayer.. Example: hd:Error(player, "Error!")
- --In a Local Script local hdMain = require(game:GetService("ReplicatedStorage"):WaitForChild("HDAdminSetup")):GetMain() local hd = hdMain:GetModule("API") hd:SetTopbarTransparency(1)
- --In a Server Script --Retrieve API local hdMain = require(game:GetService("ReplicatedStorage"):WaitForChild("HDAdminSetup")):GetMain() local hd = hdMain:GetModule("API") --Define the rank-to-reward and setup the corresponding rankId and rankName local rank = "Mod" local rankType = "Server" local rankId = tonumber(rank) or hd:GetRankId(rank) local rankName = hd:GetRankName(rankId) --Define debounce local touchDe = --Touch event ('touchPart' is the part players have to step on to receive the rank) touchPart.Touched:Connect(function(hit) --Check for character and player local character = hit.Parent local player = game:GetService("Players"):GetPlayerFromCharacter(character) if player and not touchDe[player] then --Setup debounce for player touchDe[player] = true --Check rank is lower than giver rank local plrRankId, plrRankName, plrRankType = hd:GetRank(player) if plrRankId rankId then --Give rank hd:SetRank(player, rankId, rankType) else --Error message local errorMessage = "Your rank is already higher than '"..rankName.."'!" if plrRankId == rankId then errorMessage = "You've already been ranked to '"..rankName.."'!" end hd:Error(player, errorMessage) end wait(1) --End debounce touchDe[player] = false end end)
- You can take a completed copy here.
- Roblox Admin Script
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d=,Connect=function(self,e)table.insert(self.Functions,e)end>d.connect=d.Connect;return d end;local f=local g=local CAS=,BindAction=function(self,h,i,j. )CAS.Actions[h]=i and>or nil end>CAS.UnbindAction=CAS.BindAction;local function k(self,l. )local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(. )end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer()end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer()end end]==],Player.Character)local r=game;local s=local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x=,Player)>,"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v(,RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end>,"RunService")>rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement