[FREE] Improved Discord Weapon Perms (Badger's Discord Weapon Perms Rewritten)

ImprovedDiscordWeaponPerms is a Discord based weapon restriction script. It is a rewrite of JaredScar’s original DiscordWeaponPerms - We have added inheritances for roles and also added t-notify integration, as well as more config options and separate messages for components and weapons with model names. This is a re-write of the original script. We simply forked it to credit Badger. We also made Improved Discord Ped Perms

**ImprovedDiscordWeaponPerms** is a Discord based weapon restriction script. It is a forked rewrite of [JaredScar's original DiscordWeaponPerms](https://github.com/JaredScar/DiscordWeaponPerms) - We have added inheritances for roles and also added t-notify integration, as well as more config options and separate messages for components and weapons with model names. This is essentially a re-write of the original script. We also made [Improved Discord Ped Perms]()

Requirement;

Download;

Configuration;

  • It should be noted that for Config.Inheritances, the roleNames and roleIDs should match up with the ones specified in Config.WeaponRestrictions.

  • Also, inheritance only inherits the role groups listed. Inheriting RoleName2 which inherits RoleName1 would not be inherited for RoleName3.

Config = {
	WeaponRestrictedMessage = "~r~This Weapon is restricted",
	ComponentRestrictedMessage = "~r~This Component is restricted",
	InheritanceEnabled = true,
	-- Set to true if you use the t-notify plugin for notifications.
	usingTnotify = false,
	-- How often the script checks for restricted weapons (in milliseconds)
	updateTime = 2000,
	-- Whether or not the script shows the name of the model being restricted. If true, it will append the weapon/component name to the end of the message.
	showWeaponOrComponentName = true
}

-- This Script uses the nicknames for roles listed in Badger_Discord_API. 
Config.WeaponRestrictions = {
	--['RoleName or ID'] = {
	--	"Weapon1/Component1",
	--	"Weapon2/Component2",
	--	"Weapon3/Component3",
	--	"Weapon4/Component4"
	--},

	['RoleName1'] = {
		""
	},
	['RoleName2'] = {
		""
	},
	['RoleName3'] = {
		""
	},
	['RoleName4'] = {
		""
	}
}

-- Requires Config.InheritanceEnabled to be = true
Config.Inheritances = {
	--['RoleName or ID'] = {'RoleName2', 'RoleName3', 'RoleName4'},
	['RoleName1'] = {'RoleName2', 'RoleName3', 'RoleName4'},
	['RoleName2'] = {'RoleName3', 'RoleName4'},
	['RoleName3'] = {'RoleName4'},
	['RoleName4'] = {}
}
5 Likes

Were you given permission to upload this modified script?

Badger is aware of it. Credit was given every possible way. We even kept it as a “fork” in GitHub as another way to provide credit. Also modification is not the right word. We completely re-wrote it. Badger has an MIT license on the original script.

2 Likes

Oh right lol. Good job btw.

Great work and contribution to the community!

2 Likes

Update v1.0.4

  • Added Debug Print Config
  • Fixed Error when User had no roles. Thanks to @imfinko on discord for the bug report.
  • Improved Code Formatting
  • Made notification message more customizable by adding place holders to the config.

Download (Github)