generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Cheat Codes?

Previous Thread :: Next Thread 
RainingWaffle is not online. RainingWaffle
Joined: 27 May 2014
Total Posts: 239
13 Jun 2014 11:32 AM
How to make it where when somebody presses r,a,i,n they fly.
_______Presses not Says
Report Abuse
GlaciesRex is not online. GlaciesRex
Joined: 22 Oct 2011
Total Posts: 1100
13 Jun 2014 11:48 AM
Make sure the script is in startergui and is local! Try this.





player = game.Players.LocalPlayer
char = player.Character
mouse = player:GetMouse()




function onKeyDown(key)
key:lower()
if key == "r" then
if key =="a" then
if key == "i" then
if key == "n" then

end
end
end
end
end


mouse.KeyDown:connect(onKeyDown)



-You don't make the script. The script makes you.-
Report Abuse
RainingWaffle is not online. RainingWaffle
Joined: 27 May 2014
Total Posts: 239
13 Jun 2014 04:43 PM
So like for example Scythe script would it be in Startergui or in workspace.
Or would the cheat codes script be in startergui?
Report Abuse
RainingWaffle is not online. RainingWaffle
Joined: 27 May 2014
Total Posts: 239
13 Jun 2014 04:55 PM
HELP!
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Jun 2014 04:56 PM
His wouldn't work.
Report Abuse
RainingWaffle is not online. RainingWaffle
Joined: 27 May 2014
Total Posts: 239
13 Jun 2014 04:57 PM
It doesn't work!

HELP PLEASE!!!!!!!!!!!!!!


(I rage alot)
Report Abuse
RainingWaffle is not online. RainingWaffle
Joined: 27 May 2014
Total Posts: 239
13 Jun 2014 05:59 PM
HELP!
B1
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
13 Jun 2014 06:36 PM
It works, you just have to code functions to the keys yourself..
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
13 Jun 2014 06:38 PM
Well it will kinda work, except that:
"key:lower()"
should be:
"key=key:lower()"
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
13 Jun 2014 06:40 PM
mouse = game.Players.LocalPlayer:GetMouse()

mouse.KeyDown:connect(function(key)
if key:lower() == "r" then
mouse.KeyDown:connect(key)
if key:lower() == "a" then
mouse.KeyDown:connect(key)
if key:lower() == "i" then
mouse.KeyDown:connect(key)
if key:lower() == "n" then
--stuff
end
end)
wait(1)
end
end)
wait(1)
end
end)
wait(1)
end
end)

most likely will not work but try atleast :l
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
13 Jun 2014 06:45 PM
I think this is a proper way, just use a hopperbin, I think.


function keydown(mouse,k)
key = string.lower(k)
if (key == "r") then
-- Executes when R is clicked.
end
if (key == "a") then
-- Executes when A is clicked.
end
if (key == "i") then
-- Executes when I is clicked.
end
if (key == "n") then
-- Executes when N is clicked.
end

function selected(mouse)
mouse.KeyDown:connect(function(key) keydown(mouse,key) end)
end

script.Parent.Selected:connect(selected)
end
Report Abuse
RainingWaffle is not online. RainingWaffle
Joined: 27 May 2014
Total Posts: 239
13 Jun 2014 07:20 PM
So I put the script inside the tool I want to execute when r,a,i,n is pressed?
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
13 Jun 2014 07:38 PM
.-.
>Localscript in StarterGui

Mouse = game.Players.localPlayer:GetMouse()
Keys = {}
Mouse.KeyDown:connect(function(Key)
Keys[Key] = true
if Keys["f"] and Keys["l"] and Keys["y"] then
print("Fly Enabled")
end
end)
Mouse.KeyUp:connect(function(Key)
Keys[Key] = false
end)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Jun 2014 07:38 PM
It's amazing how either you are all wrong or you have no idea what he is talking about. I know this is not the best way to go about it but something like this should work:

local pressed = {};
local cheats = {
["rain"] = function() whatever end;
};

local check = function()
local cheatEntered = table.concat(pressed, "");
for cheat, func in next, cheats do
if cheatEntered == cheat then
func();
break;
end
end
end;

mouse.KeyDown:connect(function(key) pressed[#pressed + 1] = key; check(); end);
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Jun 2014 07:39 PM
Also, you might want to clear the table after the func() or whatever
Report Abuse
batistapowerbonbtla is not online. batistapowerbonbtla
Joined: 16 Dec 2011
Total Posts: 2203
13 Jun 2014 07:45 PM
KeyDown won't capture i and probably some other keys
Use KeyUp instead
Report Abuse
RainingWaffle is not online. RainingWaffle
Joined: 27 May 2014
Total Posts: 239
13 Jun 2014 08:04 PM
How do I USE it like a video how to use it.
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
13 Jun 2014 08:23 PM
You clearly don't know how to script and should stop asking for things to be created for you.
Report Abuse
JoshuaKempfert is not online. JoshuaKempfert
Joined: 16 Feb 2013
Total Posts: 2407
13 Jun 2014 08:25 PM
Yeah why are you guys even helping this idiot?
Report Abuse
RainingWaffle is not online. RainingWaffle
Joined: 27 May 2014
Total Posts: 239
13 Jun 2014 08:27 PM
I am "Asking" You people because I infact do not know how to script.
Am I the idiot or you?I am just asking if you can make me a script that does that.
I am not an idiot who spams to think they are getting OBC or a free account.So infact you are the noob.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Jun 2014 08:28 PM
We're all stupid, stop replying
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
13 Jun 2014 08:30 PM
I am just asking if you can make me a script that does that.
Read this sub-forum description and weep.
Found here in case you're blind.
http://puu.sh/9svQH/bde59faa4d.png
No request.
This place is for help with debugging code.
Report Abuse
RainingWaffle is not online. RainingWaffle
Joined: 27 May 2014
Total Posts: 239
14 Jun 2014 10:06 AM
"This is a place to share your scripting skills and help others." Yeah you are really helping me by saying I am a noob.Yeah BIG help.
If it said NO request then why is this thread still up?
Report Abuse
RainingWaffle is not online. RainingWaffle
Joined: 27 May 2014
Total Posts: 239
14 Jun 2014 10:07 AM
@Josh:If I am an idiot why are you even posting on this thread?
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
14 Jun 2014 10:10 AM
"So infact you are the noob."
"Yeah you are really helping me by saying I am a noob"
only you called anyone a "noob"

get out pls.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image