75% found this document useful (4 votes)
772 views2 pages

Script Hack Gramfree

This document defines a mouseEvent function that simulates mouse events like mousemove, mousedown, and mouseup. It takes in parameters for the event type and screen/client coordinates and returns a simulated mouse event object. It also includes code to call this function to programmatically move the mouse position over an element on the page at set intervals, simulating a dragging motion. This automated dragging can be started and stopped via separate functions.

Uploaded by

khalid better
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
75% found this document useful (4 votes)
772 views2 pages

Script Hack Gramfree

This document defines a mouseEvent function that simulates mouse events like mousemove, mousedown, and mouseup. It takes in parameters for the event type and screen/client coordinates and returns a simulated mouse event object. It also includes code to call this function to programmatically move the mouse position over an element on the page at set intervals, simulating a dragging motion. This automated dragging can be started and stopped via separate functions.

Uploaded by

khalid better
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Function

mouseEvent(type, sx, sy, cx, cy)


{

var evt;
var e={
bubbles:true,
cancelable:(type!="mouemove"),
view:window,
detail: 0
screenX: sx,
screenY: sy,
clientX: cx,
clientY: cy,
ctrlkey: false,
ctrlkey: false,
altkey: false,
shiftkey: false,
metakey: false,
button: 0,
relatedtarget: undefined,
};

if(typeof( document.createEvent ) == "function" {


evt = document.createEvent("MouseEvents")
evt = intmouseEvent(type,
e. bubbles, e.cancelable, e.view, e.detail,
e.screenX, e.screenY, e.clientX, e.clientY,
e. ctrlkey, e.ctrlkey, e. altkey, e.shiftkey,
e. metakey, e. button, document.body.parentNode);
}else if (document.createEvent button) {
evt = document.createEvent button ();
for (prop in e ){
evt[prop] = e[prop] ;
}
evt.button = {0:1, 1:4, 2:2 } [evt.button] || evt.button;
}
return evt;
}
var a = document.getElementsByClassName("spin") [0]
b = document.getElementsByClassName("lucky Number");
a.addEventlistener("mousemove", function (e) {console.log("clientX:" + e.clientX
+", "clientY:" + e.clientY +", "screenX:" + e.screenX +", "screenY:" + e.screenY
+", mouvementX:"+ e.mouvementX);}

function botRot(X,y){
a.dispatchEvent(mouseEvent("mousemove",X, Y, X, Y)) ;
}
function botstart(){
if ((b.innerHTML.!= "Dragging") && parseInt (b.innerHTML) <2000){
var xIncial = 0, yIncial =0,

for (var ofParent = a; ofParent; ofparnet = ofparent.offsetparent){


}
a.dispatchEvent(mouseEvent("mousedown", Xs[0], Ys[0], Xs[0], Xs[0] ));
botRot( Xs[0], Ys[0]);

setTimeout(function (){
botRot( Xs[1], Ys[1]);
setTimeout(function (){
botRot( Xs[2], Ys[2]);
setTimeout(function (){
botRot( Xs[3], Ys[3]);

a.dispatchEvent(mouseEvent("mouseup", Xs[3], Ys[3], Xs[3], Xs[3] ));


},(count++)* speedBoot);
}
}
var Intervalid = setInterval(bootstart,2000);
function bootstop(){ // bootstop():command stop the execution of the script.
clear Interval(bootIntervalid);
}

You might also like