Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local symbol = "."
- function buyItem(item)
- if item == "a" then
- game.ReplicatedStorage.Logic.giveitem:FireServer("StandArrow")
- end
- if item == "r" then
- game.ReplicatedStorage.Logic.giveitem:FireServer("RokakakaFruit")
- end
- end
- plr.Chatted:Connect(function(msg)
- if string.sub(msg, 1, 1) == symbol then
- local toBuy = string.sub(msg, 2)
- buyItem(toBuy)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement