So i made this script and it doesnt work, I did what i could also getting help by other people
repeat wait() until game.Players.LocalPlayer.Character Player = game.Players.LocalPlayer Cube = script.Parent local Workspace = game.Workspace mouse = Player:GetMouse() function onEquipped() Cube.Handle.Equipped:Play() end local GearFolder = game.ServerStorage.SwordsFolder local MovementGearNames = { "BlackAndWhiteWingedSword", "BombosSurvivalKnife", } function Click() while true do for i,v in pairs(GearFolder:GetChildren())do if v.Name == MovementGearNames[math.random(1, #MovementGearNames)] then wait(0.01) v.Enabled = true local Sound = Instance.new("Sound",script.Parent.Handle) Sound.SoundId = "rbxassetid://163362522" Sound.Volume = 1 Sound.Pitch = 1 Sound.Looped = false Sound.Name = "GearSound" local Gear = v:Clone() Gear.Parent = Player.Backpack Sound:Play() print(Player.Name,"Got", v.Name.."!") wait(0.01) script.Parent:Destroy() end end end end Cube.Activated:connect(Click) Cube.Equipped:connect(onEquipped)