Universal Script 📌
1.2k Views
262 Executions

Universal script for weapons

Universal Script 📌
COOlInkKid
COOlInkKidFirst script
10 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Universal script Weapons module Sound module Weapon configuration And more

View Raw
-- 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"]


Comments

1
Log in to join the conversation. Login
COOlInkKid's profile picture
COOlInkKidUploader10 months ago

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

1

More universal scripts

See all
Script hub
53.6k
14.5k
Bumped 39 minutes ago
Key System
Paid
Script hub
179
568
Bumped 1 hour ago
Key System
Universal Script 📌
1.3M
592.6k
Bumped 3 hours ago
Script hub
2.5k
19.6k
Bumped 4 hours ago
Universal Script 📌
339
892
Approved 5 hours ago
Universal Script 📌
93
1.3k
Approved 6 hours ago
Universal Script 📌
122
119
Approved 7 hours ago