this is a small portion of the script
NOTE: The objective of this script is this: There are 8 guns in ServerStorage and the script spawns those guns in the game based on a percentage and then teleports the guns to the spawning pad when the gun is spawned into the game. the spawning pad is script.Parent
x = math.random(0,100)
if x >= 0 and x <= 5 then
local SS = game:GetService("ServerStorage")
local clone = SS.LMG:Clone()
clone.Parent = game.Workspace
clone.Model:SetPrimaryPartCFrame(script.Parent.CFrame)
elseif x >= 6 and x <= 18 then
local SS = game:GetService("ServerStorage")
local clone1 = SS.WinterizedHuntingRifle:Clone()
clone1.Parent = game.Workspace
clone1.Model:SetPrimaryPartCFrame(script.Parent.CFrame)
elseif x >= 19 and x<= 26 then
local SS = game:GetService("ServerStorage")
local clone2 = SS.ScopedHuntingRifle:Clone()
clone2.Parent = game.Workspace
clone2.Model:SetPrimaryPartCFrame(script.Parent.CFrame)
elseif x>=27 and x<=53 then
local SS = game:GetService("ServerStorage")
local clone3 = SS.HuntingRifle:Clone()
clone3.Parent = game.Workspace
clone3.Model:SetPrimaryPartCFrame(script.Parent.CFrame)
elseif x>=54 and x<=59 then
local SS = game:GetService("ServerStorage")
local clone4 = SS.SilencedTw:Clone()
clone4.Parent = game.Workspace
clone4.Model:SetPrimaryPartCFrame(script.Parent.CFrame)
elseif x>=60 and x<= 75 then
local SS = game:GetService("ServerStorage")
local clone5 = SS.SawnOffShotgun:Clone()
clone5.Parent = game.Workspace
clone5.Model:SetPrimaryPartCFrame(script.Parent.CFrame)
elseif x>= 76 and x<= 82 then
local SS = game:GetService("ServerStorage")
local clone6 = SS.CombatShotgun:Clone()
clone6.Parent = game.Workspace
clone6.Model:SetPrimaryPartCFrame(script.Parent.CFrame)
elseif x>83 and x<= 90 then
local SS = game:GetService("ServerStorage")
local clone7 = SS.TenMilSMG:Clone()
clone7.Parent = game.Workspace
clone7.Model:SetPrimaryPartCFrame(script.Parent.CFrame)
elseif x>90 and x<= 100 then
local SS = game:GetService("ServerStorage")
local clone8 = SS.NinePistol:Clone()
clone8.Parent = game.Workspace
clone8.Model:SetPrimaryPartCFrame(script.Parent.CFrame)
btw this isnt the full script, its a portion of it so thats why it doenst have the ends |