forked from zzerexx/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKrnl_mousemoverel_fix.lua
More file actions
63 lines (57 loc) · 1.54 KB
/
Krnl_mousemoverel_fix.lua
File metadata and controls
63 lines (57 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
function getwindowinset()
if UserSettings():GetService("UserGameSettings").Fullscreen then
return 0
end
repeat task.wait() until isrbxactive()
local viewport = workspace.CurrentCamera.ViewportSize
local text = Drawing.new("Text")
text.Visible = true
text.Color = Color3.fromRGB(255,0,0)
text.Text = "Getting your window inset in 5s...\nPlease do not move your mouse."
text.Size = 64
text.Center = true
text.Outline = true
text.OutlineColor = Color3.fromRGB(0,0,0)
text.Position = Vector2.new(viewport.X / 2, viewport.Y / 5)
text.Font = Drawing.Fonts.UI
task.wait(5)
local pos, clicked = 0, false
local gui = Instance.new("ScreenGui")
gui.IgnoreGuiInset = true
gui.Parent = gethui()
local button = Instance.new("TextButton")
button.BackgroundTransparency = 1
button.Size = UDim2.new(1,0,1,0)
button.Text = ""
button.Parent = gui
local conn;conn = button.MouseButton2Click:Connect(function()
task.spawn(function()
clicked = true
text.Color = Color3.fromRGB(0,255,0)
text.Text = "Successfully retrieved your window inset. ("..pos..")"
task.wait(3)
text:Remove()
gui:Destroy()
conn:Disconnect()
end)
end)
local function move()
mousemoveabs(0, pos)
mouse2click()
mousemoverel(200,0)
mouse2click()
pos += 1
end
repeat
move()
task.wait()
until clicked
return pos
end
local uis = game:GetService("UserInputService")
local mouse = uis:GetMouseLocation()
local inset = getwindowinset()
hookfunction(mousemoverel, function(x,y)
mouse = uis:GetMouseLocation()
mousemoveabs(mouse.X + x, inset + mouse.Y + y)
end)