I am in need of a script that rewards players who hit/killed an npc.
For example, 3 players are attacking an NPC and 2 of them get killed. The 3rd player kills the NPC and gets rewarded, but the other 2 players get rewarded as well.
So basically, if player hits npc, the players name gets stored somewhere. If another player hits same npc, that players name also gets stored. And once the NPC get killed, both of them get rewarded.
Need more info etc? We can discuss on discord.
We can discuss the pricing/payment on discord.
Payment can be done through Group Payouts or Paypal.
I’m not sure what to put as base payment because I’m not sure if its easy or hard to make this kind script. Thats why I put pricing/payment can be discussed on discord. But unless you know how much it roughly is, then I can put down a rough base payment.
This kind of thing isn’t extremely difficult to do, but its also not super easy. Its kind of a middle difficulty. It also depends on how much you have to pay, as well as how much of your game is done. Is it just the listing of users attacked that you need, or do you need the whole reward system?
I have this simple kill script that rewards one player who killed the npc last. But I want to change/modify it so if npc dies, it rewards the player who killed it and all the other players that hit it.
local Humanoid = script.Parent.Humanoid
local tag = Humanoid:findFirstChild("creator")
if tag ~= nil then
if tag.Value ~= nil then
local Stats = tag.Value:findFirstChild("stats")
if Stats ~= nil then
Stats.XP.Value = Stats.XP.Value + 100 --reward
You would need to make a table to store all of the players who hit the enemy. You could have a folder inside of the enemy, and every time that enemy is hurt by a new player it adds a NumberValue to the folder. You could then update the value to be how much damage the player has done, so you could find out who did the best if you wanted to. Then, in your kill script you would just loop through that folder and do your PwntX_X function for every one of those players.
I think I tried something like this and some other methods before but they all failed but becuz I’m half way through my game development, I’m trying to get things ready soon as possible. So that’s why I’m here asking someone to help make me one with them getting payment ofc.