GMOD Piano

Posts 16 of 6 · Page 1 of 1
GMOD Piano
So I've noticed a lot of DarkRP servers have a playable piano thing installed that uses inputs from your keyboard. It looks cool but it's difficult to play using the keyboard so I thought that someone could probably(or already has) make a script to play a few songs automatically. i don't know how hard this would be and I know it's not really a hack but it's a cool idea and possibly a challenge for any lua scripters out there who aren't making hacks.
I've always thought of this but never decided to post it on the forums because I am lazy, so thank you for doing so
Quote Originally Posted by OwenG View Post
So I've noticed a lot of DarkRP servers have a playable piano thing installed that uses inputs from your keyboard. It looks cool but it's difficult to play using the keyboard so I thought that someone could probably(or already has) make a script to play a few songs automatically. i don't know how hard this would be and I know it's not really a hack but it's a cool idea and possibly a challenge for any lua scripters out there who aren't making hacks.
why would you need a script...you can literally use any keyboard macro program
Yeah, but it can't get the tune of the song...
Quote Originally Posted by OwenG View Post
So I've noticed a lot of DarkRP servers have a playable piano thing installed that uses inputs from your keyboard. It looks cool but it's difficult to play using the keyboard so I thought that someone could probably(or already has) make a script to play a few songs automatically. i don't know how hard this would be and I know it's not really a hack but it's a cool idea and possibly a challenge for any lua scripters out there who aren't making hacks.
i have a hack that can play midi files on the gmod playable piano. but it uses lua and you would get banned because CAC.
wow that's funny I guess a lot of people have this urge..

Here's some autoit for anyone lookin'

UP/DOWN ARROW KEYS change the speed of play.
TAB toggles pause.
ESC exits the program.

keep in mind, I didn't add the handle to just jump into the game on start of the program so it's going to start mashing the keys until you get in the game lol. Try hitting tab (pause toggle) until you get back in.

Code:
#comments-start
;~ By: Bartender
;~
;AUTOIT PIANO PLAYER FOR GMOD
;~
;CURRENT SCRIPT::
;~	BASIC - Zelda Dungeon | Nintendo
;~
;~
#comments-end

;~
;VARIABLES
;~
$khs = 0.210
$khsf = 0.180
$done = false
$secondstoPlayPiano = 120000 ;33hours lol
$timer = TimerInit()
$paused = false

;key press
Func _press($key, $value)
  $secondsToHoldKey = $value * 1000
   $KeyToPress = $key

   Send ("{"&$KeyToPress&" DOWN}")
   Sleep ($secondsToHoldKey)
   Send ("{"&$KeyToPress&" UP}")
EndFunc

;pause
Func TogglePause()
   $paused = NOT $paused
   While $Paused
	  sleep(100)
	  ToolTip('Script is "Paused = SCRIPT IS NOT RUNNING = you wont get another message if you dont unpause it"',0,0)
   WEnd
	  ToolTip("")
EndFunc

;piano controls
Func PlaySlower()
$khs = ($khs + 0.05)
$khsf = ($khsf + 0.05)
EndFunc

Func PlayFaster()
$khs = ($khs - 0.05)
$khsf = ($khsf - 0.05)
EndFunc

Func _Exit()
   Exit
EndFunc

HotKeySet( "{TAB}" , "TogglePause")
HotKeySet( "{UP}" , "PlayFaster")
HotKeySet( "{DOWN}" , "PlaySlower")
HotKeySet( "{ESC}" , "_Exit")

If ProcessExists("HL2.exe") Then
   While $done = false
	  If TimerDiff($timer) > ($secondstoPlayPiano*1000) Then $done = true
	  Sleep (5)
	  _press ("g",$khs)
	  Sleep (5)
	  _press ("u",$khsf)
	  Sleep (5)
	  _press ("l",$khs)
	  Sleep (5)
	  _press ("p",$khs) ;
	  Sleep (5)
	  _press ("g",$khsf)
	  Sleep (5)
	  _press ("u",$khs)
	  Sleep (5)
	  _press ("l",$khs)
	  Sleep (5)
	  _press ("p",$khs) ;
	  Sleep (5)
	  _press ("g",$khsf)
	  Sleep (5)
	  _press ("u",$khsf)
	  Sleep (5)
	  _press ("l",$khsf)
	  Sleep (5)
	  _press ("p",$khsf) ;
	  Sleep (5)
	  _press ("g",$khsf)
	  Sleep (5)
	  _press ("u",$khsf)
	  Sleep (5)
	  _press ("l",$khsf)
	  Sleep (5)
	  _press ("p",$khsf) ;
	  Sleep (5)
	  _press ("f",$khs)
	  Sleep (5)
	  _press ("y",$khsf)
	  Sleep (5)
	  _press ("l",$khs)
	  Sleep (5)
	  _press ("p",$khs) ;
	  Sleep (5)
	  _press ("f",$khsf)
	  Sleep (5)
	  _press ("y",$khs)
	  Sleep (5)
	  _press ("l",$khsf)
	  Sleep (5)
	  _press ("p",$khs) ;
	  Sleep (5)
	  _press ("f",$khs)
	  Sleep (5)
	  _press ("y",$khsf)
	  Sleep (5)
	  _press ("l",$khs)
	  Sleep (5)
	  _press ("p",$khs) ;
	  Sleep (5)
	  _press ("f",$khsf)
	  Sleep (5)
	  _press ("y",$khs)
	  Sleep (5)
	  _press ("l",$khsf)
	  Sleep (5)
	  _press ("p",$khs) ;
	  Sleep (5)
	  _press ("d",$khs)
	  Sleep (5)
	  _press ("g",$khsf)
	  Sleep (5)
	  _press ("l",$khs)
	  Sleep (5)
	  _press ("p",$khs) ;
	  Sleep (5)
	  _press ("d",$khsf)
	  Sleep (5)
	  _press ("g",$khs)
	  Sleep (5)
	  _press ("l",$khsf)
	  Sleep (5)
	  _press ("p",$khs) ;
	  Sleep (5)
	  _press ("d",$khs)
	  Sleep (5)
	  _press ("g",$khsf)
	  Sleep (5)
	  _press ("l",$khs)
	  Sleep (5)
	  _press ("p",$khs) ;
	  Sleep (5)
	  _press ("d",$khsf)
	  Sleep (5)
	  _press ("g",$khs)
	  Sleep (5)
	  _press ("l",$khsf)
	  Sleep (5)
	  _press ("p",$khs) ;
	  Sleep (5)
	  _press ("e",$khs)
	  Sleep (5)
	  _press ("g",$khsf)
	  Sleep (5)
	  _press ("k",$khs)
	  Sleep (5)
	  _press ("l",$khs) ;
	  Sleep (5)
	  _press ("e",$khsf)
	  Sleep (5)
	  _press ("g",$khs)
	  Sleep (5)
	  _press ("k",$khsf)
	  Sleep (5)
	  _press ("l",$khs) ;
	  Sleep (5)
	  _press ("e",$khs)
	  Sleep (5)
	  _press ("g",$khsf)
	  Sleep (5)
	  _press ("k",$khs)
	  Sleep (5)
	  _press ("l",$khs) ;
	  Sleep (5)
	  _press ("e",$khsf)
	  Sleep (5)
	  _press ("g",$khs)
	  Sleep (5)
	  _press ("k",$khsf)
	  Sleep (5)
	  _press ("l",$khs) ;
	  Sleep (5)
	  _press ("s",$khs)
	  Sleep (5)
	  _press ("g",$khsf)
	  Sleep (5)
	  _press ("k",$khs)
	  Sleep (5)
	  _press ("l",$khs) ;
	  Sleep (5)
	  _press ("s",$khsf)
	  Sleep (5)
	  _press ("g",$khs)
	  Sleep (5)
	  _press ("k",$khsf)
	  Sleep (5)
	  _press ("l",$khs) ;
	  Sleep (5)
	  _press ("s",$khs)
	  Sleep (5)
	  _press ("g",$khsf)
	  Sleep (5)
	  _press ("k",$khs)
	  Sleep (5)
	  _press ("l",$khs) ;
	  Sleep (5)
	  _press ("s",$khsf)
	  Sleep (5)
	  _press ("g",$khs)
	  Sleep (5)
	  _press ("k",$khsf)
	  Sleep (5)
	  _press ("l",$khs) ;
	  Sleep (5)
   WEnd
   Msgbox(0,"","$x is no longer equal to 0!")
Else
   Exit
EndIf
Posts 16 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?