
1.2k Views
262 Executions
Universal script for weapons
Universal Script 📌
COOlInkKidFirst script
10 months ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Universal script Weapons module Sound module Weapon configuration And more
-- main module
-- by COOlInkKid
-- universal script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
-- Weapons module
local WeaponModule = {}
WeaponModule.__index = WeaponModule
-- Configuration
local WEAPON_CONFIGS = {
["AssaultRifle"] = {
Damage = 25,
FireRate = 0.15, -- секунд между выстрелами
MagazineSize = 30,
ReloadTime = 2.5,
MaxAmmo = 180,
Spread = 3, -- градусы
Range = 500
},
["Pistol"] = {
Damage = 35,
FireRate = 0.4,
MagazineSize = 12,
ReloadTime = 1.8,
MaxAmmo = 60,
Spread = 2,
Range = 300
}
}
function WeaponModule.new(weaponType, owner)
local self = setmetatable({}, WeaponModule)
self.WeaponType = weaponType
self.Owner = owner
self.Config = WEAPON_CONFIGS[weaponType] or WEAPON_CONFIGS["AssaultRifle"]









Warning! I haven't tested it and don't know if it works at all.