Code:
local CS = game:GetService("CollectionService")
local Config = {
EasySkillStarVal = 0.025;
MediumSkillStarVal = 0.05;
HardSkillStarVal = 0.1;
}
local PlrsOnLaserCooldown = {}
local PlrsOnEasySkillStarCooldown = {}
local SkillStarCooldown = game:GetService("ReplicatedStorage"):WaitForChild("RemoteEvents"):WaitForChild("SkillStarCooldown")
for _, Laser in pairs(CS:GetTagged("Laser")) do
Laser.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and not table.find(PlrsOnLaserCooldown,hit.Parent.Name) then
hit.Parent.Humanoid.Health -= hit.Parent.Humanoid.MaxHealth
table.insert(PlrsOnLaserCooldown,hit.Parent.Name)
task.wait(0.5)
table.remove(PlrsOnLaserCooldown,table.find(PlrsOnLaserCooldown,hit.Parent.Name))
end
end)
end
for _, JumpPad in pairs(CS:GetTagged("JumpPad")) do
JumpPad.Pad.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.JumpHeight = 33
hit.Parent.Humanoid.Jump = true
task.wait(0.1)
hit.Parent.Humanoid.JumpHeight = 7.2
end
end)
end
for _, SkillStar in pairs(CS:GetTagged("EasySkillStar")) do
SkillStar.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and not table.find(PlrsOnEasySkillStarCooldown,hit.Parent.Name) then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
SkillStarCooldown:FireClient(plr,"Easy")
plr.leaderstats.SP.Value += Config.EasySkillStarVal
table.insert(PlrsOnEasySkillStarCooldown,hit.Parent.Name)
task.wait(15)
table.remove(PlrsOnEasySkillStarCooldown,table.find(PlrsOnEasySkillStarCooldown,hit.Parent.Name))
end
end
end)
end
for _, SkillStar in pairs(CS:GetTagged("MediumSkillStar")) do
SkillStar.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and not table.find(PlrsOnEasySkillStarCooldown,hit.Parent.Name) then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
SkillStarCooldown:FireClient(plr,"Medium")
plr.leaderstats.SP.Value += Config.MediumSkillStarVal
table.insert(PlrsOnEasySkillStarCooldown,hit.Parent.Name)
task.wait(15)
table.remove(PlrsOnEasySkillStarCooldown,table.find(PlrsOnEasySkillStarCooldown,hit.Parent.Name))
end
end
end)
end
Whenever I try to add the skillstar value from the config it gives me a number such as 0.0250000002 or 0.02500000001