The script is a local script inside 'Lighting'. I can't seem to get it to work. I don't think FE has anything to do with it, but I'm not sure. Help appreciated!

--This script will display a chat above your head depending on what key you press.
local Options={ --Edit these
 WaitTime=1
,AskForHealButton=120 --In byte. 120 = X.
,AskForHealText='Help me!'
,EnoughHealedButton=122 --In byte. 122 = Z.
,EnoughHealedText='Move out!'
,NoChargeButton=118 --In byte. 118 = V.
,NoChargeText='Go go go'
,ChatColor='Red' --Either Red, Blue or Green.
};

repeat wait(.02) until game:GetService('Players') and game:GetService('Players').LocalPlayer and game:GetService('Players').LocalPlayer.Character
local Player,InUse=game:GetService('Players').LocalPlayer,false;

Player:GetMouse().KeyDown:connect(function(Key)
if not InUse and (Key:byte()==Options.AskForHealButton or Key:byte()==Options.EnoughHealedButton or Key:byte()==Options.NoChargeButton) then
InUse=true
local Text=Key:byte()==Options.AskForHealButton and Options.AskForHealText or Key:byte()==Options.EnoughHealedButton and Options.EnoughHealedText or Key:byte()==Options.NoChargeButton and Options.NoChargeText;
game:GetService('Chat'):Chat(Player.Character,Text,Options.ChatColor)
wait(Options.WaitTime)
InUse=false
end end);

1 comment

0

Tab your code correctly. Also, use UserInputService, as the service you're using is deprecated.