SOLVED BY MYSELF

names = {"zZGalaxySolarManZz"}

game.Players.PlayerAdded:connect(function(Player)
        for i, v in pairs(names) do
          if v == Player.Name then 
            Player.Chatted:connect(function(chatmsg)
                local amount, user = chatmsg:match('give/(%d%d?%d?%d?)%s+([%w_]+)')
                if amount ~= nil and user ~= nil then
                  for _,a in pairs(game.Players:GetChildren()) do
                    local Find = a.Name
                    local player = string.match(Find, user)
                    if player then
                      local Get = game.Players:FindFirstChild(player)
                      Get.PlayerData.Rubies.Value = Get.PlayerData.Rubies.Value + (amount)
                    end
                  end
                end
              end)
          end
        end
      end)

4 comments

0

Well. I'm not going to script it for you. You will have to extract the number and player variable from the chatmsg. http://wiki.roblox.com/index.php?title=Global_namespace/String_manipulation The pattern "%S+" is useful.

0

Also, you're missing an end. :P

0

Solved :)