ok so I want to turn these scripts into a local script
first script:
local part = script.Parent
local canGet = true
local function ontouch(otherPart)
local humanoid = otherPart.Parent:FindFirstChild("Humanoid")
if humanoid then
local player = game.Players:GetPlayerFromCharacter(otherPart.Parent)
if player and canGet then
canGet = false
player.leaderstats.Souls.Value = player.leaderstats.Souls.Value + 5
wait(1)
canGet = true
end
end
end
part.Touched:Connect(ontouch)
second script:
function onTouch(part)
local humanoid = part.Parent:FindFirstChild(“Humanoid”)
if (humanoid ~= nil) then – if a humanoid exists, then
script.Parent.CanTouch=false
script.Parent.CanCollide=false
script.Parent.Transparency=0.3
wait(0.5)
script.Parent.Transparency=0.4
wait(0.5)
script.Parent.Transparency=0.5
wait(0.5)
script.Parent.Transparency=0.6
wait(0.5)
script.Parent.Transparency=0.7
wait(0.5)
script.Parent.Transparency=0.8
wait(0.5)
script.Parent.Transparency=0.9
wait(0.5)
script.Parent.Transparency=1
wait(30)
script.Parent.Transparency=0.9
wait(0.5)
script.Parent.Transparency=0.8
wait(0.5)
script.Parent.Transparency=0.7
wait(0.5)
script.Parent.Transparency=0.6
wait(0.5)
script.Parent.Transparency=0.5
wait(0.5)
script.Parent.Transparency=0.4
wait(0.5)
script.Parent.Transparency=0.3
wait(0.5)
script.Parent.Transparency=0.2
script.Parent.CanTouch=true
script.Parent.CanCollide=true
end
end
script.Parent.Touched:connect(onTouch)