Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°PwN3D°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°PwN3D°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°PwN3D°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°PwN3D°°°°°°°°°°°°°PwN3D°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°PwN3D°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
- * °°°°°°PwN3D°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°PwN3D°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°PwN3D°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°PwN3D°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°PwN3D°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°PwN3D°°°°°°°°°°
- ____ __ __ __ __ __ ____
- /\ _`\ /\ \ __/\ \/\ \/\ \ /'__`\ /\ _`\
- \ \ \L\ \ \ \/\ \ \ \ \ `\\ \/\_\L\ \\ \ \/\ \
- \ \ ,__/\ \ \ \ \ \ \ \ , ` \/_/_\_<_\ \ \ \ \
- \ \ \/ \ \ \_/ \_\ \ \ \`\ \/\ \L\ \\ \ \_\ \
- \ \_\ \ `\___x___/\ \_\ \_\ \____/ \ \____/
- \/_/ '\/__//__/ \/_/\/_/\/___/ \/___/
- * _ _ _
- / /\ /\ \ /\_\ _
- / / \\ \ \ / / //\_\
- / / /\ \\ \ \_/ / / \/_/
- / / /\ \ \\ \___/ /
- / / /\ \_\ \\ \ \_/
- / / /\ \ \___\\ \ \
- / / / \ \ \__/ \ \ \ _
- / / /____\_\ \ \ \ \ /_/\
- / / /__________\ \ \_\ \_\/
- \/_____________/ \/_/
- °
- _____ _____ _____ _____ _____ _____ _______ _____
- /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ ______ /::\ \ /\ \
- /::\ \ /::\ \ /::\ \ /::\ \ /::\____\ /::\ \ |::| | /::::\ \ /::\ \
- /::::\ \ /::::\ \ /::::\ \ /::::\ \ /:::/ / /::::\ \ |::| | /::::::\ \ /::::\ \
- /::::::\ \ /::::::\ \ /::::::\ \ /::::::\ \ /:::/ / /::::::\ \ |::| | /::::::::\ \ /::::::\ \
- /:::/\:::\ \ /:::/\:::\ \ /:::/\:::\ \ /:::/\:::\ \ /:::/ / /:::/\:::\ \ |::| | /:::/~~\:::\ \ /:::/\:::\ \
- /:::/__\:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ /:::/____/ /:::/__\:::\ \ |::| | /:::/ \:::\ \ /:::/__\:::\ \
- /::::\ \:::\ \ /::::\ \:::\ \ \:::\ \:::\ \ \:::\ \:::\ \ /::::\ \ /::::\ \:::\ \ |::| | /:::/ / \:::\ \ /::::\ \:::\ \
- /::::::\ \:::\ \ /::::::\ \:::\ \ ___\:::\ \:::\ \ ___\:::\ \:::\ \ /::::::\ \ _____ /::::::\ \:::\ \ |::| | /:::/____/ \:::\____\ /::::::\ \:::\ \
- /:::/\:::\ \:::\ ___\ /:::/\:::\ \:::\ \ /\ \:::\ \:::\ \ /\ \:::\ \:::\ \ /:::/\:::\ \ /\ \ /:::/\:::\ \:::\ \ ______|::|___|___ ____ |:::| | |:::| | /:::/\:::\ \:::\____\
- /:::/__\:::\ \:::| |/:::/ \:::\ \:::\____\/::\ \:::\ \:::\____\/::\ \:::\ \:::\____\/:::/ \:::\ /::\____\/:::/ \:::\ \:::\____\|:::::::::::::::::| ||:::|____| |:::| |/:::/ \:::\ \:::| |
- \:::\ \:::\ /:::|____|\::/ \:::\ /:::/ /\:::\ \:::\ \::/ /\:::\ \:::\ \::/ /\::/ \:::\ /:::/ /\::/ \:::\ /:::/ /|:::::::::::::::::|____| \:::\ \ /:::/ / \::/ |::::\ /:::|____|
- \:::\ \:::\/:::/ / \/____/ \:::\/:::/ / \:::\ \:::\ \/____/ \:::\ \:::\ \/____/ \/____/ \:::\/:::/ / \/____/ \:::\/:::/ / ~~~~~~|::|~~~|~~~ \:::\ \ /:::/ / \/____|:::::\/:::/ /
- \:::\ \::::::/ / \::::::/ / \:::\ \:::\ \ \:::\ \:::\ \ \::::::/ / \::::::/ / |::| | \:::\ /:::/ / |:::::::::/ /
- \:::\ \::::/ / \::::/ / \:::\ \:::\____\ \:::\ \:::\____\ \::::/ / \::::/ / |::| | \:::\__/:::/ / |::|\::::/ /
- \:::\ /:::/ / /:::/ / \:::\ /:::/ / \:::\ /:::/ / /:::/ / /:::/ / |::| | \::::::::/ / |::| \::/____/
- \:::\/:::/ / /:::/ / \:::\/:::/ / \:::\/:::/ / /:::/ / /:::/ / |::| | \::::::/ / |::| ~|
- \::::::/ / /:::/ / \::::::/ / \::::::/ / /:::/ / /:::/ / |::| | \::::/ / |::| |
- \::::/ / /:::/ / \::::/ / \::::/ / /:::/ / /:::/ / |::| | \::/____/ \::| |
- \::/____/ \::/ / \::/ / \::/ / \::/ / \::/ / |::|___| ~~ \:| |
- ~~ \/____/ \/____/ \/____/ \/____/ \/____/ ~~ \|___|
- *
- *
- Yb dP 8 w .d88b. w w dP"Yb
- Yb db dP 8d8b. .d88 w8ww YPwww. .d88b .d8b 8 8 8d8b w w8ww Yb dP " d8
- YbdPYbdP 8P Y8 8 8 8 d8 8.dP' 8 8b d8 8P 8 8 YbdP dP
- YP YP 8 8 `Y88 Y8P `Y88P' `Y88P `Y8P `Y8P8 8 8 Y8P dP w
- dP
- *
- *
- ::: ::::::::
- :+: :+: :+:
- +:+ +:+
- +#+ +#++:
- +#+ +#+
- #+# #+# #+#
- ### ######## _ _ _
- | | | | | |
- _ _ _ __ ___ _ __ ___ _ __ _ _ _ __ | |_ ___ __| | | |__ ___ ___ __ _ _ _ ___ ___ __ _____ ___ __ _ _ __ ___
- | | | | '_ \ / _ \ '_ \ / __| '__| | | | '_ \| __/ _ \/ _` | | '_ \ / _ \/ __/ _` | | | / __|/ _ \ \ \ /\ / / _ \ / __/ _` | '__/ _ \
- | |_| | | | | __/ | | | (__| | | |_| | |_) | || __/ (_| | | |_) | __/ (_| (_| | |_| \__ \ __/ \ V V / __/ | (_| (_| | | | __/
- \__,_|_| |_|\___|_| |_|\___|_| \__, | .__/ \__\___|\__,_| |_.__/ \___|\___\__,_|\__,_|___/\___| \_/\_/ \___| \___\__,_|_| \___|
- __/ | |
- |___/|_|
- ::: ::::::::
- :+: :+: :+:
- +:+ +:+
- +#+ +#++:
- +#+ +#+
- #+# #+# #+#
- ### ########
- */
- namespace WindowsFormsApplication60
- {
- using MetroFramework;
- using MetroFramework.Controls;
- using MetroFramework.Forms;
- using PS3Lib;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using System.Runtime.InteropServices;
- using System.Text;
- using System.Threading;
- using System.Windows.Forms;
- public class Form1 : MetroForm
- {
- private IContainer components = null;
- public static bool fly = false;
- public static bool god = false;
- public static bool Jump = false;
- private System.Windows.Forms.Timer Menu2;
- private MetroButton metroButton1;
- private MetroButton metroButton2;
- private MetroButton metroButton3;
- private MetroButton metroButton4;
- private MetroButton metroButton5;
- private MetroLabel metroLabel1;
- private MetroLabel metroLabel2;
- private MetroRadioButton metroRadioButton1;
- private MetroRadioButton metroRadioButton2;
- public static bool ncoil = false;
- public static bool Open = false;
- public static bool person = false;
- public static PS3API ps3 = new PS3API(SelectAPI.TargetManager);
- public static bool rbox = false;
- public static bool saim = false;
- public static int scroll = 0;
- public static bool speed = false;
- public static bool uav = false;
- public static bool VSAT = false;
- public Form1()
- {
- this.InitializeComponent();
- }
- protected override void Dispose(bool disposing)
- {
- if (disposing && (this.components != null))
- {
- this.components.Dispose();
- }
- base.Dispose(disposing);
- }
- public static uint G_Spawn()
- {
- return RPC.Call1(Offsets.G_Spawn, new object[0]);
- }
- public float[] getOrigin(uint clientNum)
- {
- return new float[] { ps3.Extension.ReadFloat((Offsets.G_Client + (Offsets.G_ClientSize * clientNum)) + 40), ps3.Extension.ReadFloat(((Offsets.G_Client + (Offsets.G_ClientSize * clientNum)) + 40) + 8), ps3.Extension.ReadFloat(((Offsets.G_Client + (Offsets.G_ClientSize * clientNum)) + 40) + 4) };
- }
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.Menu2 = new System.Windows.Forms.Timer(this.components);
- this.metroButton1 = new MetroFramework.Controls.MetroButton();
- this.metroButton2 = new MetroFramework.Controls.MetroButton();
- this.metroRadioButton1 = new MetroFramework.Controls.MetroRadioButton();
- this.metroRadioButton2 = new MetroFramework.Controls.MetroRadioButton();
- this.metroButton3 = new MetroFramework.Controls.MetroButton();
- this.metroButton4 = new MetroFramework.Controls.MetroButton();
- this.metroButton5 = new MetroFramework.Controls.MetroButton();
- this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
- this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
- this.SuspendLayout();
- //
- // Menu2
- //
- this.Menu2.Tick += new System.EventHandler(this.Menu2_Tick);
- //
- // metroButton1
- //
- this.metroButton1.Highlight = true;
- this.metroButton1.Location = new System.Drawing.Point(147, 101);
- this.metroButton1.Name = "metroButton1";
- this.metroButton1.Size = new System.Drawing.Size(100, 34);
- this.metroButton1.Style = MetroFramework.MetroColorStyle.Blue;
- this.metroButton1.StyleManager = null;
- this.metroButton1.TabIndex = 2;
- this.metroButton1.Text = "Connect/Attach";
- this.metroButton1.Theme = MetroFramework.MetroThemeStyle.Dark;
- this.metroButton1.Click += new System.EventHandler(this.metroButton1_Click);
- //
- // metroButton2
- //
- this.metroButton2.Highlight = true;
- this.metroButton2.Location = new System.Drawing.Point(69, 150);
- this.metroButton2.Name = "metroButton2";
- this.metroButton2.Size = new System.Drawing.Size(100, 42);
- this.metroButton2.Style = MetroFramework.MetroColorStyle.Blue;
- this.metroButton2.StyleManager = null;
- this.metroButton2.TabIndex = 3;
- this.metroButton2.Text = "Start Menu";
- this.metroButton2.Theme = MetroFramework.MetroThemeStyle.Dark;
- this.metroButton2.Click += new System.EventHandler(this.metroButton2_Click);
- //
- // metroRadioButton1
- //
- this.metroRadioButton1.AutoSize = true;
- this.metroRadioButton1.CustomBackground = false;
- this.metroRadioButton1.CustomForeColor = false;
- this.metroRadioButton1.FontSize = MetroFramework.MetroLinkSize.Small;
- this.metroRadioButton1.FontWeight = MetroFramework.MetroLinkWeight.Regular;
- this.metroRadioButton1.Location = new System.Drawing.Point(115, 64);
- this.metroRadioButton1.Name = "metroRadioButton1";
- this.metroRadioButton1.Size = new System.Drawing.Size(44, 15);
- this.metroRadioButton1.Style = MetroFramework.MetroColorStyle.Blue;
- this.metroRadioButton1.StyleManager = null;
- this.metroRadioButton1.TabIndex = 4;
- this.metroRadioButton1.TabStop = true;
- this.metroRadioButton1.Text = "CEX";
- this.metroRadioButton1.Theme = MetroFramework.MetroThemeStyle.Dark;
- this.metroRadioButton1.UseStyleColors = false;
- this.metroRadioButton1.UseVisualStyleBackColor = true;
- this.metroRadioButton1.CheckedChanged += new System.EventHandler(this.metroRadioButton1_CheckedChanged);
- //
- // metroRadioButton2
- //
- this.metroRadioButton2.AutoSize = true;
- this.metroRadioButton2.CustomBackground = false;
- this.metroRadioButton2.CustomForeColor = false;
- this.metroRadioButton2.FontSize = MetroFramework.MetroLinkSize.Small;
- this.metroRadioButton2.FontWeight = MetroFramework.MetroLinkWeight.Regular;
- this.metroRadioButton2.Location = new System.Drawing.Point(221, 64);
- this.metroRadioButton2.Name = "metroRadioButton2";
- this.metroRadioButton2.Size = new System.Drawing.Size(44, 15);
- this.metroRadioButton2.Style = MetroFramework.MetroColorStyle.Blue;
- this.metroRadioButton2.StyleManager = null;
- this.metroRadioButton2.TabIndex = 5;
- this.metroRadioButton2.TabStop = true;
- this.metroRadioButton2.Text = "DEX";
- this.metroRadioButton2.Theme = MetroFramework.MetroThemeStyle.Dark;
- this.metroRadioButton2.UseStyleColors = false;
- this.metroRadioButton2.UseVisualStyleBackColor = true;
- this.metroRadioButton2.CheckedChanged += new System.EventHandler(this.metroRadioButton2_CheckedChanged);
- //
- // metroButton3
- //
- this.metroButton3.Highlight = true;
- this.metroButton3.Location = new System.Drawing.Point(221, 150);
- this.metroButton3.Name = "metroButton3";
- this.metroButton3.Size = new System.Drawing.Size(100, 42);
- this.metroButton3.Style = MetroFramework.MetroColorStyle.Blue;
- this.metroButton3.StyleManager = null;
- this.metroButton3.TabIndex = 6;
- this.metroButton3.Text = "Stop Menu";
- this.metroButton3.Theme = MetroFramework.MetroThemeStyle.Dark;
- this.metroButton3.Click += new System.EventHandler(this.metroButton3_Click);
- //
- // metroButton4
- //
- this.metroButton4.Highlight = true;
- this.metroButton4.Location = new System.Drawing.Point(69, 210);
- this.metroButton4.Name = "metroButton4";
- this.metroButton4.Size = new System.Drawing.Size(100, 27);
- this.metroButton4.Style = MetroFramework.MetroColorStyle.Blue;
- this.metroButton4.StyleManager = null;
- this.metroButton4.TabIndex = 7;
- this.metroButton4.Text = "Controls";
- this.metroButton4.Theme = MetroFramework.MetroThemeStyle.Dark;
- this.metroButton4.Click += new System.EventHandler(this.metroButton4_Click);
- //
- // metroButton5
- //
- this.metroButton5.Highlight = true;
- this.metroButton5.Location = new System.Drawing.Point(221, 210);
- this.metroButton5.Name = "metroButton5";
- this.metroButton5.Size = new System.Drawing.Size(100, 27);
- this.metroButton5.Style = MetroFramework.MetroColorStyle.Blue;
- this.metroButton5.StyleManager = null;
- this.metroButton5.TabIndex = 8;
- this.metroButton5.Text = "Credits";
- this.metroButton5.Theme = MetroFramework.MetroThemeStyle.Dark;
- this.metroButton5.Click += new System.EventHandler(this.metroButton5_Click);
- //
- // metroLabel1
- //
- this.metroLabel1.AutoSize = true;
- this.metroLabel1.CustomBackground = false;
- this.metroLabel1.CustomForeColor = false;
- this.metroLabel1.FontSize = MetroFramework.MetroLabelSize.Medium;
- this.metroLabel1.FontWeight = MetroFramework.MetroLabelWeight.Light;
- this.metroLabel1.ForeColor = System.Drawing.SystemColors.ActiveCaption;
- this.metroLabel1.LabelMode = MetroFramework.Controls.MetroLabelMode.Default;
- this.metroLabel1.Location = new System.Drawing.Point(235, 255);
- this.metroLabel1.Name = "metroLabel1";
- this.metroLabel1.Size = new System.Drawing.Size(131, 19);
- this.metroLabel1.Style = MetroFramework.MetroColorStyle.Blue;
- this.metroLabel1.StyleManager = null;
- this.metroLabel1.TabIndex = 9;
- this.metroLabel1.Text = "By TheModedHacker";
- this.metroLabel1.Theme = MetroFramework.MetroThemeStyle.Dark;
- this.metroLabel1.UseStyleColors = false;
- //
- // metroLabel2
- //
- this.metroLabel2.AutoSize = true;
- this.metroLabel2.CustomBackground = false;
- this.metroLabel2.CustomForeColor = false;
- this.metroLabel2.FontSize = MetroFramework.MetroLabelSize.Medium;
- this.metroLabel2.FontWeight = MetroFramework.MetroLabelWeight.Light;
- this.metroLabel2.LabelMode = MetroFramework.Controls.MetroLabelMode.Default;
- this.metroLabel2.Location = new System.Drawing.Point(23, 255);
- this.metroLabel2.Name = "metroLabel2";
- this.metroLabel2.Size = new System.Drawing.Size(70, 19);
- this.metroLabel2.Style = MetroFramework.MetroColorStyle.Blue;
- this.metroLabel2.StyleManager = null;
- this.metroLabel2.TabIndex = 10;
- this.metroLabel2.Text = "Version 1.0";
- this.metroLabel2.Theme = MetroFramework.MetroThemeStyle.Dark;
- this.metroLabel2.UseStyleColors = false;
- //
- // Form1
- //
- this.ClientSize = new System.Drawing.Size(389, 285);
- this.ControlBox = false;
- this.Controls.Add(this.metroLabel2);
- this.Controls.Add(this.metroLabel1);
- this.Controls.Add(this.metroButton5);
- this.Controls.Add(this.metroButton4);
- this.Controls.Add(this.metroButton3);
- this.Controls.Add(this.metroRadioButton2);
- this.Controls.Add(this.metroRadioButton1);
- this.Controls.Add(this.metroButton2);
- this.Controls.Add(this.metroButton1);
- this.Location = new System.Drawing.Point(0, 0);
- this.MaximizeBox = false;
- this.MaximumSize = new System.Drawing.Size(389, 285);
- this.Name = "Form1";
- this.Text = "TheModedHacker\'s Menu 1.18";
- this.Theme = MetroFramework.MetroThemeStyle.Dark;
- this.ResumeLayout(false);
- this.PerformLayout();
- }
- public static void iPrintln(int Client, string Text)
- {
- SV_GameSendServerCommand(Client, "o \"" + Text + "\"");
- }
- public static void iPrintlnBold(int Client, string Text)
- {
- SV_GameSendServerCommand(Client, "< \"" + Text + "\"");
- }
- private void Menu2_Tick(object sender, EventArgs e)
- {
- if (!Open)
- {
- if (Monitor.dectectDpadR())
- {
- Open = true;
- scroll = 0;
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^5>Host Menu\n ^4No Host Menu\n ^4Lobby settings\n ^4Entity spawning");
- }
- }
- else if (Open)
- {
- byte[] buffer;
- if (scroll == 0)
- {
- if (Monitor.dectectDpadU())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4Host Menu \n ^4No Host Menu\n ^4Lobby settings\n ^5>Entity spawning");
- scroll = 3;
- }
- if (Monitor.dectectDpadD())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4Host Menu\n ^5>No Host Menu\n ^4Lobby Settings\n ^4Entity spawning");
- scroll = 1;
- }
- if (Monitor.dectectSq())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^5>GodMode\n ^4Infinite Ammo\n ^4Player Speed\n ^43\x00baPerson");
- scroll = 10;
- }
- }
- if (scroll == 10)
- {
- if (Monitor.dectectDpadU())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4GodMode\n ^4Infinite Ammo\n ^4Player Speed\n ^5>3\x00baPerson");
- scroll = 13;
- }
- if (Monitor.dectectDpadD())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4GodMode\n ^5>Infinite Ammo\n ^4Player Speed\n ^43\x00baPerson");
- scroll = 11;
- }
- if (Monitor.dectectSq())
- {
- if (!god)
- {
- ps3.SetMemory(0x1780f43, new byte[] { 5 });
- iPrintlnBold(0, "GodMode ^2Enabled");
- god = true;
- }
- else if (god)
- {
- ps3.SetMemory(0x1780f43, new byte[] { 8 });
- iPrintlnBold(0, "GodMode ^1Disabled");
- god = false;
- }
- }
- }
- if (scroll == 11)
- {
- if (Monitor.dectectDpadU())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^5>GodMode\n ^4Infinite Ammo\n ^4Player Speed\n ^43\x00baPerson");
- scroll = 10;
- }
- if (Monitor.dectectDpadD())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4GodMode\n ^4Infinite Ammo\n ^5>Player Speed\n ^43\x00baPerson");
- scroll = 12;
- }
- if (Monitor.dectectSq())
- {
- ps3.SetMemory(0x1781362, new byte[] { 0xff, 0xff });
- iPrintlnBold(0, "Ammo ^2Given");
- }
- }
- if (scroll == 12)
- {
- if (Monitor.dectectDpadU())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4GodMode\n ^5>Infinite Ammo\n ^4Player Speed\n ^43\x00baPerson");
- scroll = 11;
- }
- if (Monitor.dectectDpadD())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4GodMode\n ^4Infinite Ammo\n ^4Player Speed\n ^5>3\x00baPerson");
- scroll = 13;
- }
- if (Monitor.dectectSq())
- {
- if (!speed)
- {
- ps3.SetMemory(0x1786418, new byte[] { 0x40 });
- speed = true;
- iPrintlnBold(0, "Speed ^2Enabled");
- }
- else if (speed)
- {
- ps3.SetMemory(0x1786418, new byte[] { 0x3f });
- speed = false;
- iPrintlnBold(0, "Speed ^1Disabled");
- }
- }
- }
- if (scroll == 13)
- {
- if (Monitor.dectectDpadU())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4GodMode\n ^4Infinite Ammo\n ^5>Player Speed\n ^43\x00baPerson");
- scroll = 12;
- }
- if (Monitor.dectectDpadD())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^5>GodMode\n ^4Infinite Ammo\n ^4Player Speed\n ^43\x00baPerson");
- scroll = 10;
- }
- if (Monitor.dectectSq())
- {
- if (!person)
- {
- ps3.SetMemory(0x1780fac, new byte[] { 1 });
- person = true;
- iPrintlnBold(0, "3\x00baPerson ^2Enabled");
- }
- else if (person)
- {
- ps3.SetMemory(0x1780fac, new byte[1]);
- person = false;
- iPrintlnBold(0, "3\x00baPerson ^1Disabled");
- }
- }
- }
- if (scroll == 1)
- {
- if (Monitor.dectectDpadU())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^5>Host Menu\n ^4No Host Menu\n ^4Lobby settings\n ^4Entity spawning");
- scroll = 0;
- }
- if (Monitor.dectectDpadD())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4Host Menu\n ^4No Host Menu\n ^5>Lobby settings\n ^4Entity spawning");
- scroll = 2;
- }
- if (Monitor.dectectSq())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^5>VSAT\n ^4Red Boxes\n ^4No Recoil");
- scroll = 20;
- }
- }
- if (scroll == 20)
- {
- if (Monitor.dectectDpadU())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4VSAT\n ^4Red Boxes\n ^5>No Recoil");
- scroll = 0x16;
- }
- if (Monitor.dectectDpadD())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4VSAT\n ^5>Red Boxes\n ^4No Recoil");
- scroll = 0x15;
- }
- if (Monitor.dectectSq())
- {
- if (!VSAT)
- {
- buffer = new byte[4];
- buffer[0] = 0x60;
- ps3.SetMemory(0x33c60, buffer);
- VSAT = true;
- iPrintlnBold(0, "VSAT ^2Enabled");
- }
- else if (VSAT)
- {
- ps3.SetMemory(0x33c60, new byte[] { 0x40, 0x81, 0, 0x44 });
- VSAT = false;
- iPrintlnBold(0, "VSAT ^1Disabled");
- }
- }
- }
- if (scroll == 0x15)
- {
- if (Monitor.dectectDpadU())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^5>VSAT\n ^4Red Boxes\n ^4No Recoil");
- scroll = 20;
- }
- if (Monitor.dectectDpadD())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4VSAT\n ^4Red Boxes\n ^5>No Recoil");
- scroll = 0x16;
- }
- if (Monitor.dectectSq())
- {
- if (!rbox)
- {
- ps3.SetMemory(0x783e0, new byte[] { 0x38, 0x60, 0, 1 });
- buffer = new byte[4];
- buffer[0] = 0x60;
- ps3.SetMemory(0x78604, buffer);
- rbox = true;
- iPrintlnBold(0, "RedBoxes ^2Enabled");
- }
- else if (rbox)
- {
- buffer = new byte[4];
- buffer[0] = 0x38;
- buffer[1] = 0x60;
- ps3.SetMemory(0x783e0, buffer);
- ps3.SetMemory(0x78604, new byte[] { 0x41, 0x81, 1, 12 });
- rbox = false;
- iPrintlnBold(0, "RedBoxes ^1Disabled");
- }
- }
- }
- if (scroll == 0x16)
- {
- if (Monitor.dectectDpadU())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4VSAT\n ^5>Red Boxes\n ^4No Recoil");
- scroll = 0x15;
- }
- if (Monitor.dectectDpadD())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^5>VSAT\n ^4Red Boxes\n ^4No Recoil");
- scroll = 20;
- }
- if (Monitor.dectectSq())
- {
- if (!ncoil)
- {
- buffer = new byte[4];
- buffer[0] = 0x60;
- ps3.SetMemory(0xf9e54, buffer);
- ncoil = true;
- iPrintlnBold(0, "No Recoil ^2Enabled");
- }
- else if (ncoil)
- {
- ps3.SetMemory(0xf9e54, new byte[] { 0x48, 80, 110, 0xe5 });
- ncoil = false;
- iPrintlnBold(0, "No Recoil ^1Disabled");
- }
- }
- }
- if (scroll == 2)
- {
- if (Monitor.dectectDpadU())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4Host Menu\n ^5>No Host Menu\n ^4Lobby settings\n ^4Entity spawning");
- scroll = 1;
- }
- if (Monitor.dectectDpadD())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4Host Menu\n ^4No Host Menu\n ^4Lobby settings\n ^5>Entity spawning");
- scroll = 3;
- }
- if (Monitor.dectectSq())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^5>Super Jump\n ^4Gravity\n ^4Fly Mode");
- scroll = 30;
- }
- }
- if (scroll == 30)
- {
- if (Monitor.dectectDpadU())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4Super Jump\n ^4Gravity\n ^5>Fly Mode");
- scroll = 0x20;
- }
- if (Monitor.dectectDpadD())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4Super Jump\n ^5>Gravity\n ^4Fly Mode");
- scroll = 0x1f;
- }
- if (Monitor.dectectSq())
- {
- if (!Jump)
- {
- buffer = new byte[2];
- buffer[0] = 0x45;
- ps3.SetMemory(0x5be244, buffer);
- Jump = true;
- iPrintlnBold(0, "Super Jump ^2Enabled");
- }
- else if (Jump)
- {
- buffer = new byte[2];
- buffer[0] = 2;
- ps3.SetMemory(0x5be244, buffer);
- Jump = false;
- iPrintlnBold(0, "Super Jump ^1Disabled");
- }
- }
- }
- if (scroll == 0x1f)
- {
- if (Monitor.dectectDpadU())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^5>Super Jump\n ^4Gravity\n ^4Fly Mode");
- scroll = 30;
- }
- if (Monitor.dectectDpadD())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4Super Jump\n ^4Gravity\n ^5>Fly Mode");
- scroll = 0x20;
- }
- if (Monitor.dectectSq())
- {
- if (!fly)
- {
- ps3.SetMemory(0x5d5df8, new byte[] { 0x38, 0x60, 0, 5 });
- fly = true;
- iPrintlnBold(0, "Gravity ^2Enabled");
- }
- else if (fly)
- {
- ps3.SetMemory(0x5d5df8, new byte[] { 0x80, 0x7d, 0, 4 });
- fly = false;
- iPrintlnBold(0, "Gravity ^1Disabled");
- }
- }
- }
- if (scroll == 0x20)
- {
- if (Monitor.dectectDpadU())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4Super Jump\n ^5>Gravity\n ^4Fly Mode");
- scroll = 0x1f;
- }
- if (Monitor.dectectDpadD())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^5>Super Jump\n ^4Gravity\n ^4Fly Mode");
- scroll = 30;
- }
- if (Monitor.dectectSq())
- {
- if (!fly)
- {
- ps3.SetMemory(0x5d5df8, new byte[] { 0x38, 0x60, 0, 5 });
- fly = true;
- iPrintlnBold(0, "Fly Mode ^2Enabled");
- }
- else if (fly)
- {
- ps3.SetMemory(0x5d5df8, new byte[] { 0x80, 0x7d, 0, 4 });
- fly = false;
- iPrintlnBold(0, "Fly Mode ^1Disabled");
- }
- }
- }
- if (scroll == 3)
- {
- if (Monitor.dectectDpadU())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^4Host Menu\n ^4No Host Menu\n ^5>Lobby settings\n ^4Entity spawning");
- scroll = 2;
- }
- if (Monitor.dectectDpadD())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^5>Host Menu\n ^4No Host Menu\n ^4Lobby settings\n ^4Entity spawning");
- scroll = 0;
- }
- if (Monitor.dectectSq())
- {
- FPS.WriteText(" ^2TheModedHacker's ^3Menu ^11.18 \n ^5>Carepackage");
- scroll = 40;
- }
- }
- if ((scroll == 40) && Monitor.dectectSq())
- {
- float[] numArray = this.getOrigin(0);
- float x = numArray[0];
- float y = numArray[1];
- float z = numArray[2];
- this.spawnEntity("t6_wpn_supply_drop_ally", x, y, z, 0f, 0f, 0f);
- iPrintlnBold(0, string.Concat(new object[] { "Spawned: ^2t6_wpn_supply_drop_ally ^3", x, y, z }));
- }
- if (Monitor.dectectR3())
- {
- FPS.WriteText(" ");
- Open = false;
- }
- }
- }
- private void metroButton1_Click(object sender, EventArgs e)
- {
- if (ps3.ConnectTarget(0) & ps3.AttachProcess())
- {
- MessageBox.Show("Connected and attached", "Sucess", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- FPS.enable();
- RPC.Init();
- }
- else
- {
- MessageBox.Show("Imposible to connect", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- }
- }
- private void metroButton2_Click(object sender, EventArgs e)
- {
- this.Menu2.Start();
- }
- private void metroButton3_Click(object sender, EventArgs e)
- {
- this.Menu2.Stop();
- }
- private void metroButton4_Click(object sender, EventArgs e)
- {
- MessageBox.Show("DPAD Right - Open Menu\nR3 - Close Menu\nDPAD Up/Down - Scroll\nSquare - Select Option");
- }
- private void metroButton5_Click(object sender, EventArgs e)
- {
- MessageBox.Show("Shark - RPC 1.18, DPAD Monitoring\nmilky4444 - Menu Base\nMango_Knife - 1.18 Offsets\nxReaperv3 - Get Player Position");
- }
- private void metroRadioButton1_CheckedChanged(object sender, EventArgs e)
- {
- ps3.ChangeAPI(SelectAPI.ControlConsole);
- }
- private void metroRadioButton2_CheckedChanged(object sender, EventArgs e)
- {
- ps3.ChangeAPI(SelectAPI.TargetManager);
- }
- public uint spawnEntity(string ModelName, float X, float Y, float Z, float Yaw = 0f, float Pitch = 0f, float Roll = 0f)
- {
- uint num = G_Spawn();
- Console.Write(num + "\n");
- ps3.Extension.WriteFloat(num + 0x134, X);
- ps3.Extension.WriteFloat(num + 0x13c, Y);
- ps3.Extension.WriteFloat(num + 0x138, Z);
- ps3.Extension.WriteFloat(num + 320, Yaw);
- ps3.Extension.WriteFloat(num + 0x144, Pitch);
- ps3.Extension.WriteFloat(num + 0x148, Roll);
- RPC.Call(Offsets.G_SetModel, new object[] { num, ModelName });
- RPC.Call(Offsets.SP_Script_Model, new object[] { num });
- Thread.Sleep(10);
- return num;
- }
- public static void SV_GameSendServerCommand(int Client, string Command)
- {
- RPC.Call(0x34a1dc, new object[] { Client, 0, Command });
- }
- private class FPS
- {
- public static void enable()
- {
- Form1.ps3.SetMemory(0x3979fc, new byte[] { 0x40 });
- Form1.ps3.SetMemory(0x397a22, new byte[] { 1, 8 });
- Form1.ps3.SetMemory(0x397a2a, new byte[2]);
- Form1.ps3.SetMemory(0x397400, new byte[] { 0x41, 0xb0, 0, 0, 0x43, 100, 0, 0, 0x42, 0x10 });
- }
- public static void enable2()
- {
- Form1.ps3.SetMemory(0x3979fc, new byte[] { 0x40 });
- }
- public static string GetDpad()
- {
- return Form1.PS3.ReadString(0x8f6e28);
- }
- public static string GetFPS()
- {
- return Form1.PS3.ReadStringB(0x941ca8, 8);
- }
- public static string GetTime()
- {
- return Form1.PS3.ReadStringB(0x9469fc, 9);
- }
- public static void WriteNewLine(string Oldline, string newLine)
- {
- int num = Oldline.Length + 1;
- Form1.PS3.WriteString((uint) (0x1080000 + num), newLine);
- }
- public static void WriteText(string txt)
- {
- Form1.PS3.WriteString(0x1080000, txt);
- }
- }
- private class Monitor
- {
- public static bool dectectDpadD()
- {
- return Convert.ToBoolean(ReadInt32(0xf0a91f));
- }
- public static bool dectectDpadL()
- {
- return Convert.ToBoolean(ReadInt32(0xf0a933));
- }
- public static bool dectectDpadR()
- {
- return Convert.ToBoolean(ReadInt32(0xf0a93f));
- }
- public static bool dectectDpadU()
- {
- return Convert.ToBoolean(ReadInt32(0xf0a90f));
- }
- public static bool dectectR3()
- {
- return Convert.ToBoolean(ReadInt32(0xf0a8df));
- }
- public static bool dectectSq()
- {
- return Convert.ToBoolean(ReadInt32(0xf0a803));
- }
- public static int ReadInt32(uint offset)
- {
- byte[] mem = Form1.PS3.GetMem(offset, 4);
- Array.Reverse(mem, 0, 4);
- return BitConverter.ToInt32(mem, 0);
- }
- }
- public class Offsets
- {
- public static uint ClientAngles = 0x56bc;
- public static uint ClientIsAlive = 0x55d0;
- public static uint ClientOrigin = 40;
- public static uint ClientStance = 0xfc;
- public static uint ClientTeam = 0x5504;
- public static uint FPS = 0x3979e0;
- public static uint G_Client = 0x1780f28;
- public static uint G_ClientSize = 0x5808;
- public static uint G_Entity = 0x16b9f20;
- public static uint G_EntitySize = 0x31c;
- public static uint G_GetPlayerViewOrigin = 0x1e60d0;
- public static uint G_HudElems = 0x15db500;
- public static uint G_LocalizedStringIndex = 0x275d24;
- public static uint G_LocationalTrace = 0x35c598;
- public static uint G_SetModel = 0x277644;
- public static uint G_Spawn = 0x278c60;
- public static uint HudelemSize = 0x88;
- public static uint SetClientViewAngles = 0x1e1d90;
- public static uint SP_Script_Model = 0x2670e8;
- public static uint Trace_GetEntityHitID = 0x306f30;
- }
- private class PS3
- {
- public static byte[] GetMem(uint Address, int length)
- {
- byte[] buffer = new byte[length];
- Form1.ps3.GetMemory(Address, buffer);
- return buffer;
- }
- public static string ReadString(uint Address)
- {
- uint num = 0;
- List<byte> list = new List<byte>();
- while (true)
- {
- byte[] mem = GetMem(Address + num, 1);
- if (mem[0] == 0)
- {
- return Encoding.UTF8.GetString(list.ToArray());
- }
- list.Add(mem[0]);
- num++;
- }
- }
- public static string ReadStringB(uint Address, int length)
- {
- byte[] mem = GetMem(Address, length);
- return Encoding.UTF8.GetString(mem);
- }
- public static void WriteString(uint offset, string input)
- {
- byte[] bytes = Encoding.UTF8.GetBytes(input);
- Array.Resize<byte>(ref bytes, bytes.Length + 1);
- Form1.ps3.SetMemory(offset, bytes);
- }
- public static void WriteStringB(uint offset, string input)
- {
- byte[] bytes = Encoding.UTF8.GetBytes(input);
- Form1.ps3.SetMemory(offset, bytes);
- }
- public class Extension
- {
- public static float ReadFloat(uint offset)
- {
- byte[] mem = Form1.PS3.GetMem(offset, 4);
- Array.Reverse(mem, 0, 4);
- return BitConverter.ToSingle(mem, 0);
- }
- public static int ReadInt32(uint offset)
- {
- byte[] mem = Form1.PS3.GetMem(offset, 4);
- Array.Reverse(mem, 0, 4);
- return BitConverter.ToInt32(mem, 0);
- }
- public static void WriteFloat(uint offset, float input)
- {
- byte[] array = new byte[4];
- BitConverter.GetBytes(input).CopyTo(array, 0);
- Array.Reverse(array, 0, 4);
- Form1.ps3.SetMemory(offset, array);
- }
- public static void WriteInt32(uint offset, int input)
- {
- byte[] array = new byte[4];
- BitConverter.GetBytes(input).CopyTo(array, 0);
- Array.Reverse(array, 0, 4);
- Form1.ps3.SetMemory(offset, array);
- }
- public static void WriteString(uint offset, string input)
- {
- byte[] bytes = Encoding.UTF8.GetBytes(input);
- Array.Resize<byte>(ref bytes, bytes.Length + 1);
- Form1.ps3.SetMemory(offset, bytes);
- }
- public static void WriteUInt32(uint offset, uint input)
- {
- byte[] array = new byte[4];
- BitConverter.GetBytes(input).CopyTo(array, 0);
- Array.Reverse(array, 0, 4);
- Form1.ps3.SetMemory(offset, array);
- }
- }
- }
- private class RPC
- {
- private static uint function_address;
- public static int Call(uint func_address, params object[] parameters)
- {
- int length = parameters.Length;
- int index = 0;
- uint num3 = 0;
- uint num4 = 0;
- uint num5 = 0;
- uint num6 = 0;
- while (index < length)
- {
- if (parameters[index] is int)
- {
- Form1.PS3.Extension.WriteInt32(0x10020000 + (num3 * 4), (int) parameters[index]);
- num3++;
- }
- else if (parameters[index] is uint)
- {
- Form1.PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), (uint) parameters[index]);
- num3++;
- }
- else
- {
- uint num7;
- if (parameters[index] is string)
- {
- num7 = 0x10022000 + (num4 * 0x400);
- Form1.PS3.Extension.WriteString(num7, Convert.ToString(parameters[index]));
- Form1.PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
- num3++;
- num4++;
- }
- else if (parameters[index] is float)
- {
- Form1.PS3.Extension.WriteFloat(0x10020024 + (num5 * 4), (float) parameters[index]);
- num5++;
- }
- else if (parameters[index] is float[])
- {
- float[] input = (float[]) parameters[index];
- num7 = 0x10021000 + (num6 * 4);
- WriteSingle(num7, input);
- Form1.PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
- num3++;
- num6 += (uint) input.Length;
- }
- }
- index++;
- }
- Form1.PS3.Extension.WriteUInt32(0x1002004c, func_address);
- Thread.Sleep(20);
- return Form1.PS3.Extension.ReadInt32(0x10020050);
- }
- public static uint Call1(uint func_address, params object[] parameters)
- {
- int length = parameters.Length;
- int index = 0;
- uint num3 = 0;
- uint num4 = 0;
- uint num5 = 0;
- uint num6 = 0;
- while (index < length)
- {
- if (parameters[index] is int)
- {
- Form1.PS3.Extension.WriteInt32(0x10020000 + (num3 * 4), (int) parameters[index]);
- num3++;
- }
- else if (parameters[index] is uint)
- {
- Form1.PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), (uint) parameters[index]);
- num3++;
- }
- else
- {
- uint num7;
- if (parameters[index] is string)
- {
- num7 = 0x10022000 + (num4 * 0x400);
- Form1.PS3.Extension.WriteString(num7, Convert.ToString(parameters[index]));
- Form1.PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
- num3++;
- num4++;
- }
- else if (parameters[index] is float)
- {
- Form1.PS3.Extension.WriteFloat(0x10020024 + (num5 * 4), (float) parameters[index]);
- num5++;
- }
- else if (parameters[index] is float[])
- {
- float[] input = (float[]) parameters[index];
- num7 = 0x10021000 + (num6 * 4);
- WriteSingle(num7, input);
- Form1.PS3.Extension.WriteUInt32(0x10020000 + (num3 * 4), num7);
- num3++;
- num6 += (uint) input.Length;
- }
- }
- index++;
- }
- Form1.PS3.Extension.WriteUInt32(0x1002004c, func_address);
- Thread.Sleep(20);
- return Form1.ps3.Extension.ReadUInt32(0x10020050);
- }
- public static void Enable()
- {
- Form1.ps3.SetMemory(function_address, new byte[] { 0x4e, 0x80, 0, 0x20 });
- Thread.Sleep(20);
- byte[] buffer = new byte[] {
- 0x7c, 8, 2, 0xa6, 0xf8, 1, 0, 0x80, 60, 0x60, 0x10, 2, 0x81, 0x83, 0, 0x4c,
- 0x2c, 12, 0, 0, 0x41, 130, 0, 100, 0x80, 0x83, 0, 4, 0x80, 0xa3, 0, 8,
- 0x80, 0xc3, 0, 12, 0x80, 0xe3, 0, 0x10, 0x81, 3, 0, 20, 0x81, 0x23, 0, 0x18,
- 0x81, 0x43, 0, 0x1c, 0x81, 0x63, 0, 0x20, 0xc0, 0x23, 0, 0x24, 0xc0, 0x43, 0, 40,
- 0xc0, 0x63, 0, 0x2c, 0xc0, 0x83, 0, 0x30, 0xc0, 0xa3, 0, 0x34, 0xc0, 0xc3, 0, 0x38,
- 0xc0, 0xe3, 0, 60, 0xc1, 3, 0, 0x40, 0xc1, 0x23, 0, 0x48, 0x80, 0x63, 0, 0,
- 0x7d, 0x89, 3, 0xa6, 0x4e, 0x80, 4, 0x21, 60, 0x80, 0x10, 2, 0x38, 160, 0, 0,
- 0x90, 0xa4, 0, 0x4c, 0x90, 100, 0, 80, 0xe8, 1, 0, 0x80, 0x7c, 8, 3, 0xa6,
- 0x38, 0x21, 0, 0x70, 0x4e, 0x80, 0, 0x20
- };
- Form1.ps3.SetMemory(function_address + 4, buffer);
- Form1.ps3.SetMemory(0x10020000, new byte[0x2854]);
- Form1.ps3.SetMemory(function_address, new byte[] { 0xf8, 0x21, 0xff, 0x91 });
- }
- public static int Init()
- {
- function_address = 0x7aa1e0;
- Enable();
- return 0;
- }
- public static float[] ReadSingle(uint address, int length)
- {
- byte[] toReverse = Form1.ps3.Extension.ReadBytes(address, length * 4);
- ReverseBytes(toReverse);
- float[] numArray = new float[length];
- for (int i = 0; i < length; i++)
- {
- numArray[i] = BitConverter.ToSingle(toReverse, ((length - 1) - i) * 4);
- }
- return numArray;
- }
- public static byte[] ReverseBytes(byte[] toReverse)
- {
- Array.Reverse(toReverse);
- return toReverse;
- }
- public static void WriteSingle(uint address, float[] input)
- {
- int length = input.Length;
- byte[] array = new byte[length * 4];
- for (int i = 0; i < length; i++)
- {
- ReverseBytes(BitConverter.GetBytes(input[i])).CopyTo(array, (int) (i * 4));
- }
- Form1.ps3.SetMemory(address, array);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment