local module = {}
module.skillgiver = function(player,SkillName)
local String = Instance.new("StringValue")
String.Name = SkillName
for i, v in game.ServerStorage.Skills:GetChildren() do
if SkillName == v.Name then
local skillgiver = v:Clone()
local backpack = plr:WaitForChild("Backpack")
skillgiver.Parent = backpack
end
end
end
return module
other script is
local part = script.Parent
local clickdetector = part:WaitForChild("ClickDetector")
local module = require(game:GetService("ReplicatedStorage").Modules.SkillGiver)
clickdetector.MouseClick:Connect(function()
module.skillgiver(player,"SurfaceSlash")
end)