Trait System Help

I made a trait system for my jojo game , but idk how to make it buff your dmg or smth here my script, I want to make it like , None = No dmg buff , Speed = Make you move faster something like that

local rep = game:GetService("ReplicatedStorage")
local deb = game:GetService("Debris")
local ServerStorage = game:GetService("ServerStorage")

local Traits = {
	"None",
	"Speed",
	"Slow",
	"Powerful",
	"Average",
	"Tragic",
	"Shadow",
	"Vampiric"
}

rep.Mechanic.NPC.KakoyinNPC.OnServerEvent:Connect(function(player, Request)
	local char = player.Character
	
	if	Request == "SpinTrait" then
		local PlrStats = player:FindFirstChild("PlrStats")
		
		local Gui = script.TraitGui:Clone()
		Gui.Parent = player.PlayerGui
		
		if PlrStats then
			local Startup = tick()
			
			repeat
				wait(.1)
				local SpinSound = script.SpinningSound:Clone()
				SpinSound.Parent = char.PrimaryPart
				SpinSound:Play()
				deb:AddItem(SpinSound,1)
				
				for _, v in ipairs(Traits) do
					Gui:FindFirstChild("Background"):FindFirstChild("AskLabel").Text = Traits[math.random(1,#Traits)]
					PlrStats:FindFirstChild("TraitName").Value = player.PlayerGui:FindFirstChild("TraitGui"):FindFirstChild("Background"):FindFirstChild("AskLabel").Text
				end
			until tick() - Startup >= 5
			
			local SpinSound = script.CompleteSound:Clone()
			SpinSound.Parent = char.PrimaryPart
			SpinSound:Play()
			deb:AddItem(SpinSound,2)
			
			task.wait(3)
			char:FindFirstChildWhichIsA("Humanoid").Health = 0
			Gui:Destroy()
		end
	elseif Request == "WayToHeaven" then
		

	end
end)
1 Like