So this is a local script inside of a text button in a gui. I need help because it doesnt work and I'm not great at scripting.
Script:
local Minato = game.Workspace.NPCbosses.Minato
local Health = Minato.Humanoid.Health
local Ryo = game.Players.LocalPlayer.leaderstats.Ryo.Value
local Exp = game.Players.LocalPlayer.PlayerInfo.PlayerLevel.Value
local RyoReward = game.Workspace.NPCmissions.MinatoMission.Data.RyoReward.Value
local ExpReward = game.Workspace.NPCmissions.MinatoMission.Data.ExpReward.Value
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
script.Parent.Parent.Parent.UnusedFrame.DefeatedUndefeated.Visible = true
end)
if script.Parent.Parent.Parent.UnusedFrame.DefeatedUndefeated.Visible = true then
if Health <= 0 then
Ryo + RyoReward
end
if Health >= 0.1 then
Exp + ExpReward
end
end
FYI this is a naruto game so thats why the boss is named Minato and why the currency is Ryo :)

1 comment
You could just past the code inside you question with code block.