getgenv().
jamkles = {
Macro = {
Enabled = true,
Speed = 0.01
}
}
if jamkles.Macro.Enabled then
if MacroAlreadLoaded then
return
end
MacroAlreadLoaded = true
local players = game:GetService("Players")
local runservice = game:GetService("RunService")
local player = players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local root = character:WaitForChild("HumanoidRootPart")
local humanoid = character:WaitForChild("Humanoid")
local camera = workspace.CurrentCamera
local MAX_LENGTH = 900000
local active = false
local ENABLED_OFFSET = CFrame.new(0, 0, 0)
local DISABLED_OFFSET = CFrame.new(0, 0, 0)
local rootPos = Vector3.new(0, 0, 0)
local ScreenGui = Instance.new("ScreenGui")
local Frame = Instance.new("Frame")
local TextButton = Instance.new("ImageLabel")
local TextLabel = Instance.new("TextButton")
local UITextSizeConstraint = Instance.new("UITextSizeConstraint")
ScreenGui.Parent = player:WaitForChild("PlayerGui")
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
Frame.Parent = ScreenGui
Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
Frame.BackgroundTransparency = 0
Frame.Position = UDim2.new(1, -128, 0, 0)
Frame.Size = UDim2.new(0, 90, 0, 32)
TextButton.Parent = Frame
TextButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
TextButton.BackgroundTransparency = 1
TextButton.Size = UDim2.new(0, 26, 0, 26)
TextButton.AnchorPoint = Vector2.new(0, 0.5)
TextButton.Position = UDim2.new(0.05, 0, 0.5, 0)
TextButton.Image = "rbxassetid://10734923214"
TextLabel.Parent = Frame
TextLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
TextLabel.BackgroundTransparency = 1
TextLabel.Size = UDim2.new(0, 52, 0, 26)
TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
TextLabel.Position = UDim2.new(0.65, 0, 0.5, 0)
TextLabel.Font = Enum.Font.Arimo
TextLabel.Text = "Macro"
TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
TextLabel.TextScaled = true
TextLabel.TextSize = 35
TextLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
TextLabel.TextStrokeTransparency = 1
local uiCorner = Instance.new("UICorner", Frame)
uiCorner.CornerRadius = UDim.new(0, 8)
local MCenabled = false
TextLabel.MouseButton1Down:Connect(function()
MCenabled = not MCenabled
if MCenabled then
TextButton.Image = "rbxassetid://10735024209"
else
TextButton.Image = "rbxassetid://10734923214"
ShiftLock()
end
end)
UITextSizeConstraint.Parent = TextLabel
UITextSizeConstraint.MaxTextSize = 30
player.CharacterAdded:Connect(function(character)
ScreenGui.Parent = player.PlayerGui
end)
player.CharacterRemoving:Connect(function()
ScreenGui.Parent = nil
end)
-- Utility Functions
local function UpdatePos()
if root then
rootPos = root.Position
end
end
local function UpdateAutoRotate(BOOL)
if humanoid then
humanoid.AutoRotate = BOOL
end
end
local function GetUpdatedCameraCFrame()
if camera then
return CFrame.new(
rootPos,
Vector3.new(
camera.CFrame.LookVector.X * MAX_LENGTH,
rootPos.Y,
camera.CFrame.LookVector.Z * MAX_LENGTH
)
)
end
end
local function EnableShiftlock()
if root and humanoid and camera then
UpdatePos()
UpdateAutoRotate(false)
root.CFrame = GetUpdatedCameraCFrame()
camera.CFrame = camera.CFrame * ENABLED_OFFSET
end
end
local function DisableShiftlock()
UpdatePos()
UpdateAutoRotate(true)
if camera then
camera.CFrame = camera.CFrame * DISABLED_OFFSET
end
if active then
active:Disconnect()
active = nil
end
end
local dragging = false
local dragInput
local dragStart
local startPos
local function update(input)
local delta = input.Position - dragStart
Frame.Position = UDim2.new(
startPos.X.Scale, startPos.X.Offset + delta.X,
startPos.Y.Scale, startPos.Y.Offset + delta.Y
)
end
Frame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = Frame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
Frame.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Touch then
dragInput = input
end
end)
game:GetService("UserInputService").InputChanged:Connect(function(input)
if dragging and input == dragInput then
update(input)
end
end)
function ShiftLock()
if MCenabled then
if not active then
active = runservice.RenderStepped:Connect(function()
EnableShiftlock()
end)
else
DisableShiftlock()
end
end
end
while task.wait(getgenv().jamkles.Macro.Speed) do
ShiftLock()
end
end