Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Gui to Lua
- -- Version: 3.1
- -- Instances:
- local ScreenGui = Instance.new("ScreenGui")
- local OpenFrame = Instance.new("Frame")
- local Open = Instance.new("TextButton")
- local Main = Instance.new("Frame")
- local TopBar = Instance.new("Frame")
- local Credits = Instance.new("TextLabel")
- local Side2 = Instance.new("Frame")
- local Side1 = Instance.new("Frame")
- local Bottom = Instance.new("Frame")
- local Close = Instance.new("TextButton")
- local RandomGUI = Instance.new("TextLabel")
- local CHEAT1 = Instance.new("TextButton")
- local CHEAT2 = Instance.new("TextButton")
- local CHEAT1_2 = Instance.new("TextButton")
- --Properties:
- ScreenGui.Parent = game.CoreGui
- OpenFrame.Name = "OpenFrame"
- OpenFrame.Parent = ScreenGui
- OpenFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- OpenFrame.BorderSizePixel = 0
- OpenFrame.Position = UDim2.new(0.0194300562, 0, 0.229645088, 0)
- OpenFrame.Size = UDim2.new(0, 60, 0, 60)
- Open.Name = "Open"
- Open.Parent = OpenFrame
- Open.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Open.BorderSizePixel = 0
- Open.Position = UDim2.new(0.0833331719, 0, 0.183333337, 0)
- Open.Size = UDim2.new(0, 50, 0, 38)
- Open.Font = Enum.Font.Cartoon
- Open.TextColor3 = Color3.fromRGB(255, 255, 255)
- Open.TextScaled = true
- Open.TextSize = 14.000
- Open.TextWrapped = true
- Open.MouseButton1Down:connect(function()
- Main.Visible = true
- OpenFrame.Visible = false
- end)
- Main.Name = "Main"
- Main.Parent = ScreenGui
- Main.BackgroundColor3 = Color3.fromRGB(170, 170, 170)
- Main.BackgroundTransparency = 0.500
- Main.BorderSizePixel = 0
- Main.Position = UDim2.new(0.37176165, 0, 0.202505216, 0)
- Main.Size = UDim2.new(0, 283, 0, 269)
- Main.Visible = false
- Main.Draggable = true
- TopBar.Name = "TopBar"
- TopBar.Parent = Main
- TopBar.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- TopBar.BorderSizePixel = 0
- TopBar.Size = UDim2.new(0, 283, 0, 27)
- Credits.Name = "Credits"
- Credits.Parent = Main
- Credits.BackgroundColor3 = Color3.fromRGB(85, 85, 127)
- Credits.BorderSizePixel = 0
- Credits.Position = UDim2.new(0, 0, 1, 0)
- Credits.Size = UDim2.new(0, 283, 0, 37)
- Credits.Font = Enum.Font.Cartoon
- Credits.Text = "Discord- ToX1K_Spicy#7634"
- Credits.TextColor3 = Color3.fromRGB(255, 255, 255)
- Credits.TextScaled = true
- Credits.TextSize = 14.000
- Credits.TextWrapped = true
- Side2.Name = "Side2"
- Side2.Parent = Main
- Side2.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Side2.BorderSizePixel = 0
- Side2.Position = UDim2.new(-0.0459363945, 0, 0, 0)
- Side2.Size = UDim2.new(0, 13, 0, 306)
- Side1.Name = "Side1"
- Side1.Parent = Main
- Side1.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Side1.BorderSizePixel = 0
- Side1.Position = UDim2.new(0.99999994, 0, 0, 0)
- Side1.Size = UDim2.new(0, 13, 0, 306)
- Bottom.Name = "Bottom"
- Bottom.Parent = Main
- Bottom.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Bottom.BorderSizePixel = 0
- Bottom.Position = UDim2.new(-0.0459363945, 0, 1.13754642, 0)
- Bottom.Size = UDim2.new(0, 309, 0, 13)
- Close.Name = "Close"
- Close.Parent = Main
- Close.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Close.BackgroundTransparency = 1.000
- Close.Position = UDim2.new(0.904593706, 0, -5.96046448e-08, 0)
- Close.Size = UDim2.new(0, 27, 0, 27)
- Close.Font = Enum.Font.Cartoon
- Close.Text = "X"
- Close.TextColor3 = Color3.fromRGB(170, 0, 0)
- Close.TextScaled = true
- Close.TextSize = 14.000
- Close.TextWrapped = true
- Close.MouseButton1Down:connect(function()
- OpenFrame.Visible = true
- Main.Visible = false
- end)
- RandomGUI.Name = "RandomGUI"
- RandomGUI.Parent = Main
- RandomGUI.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- RandomGUI.BackgroundTransparency = 1.000
- RandomGUI.BorderSizePixel = 0
- RandomGUI.Position = UDim2.new(0.289752662, 0, 0.00743496418, 0)
- RandomGUI.Size = UDim2.new(0, 134, 0, 22)
- RandomGUI.Font = Enum.Font.Code
- RandomGUI.Text = "Arsenal Gui"
- RandomGUI.TextColor3 = Color3.fromRGB(255, 255, 255)
- RandomGUI.TextScaled = true
- RandomGUI.TextSize = 14.000
- RandomGUI.TextWrapped = true
- ESP.Name = "ESP"
- ESP.Parent = Main
- ESP.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- ESP.BorderSizePixel = 0
- ESP.Position = UDim2.new(0.0424028262, 0, 0.230483279, 0)
- ESP.Size = UDim2.new(0, 103, 0, 40)
- ESP.Font = Enum.Font.Cartoon
- ESP.Text = "ESP"
- ESP.TextColor3 = Color3.fromRGB(255, 255, 255)
- ESP.TextScaled = true
- ESP.TextSize = 14.000
- ESP.TextWrapped = true
- ESP.MouseButton1Down:connect(function()
- local Holder = Instance.new("Folder", game.CoreGui)
- Holder.Name = "ESP"
- local Box = Instance.new("BoxHandleAdornment")
- Box.Name = "nilBox"
- Box.Size = Vector3.new(4, 7, 4)
- Box.Color3 = Color3.new(100 / 255, 100 / 255, 100 / 255)
- Box.Transparency = 0.7
- Box.ZIndex = 0
- Box.AlwaysOnTop = true
- Box.Visible = true
- local NameTag = Instance.new("BillboardGui")
- NameTag.Name = "nilNameTag"
- NameTag.Enabled = false
- NameTag.Size = UDim2.new(0, 200, 0, 50)
- NameTag.AlwaysOnTop = true
- NameTag.StudsOffset = Vector3.new(0, 1.8, 0)
- local Tag = Instance.new("TextLabel", NameTag)
- Tag.Name = "Tag"
- Tag.BackgroundTransparency = 1
- Tag.Position = UDim2.new(0, -50, 0, 0)
- Tag.Size = UDim2.new(0, 300, 0, 20)
- Tag.TextSize = 20
- Tag.TextColor3 = Color3.new(100 / 255, 100 / 255, 100 / 255)
- Tag.TextStrokeColor3 = Color3.new(0 / 255, 0 / 255, 0 / 255)
- Tag.TextStrokeTransparency = 0.4
- Tag.Text = "nil"
- Tag.Font = Enum.Font.SourceSansBold
- Tag.TextScaled = false
- local LoadCharacter = function(v)
- repeat wait() until v.Character ~= nil
- v.Character:WaitForChild("Humanoid")
- local vHolder = Holder:FindFirstChild(v.Name)
- vHolder:ClearAllChildren()
- local b = Box:Clone()
- b.Name = v.Name .. "Box"
- b.Adornee = v.Character
- b.Parent = vHolder
- local t = NameTag:Clone()
- t.Name = v.Name .. "NameTag"
- t.Enabled = true
- t.Parent = vHolder
- t.Adornee = v.Character:WaitForChild("Head", 5)
- if not t.Adornee then
- return UnloadCharacter(v)
- end
- t.Tag.Text = v.Name
- b.Color3 = Color3.new(v.TeamColor.r, v.TeamColor.g, v.TeamColor.b)
- t.Tag.TextColor3 = Color3.new(v.TeamColor.r, v.TeamColor.g, v.TeamColor.b)
- local Update
- local UpdateNameTag = function()
- if not pcall(function()
- v.Character.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
- local maxh = math.floor(v.Character.Humanoid.MaxHealth)
- local h = math.floor(v.Character.Humanoid.Health)
- t.Tag.Text = v.Name .. "\n" .. ((maxh ~= 0 and tostring(math.floor((h / maxh) * 100))) or "0") .. "% " .. tostring(h) .. "/" .. tostring(maxh)
- end) then
- Update:Disconnect()
- end
- end
- UpdateNameTag()
- Update = v.Character.Humanoid.Changed:Connect(UpdateNameTag)
- end
- local UnloadCharacter = function(v)
- local vHolder = Holder:FindFirstChild(v.Name)
- if vHolder and (vHolder:FindFirstChild(v.Name .. "Box") ~= nil or vHolder:FindFirstChild(v.Name .. "NameTag") ~= nil) then
- vHolder:ClearAllChildren()
- end
- end
- local LoadPlayer = function(v)
- local vHolder = Instance.new("Folder", Holder)
- vHolder.Name = v.Name
- v.CharacterAdded:Connect(function()
- pcall(LoadCharacter, v)
- end)
- v.CharacterRemoving:Connect(function()
- pcall(UnloadCharacter, v)
- end)
- v.Changed:Connect(function(prop)
- if prop == "TeamColor" then
- UnloadCharacter(v)
- wait()
- LoadCharacter(v)
- end
- end)
- LoadCharacter(v)
- end
- local UnloadPlayer = function(v)
- UnloadCharacter(v)
- local vHolder = Holder:FindFirstChild(v.Name)
- if vHolder then
- vHolder:Destroy()
- end
- end
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- spawn(function() pcall(LoadPlayer, v) end)
- end
- game:GetService("Players").PlayerAdded:Connect(function(v)
- pcall(LoadPlayer, v)
- end)
- game:GetService("Players").PlayerRemoving:Connect(function(v)
- pcall(UnloadPlayer, v)
- end)
- game:GetService("Players").LocalPlayer.NameDisplayDistance = 0
- end)
- Aim.Name = "Aim"
- Aim.Parent = Main
- Aim.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Aim.BorderSizePixel = 0
- Aim.Position = UDim2.new(0.540636063, 0, 0.230483279, 0)
- Aim.Size = UDim2.new(0, 103, 0, 40)
- Aim.Font = Enum.Font.Cartoon
- Aim.Text = "AIMBOT (Hold \"E\")"
- Aim.TextColor3 = Color3.fromRGB(255, 255, 255)
- Aim.TextScaled = true
- Aim.TextSize = 14.000
- Aim.TextWrapped = true
- Aim.MouseButton1Down:connect(function()
- local plrs = game:GetService("Players")
- local TeamBased = true ; local teambasedswitch = "o"
- local presskeytoaim = true; local aimkey = "e"
- local raycast = false
- local espupdatetime = 5; autoesp = false
- local lockaim = true; local lockangle = 5
- --function findwat(folder, what)
- -- for i, smth in pairs(folder:GetChildren()) do
- -- if string.find(string.lower(tostring(smth)), string.lower(what)) then
- -- return smth
- -- end
- -- end
- --end
- --
- --local plrs = findwat(game, "Players")
- local Gui = Instance.new("ScreenGui")
- local Move = Instance.new("Frame")
- local Main = Instance.new("Frame")
- local EspStatus = Instance.new("TextLabel")
- local st1 = Instance.new("TextLabel")
- local st1_2 = Instance.new("TextLabel")
- local st1_3 = Instance.new("TextLabel")
- local Name = Instance.new("TextLabel")
- --Properties:
- Gui.Name = "Gui"
- Gui.Parent = plrs.LocalPlayer:WaitForChild("PlayerGui")
- Move.Name = "Move"
- Move.Parent = Gui
- Move.BackgroundColor3 = Color3.new(0.545098, 0, 0)
- Move.BackgroundTransparency = 1
- Move.BorderSizePixel = 0
- Move.Draggable = true
- Move.Position = UDim2.new(0.005, 0, -0.15, 0)
- Move.Size = UDim2.new(0.28141585, 0, 0.0320388414, 0)
- Main.Name = "Main"
- Main.Parent = Move
- Main.BackgroundColor3 = Color3.new(1, 1, 1)
- Main.Position = UDim2.new(0, 0, 0, 0)
- Main.Size = UDim2.new(0, 0, 0, 0)
- Main.Style = Enum.FrameStyle.RobloxSquare
- EspStatus.Name = "EspStatus"
- EspStatus.Parent = Main
- EspStatus.BackgroundColor3 = Color3.new(1, 1, 1)
- EspStatus.BackgroundTransparency = 1
- EspStatus.Position = UDim2.new(0, 0, 0.300000012, 0)
- EspStatus.Size = UDim2.new(1, 0, 0.162, 0)
- EspStatus.Font = Enum.Font.ArialBold
- EspStatus.Text = "Press O to change team based mode"
- EspStatus.TextColor3 = Color3.new(0.6, 0.196078, 0.8)
- EspStatus.TextScaled = true
- EspStatus.TextWrapped = true
- st1.Name = "st1"
- st1.Parent = Main
- st1.BackgroundColor3 = Color3.new(1, 1, 1)
- st1.BackgroundTransparency = 1
- st1.Position = UDim2.new(0.271787882, 0, 0, 0)
- st1.Size = UDim2.new(0.728211343, 0, 0.161862016, 0)
- st1.Font = Enum.Font.ArialBold
- st1.Text = ""
- st1.TextColor3 = Color3.new(0.0784314, 0.541176, 0)
- st1.TextScaled = true
- st1.TextSize = 14
- st1.TextWrapped = true
- -- Scripts:
- local plrsforaim = {}
- local lplr = game:GetService("Players").LocalPlayer
- Move.Draggable = true
- Gui.ResetOnSpawn = false
- Gui.Name = "Chat"
- Gui.DisplayOrder = 999
- Gui.Parent = plrs.LocalPlayer.PlayerGui
- f = {}
- local espforlder
- f.addesp = function()
- --print("ESP ran")
- if espforlder then
- else
- espforlder = Instance.new("Folder")
- espforlder.Parent = game.Workspace.CurrentCamera
- end
- for i, v in pairs(espforlder:GetChildren()) do
- v:Destroy()
- end
- for _, plr in pairs(plrs:GetChildren()) do
- if plr.Character and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name then
- if TeamBased == true then
- if plr.Team.Name ~= plrs.LocalPlayer.Team.Name then
- local e = espforlder:FindFirstChild(plr.Name)
- if not e then
- --print("Added esp for team based")
- local bill = Instance.new("BillboardGui", espforlder)
- bill.Name = plr.Name
- bill.AlwaysOnTop = true
- bill.Size = UDim2.new(1,0,1,0)
- bill.Adornee = plr.Character.Head
- local Frame = Instance.new('Frame',bill)
- Frame.Active = true
- Frame.BackgroundColor3 = Color3.new(0.541176, 0.168627, 0.886275)
- Frame.BackgroundTransparency = 0
- Frame.BorderSizePixel = 0
- Frame.AnchorPoint = Vector2.new(.5, .5)
- Frame.Position = UDim2.new (0.5,0,0.5,0)
- Frame.Size = UDim2.new (1,0,1,0)
- Frame.Rotation = 0
- plr.Character.Humanoid.Died:Connect(function()
- bill:Destroy()
- end)
- end
- end
- else
- local e = espforlder:FindFirstChild(plr.Name)
- if not e then
- --print("Added esp")
- local bill = Instance.new("BillboardGui", espforlder)
- bill.Name = plr.Name
- bill.AlwaysOnTop = true
- bill.Size = UDim2.new(1,0,1,0)
- bill.Adornee = plr.Character.Head
- local Frame = Instance.new('Frame',bill)
- Frame.Active = true
- Frame.BackgroundColor3 = Color3.new(0.541176, 0.168627, 0.886275)
- Frame.BackgroundTransparency = 0
- Frame.BorderSizePixel = 0
- Frame.AnchorPoint = Vector2.new(.5, .5)
- Frame.Position = UDim2.new (0.5,0,0.5,0)
- Frame.Size = UDim2.new (1,0,1,0)
- Frame.Rotation = 0
- plr.Character.Humanoid.Died:Connect(function()
- bill:Destroy()
- end)
- end
- end
- end
- end
- end
- local cam = game.Workspace.CurrentCamera
- local mouse = lplr:GetMouse()
- local switch = false
- local key = "k"
- local aimatpart = nil
- mouse.KeyDown:Connect(function(a)
- if a == "t" then
- print("worked1")
- f.addesp()
- elseif a == "u" then
- if raycast == true then
- raycast = false
- else
- raycast = true
- end
- elseif a == "l" then
- if autoesp == false then
- autoesp = true
- else
- autoesp = false
- end
- end
- if a == "j" then
- if mouse.Target then
- mouse.Target:Destroy()
- end
- end
- if a == key then
- if switch == false then
- switch = true
- else
- switch = false
- if aimatpart ~= nil then
- aimatpart = nil
- end
- end
- elseif a == teambasedswitch then
- if TeamBased == true then
- TeamBased = false
- teambasedstatus.Text = tostring(TeamBased)
- else
- TeamBased = true
- teambasedstatus.Text = tostring(TeamBased)
- end
- elseif a == aimkey then
- if not aimatpart then
- local maxangle = math.rad(20)
- for i, plr in pairs(plrs:GetChildren()) do
- if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
- if TeamBased == true then
- if plr.Team.Name ~= lplr.Team.Name then
- local an = checkfov(plr.Character.Head)
- if an < maxangle then
- maxangle = an
- aimatpart = plr.Character.Head
- end
- end
- else
- local an = checkfov(plr.Character.Head)
- if an < maxangle then
- maxangle = an
- aimatpart = plr.Character.Head
- end
- print(plr)
- end
- plr.Character.Humanoid.Died:Connect(function()
- if aimatpart.Parent == plr.Character or aimatpart == nil then
- aimatpart = nil
- end
- end)
- end
- end
- else
- aimatpart = nil
- end
- end
- end)
- function getfovxyz (p0, p1, deg)
- local x1, y1, z1 = p0:ToOrientation()
- local cf = CFrame.new(p0.p, p1.p)
- local x2, y2, z2 = cf:ToOrientation()
- --local d = math.deg
- if deg then
- --return Vector3.new(d(x1-x2), d(y1-y2), d(z1-z2))
- else
- return Vector3.new((x1-x2), (y1-y2), (z1-z2))
- end
- end
- function getaimbotplrs()
- plrsforaim = {}
- for i, plr in pairs(plrs:GetChildren()) do
- if plr.Character and plr.Character.Humanoid and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name and plr.Character.Head then
- if TeamBased == true then
- if plr.Team.Name ~= lplr.Team.Name then
- local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
- local r = Ray.new(cf, cf.LookVector * 10000)
- local ign = {}
- for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
- if v:IsA("BasePart") then
- table.insert(ign , v)
- end
- end
- local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
- if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
- table.insert(plrsforaim, obj)
- end
- end
- else
- local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p)
- local r = Ray.new(cf, cf.LookVector * 10000)
- local ign = {}
- for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do
- if v:IsA("BasePart") then
- table.insert(ign , v)
- end
- end
- local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign)
- if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then
- table.insert(plrsforaim, obj)
- end
- end
- end
- end
- end
- function aimat(part)
- cam.CFrame = CFrame.new(cam.CFrame.p, part.CFrame.p)
- end
- function checkfov (part)
- local fov = getfovxyz(game.Workspace.CurrentCamera.CFrame, part.CFrame)
- local angle = math.abs(fov.X) + math.abs(fov.Y)
- return angle
- end
- game:GetService("RunService").RenderStepped:Connect(function()
- if aimatpart then
- aimat(aimatpart)
- if aimatpart.Parent == plrs.LocalPlayer.Character then
- aimatpart = nil
- end
- end
- -- if switch == true then
- -- local maxangle = 99999
- --
- -- --print("Loop")
- -- if true and raycast == false then
- -- for i, plr in pairs(plrs:GetChildren()) do
- -- if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then
- -- if TeamBased then
- -- if plr.Team.Name ~= lplr.Team.Name or plr.Team.TeamColor ~= lplr.Team.TeamColor then
- -- local an = checkfov(plr.Character.Head)
- -- if an < maxangle then
- -- maxangle = an
- -- aimatpart = plr.Character.Head
- -- if an < lockangle then
- -- break
- -- end
- -- end
- -- end
- -- else
- -- local an = checkfov(plr.Character.Head)
- -- if an < maxangle then
- -- maxangle = an
- -- aimatpart = plr.Character.Head
- -- if an < lockangle then
- -- break
- -- end
- -- end
- -- end
- --
- --
- --
- --
- -- end
- -- end
- -- elseif raycast == true then
- --
- -- end
- if raycast == true and switch == false and not aimatpart then
- getaimbotplrs()
- aimatpart = nil
- local maxangle = 999
- for i, v in ipairs(plrsforaim) do
- if v.Parent ~= lplr.Character then
- local an = checkfov(v)
- if an < maxangle and v ~= lplr.Character.Head then
- maxangle = an
- aimatpart = v
- print(v:GetFullName())
- v.Parent.Humanoid.Died:connect(function()
- aimatpart = nil
- end)
- end
- end
- end
- end
- end)
- delay(0, function()
- while wait(espupdatetime) do
- if autoesp == true then
- pcall(function()
- f.addesp()
- end)
- end
- end
- end)
- warn("loaded")
- end)
- Fly.Name = "Fly"
- Fly.Parent = Main
- Fly.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Fly.BorderSizePixel = 0
- Fly.Position = UDim2.new(0.166077733, 0, 0.509293675, 0)
- Fly.Size = UDim2.new(0, 175, 0, 69)
- Fly.Font = Enum.Font.Cartoon
- Fly.Text = "Fly"
- Fly.TextColor3 = Color3.fromRGB(255, 255, 255)
- Fly.TextScaled = true
- Fly.TextSize = 14.000
- Fly.TextWrapped = true
- Fly.MouseButton1Down:connect(function()
- function cbFindIntegrityCheckChange(sender)
- --gui stuff - FLY HACK
- control_setEnabled(frmSESettings_cbRewatch, checkbox_getState(frmSESettings_cbFindIntegrityCheck)==cbChecked)
- control_setEnabled(frmSESettings_edtTime, checkbox_getState(frmSESettings_cbFindIntegrityCheck)==cbChecked)
- control_setEnabled(frmSESettings_lblMilliseconds, checkbox_getState(frmSESettings_cbFindIntegrityCheck)==cbChecked)
- end
- function btnApplyClick(sender)
- stealthedit_FindIntegrity=checkbox_getState(frmSESettings_cbFindIntegrityCheck)==cbChecked
- stealthedit_Rewatch=checkbox_getState(frmSESettings_cbRewatch)==cbChecked
- stealthedit_RewatchTimer=tonumber(control_getCaption(frmSESettings_edtTime))
- end
- createFormFromFile(stealtheditpath..'sesettings.FRM')
- createFormFromFile(stealtheditpath..'results.FRM')
- function ShowSEWindow()
- if stealthedit_FindIntegrity==true then
- form_show(frmResults)
- end
- end
- stealthedit_FindIntegrity=false --this variablename is queried by the stealthedit plugin to determine if the memory should be guarded on stealthedit (don't change it)
- --set to true if you wish it on by default. Also add this then:
- --checkbox_setState(frmSESettings_cbFindIntegrityCheck, cbChecked)
- stealthedit_Rewatch=false
- stealthedit_RewatchTimer=100
- function onreguard(sender)
- timer_setEnabled(sender, false)
- reguard()
- end
- se_events={}
- function IntegrityUpdate(rax, rbx, rcx, rdx, rsi, rdi, rbp, rsp, rip, r8, r9, r10, r11, r12, r13, r14, r15, stackcopy, stacksize)
- --A page that was guarded has been accessed (and made unguarded)
- if (control_getVisible(frmResults)==false) then
- ShowSEWindow()
- end
- --check if this rip address is already in the list, and if not, add it
- if (se_events[rip]==nil) then
- --new, add it (don't add/update any other ones with this rip, those don't come with a stackcopy/stacksize)
- se_events[rip]={rax=rax, rbx=rbx, rcx=rcx, rdx=rdx, rsi=rsi, rdi=rdi, rbp=rbp, rsp=rsp, rip=rip, r8=r8, r9=r9, r10=r10, r11=r11, r12=r12, r13=r13, r14=r14, r15=r15, stackcopy=stackcopy, stacksize=stacksize}
- local items=listbox_getItems(frmResults_lbAddresses)
- strings_add(items, string.format('%08X', rip))
- if listbox_getItemIndex(frmResults_lbAddresses)==-1 then
- listbox_setItemIndex(frmResults_lbAddresses,0)
- end
- end
- if (stealthedit_Rewatch) then
- if (reguardtimer==nil) then
- reguardtimer=createTimer(nil, false)
- timer_onTimer(reguardtimer, onreguard)
- end
- timer_setInterval(reguardtimer, stealthedit_RewatchTimer)
- timer_setEnabled(reguardtimer, true)
- end
- end
- function lbAddressesSelectionChange(sender, user)
- -- showMessage('selection changed')
- -- frmResults_lbAddresses
- -- frmResults_mData
- local is64bit=targetIs64Bit()
- local items=listbox_getItems(frmResults_lbAddresses)
- local itemindex=listbox_getItemIndex(frmResults_lbAddresses)
- local event=se_events[tonumber('0x'..strings_getString(items, itemindex))]
- edit_clear(frmResults_mData)
- if is64bit then
- prefix='R'
- else
- prefix='E'
- end
- memo_append(frmResults_mData,prefix..'AX = '..string.format('%08X',event.rax))
- memo_append(frmResults_mData,prefix..'BX = '..string.format('%08X',event.rbx))
- memo_append(frmResults_mData,prefix..'CX = '..string.format('%08X',event.rcx))
- memo_append(frmResults_mData,prefix..'DX = '..string.format('%08X',event.rdx))
- memo_append(frmResults_mData,prefix..'SI = '..string.format('%08X',event.rsi))
- memo_append(frmResults_mData,prefix..'DI = '..string.format('%08X',event.rdi))
- memo_append(frmResults_mData,prefix..'BP = '..string.format('%08X',event.rbp))
- memo_append(frmResults_mData,prefix..'SP = '..string.format('%08X',event.rsp))
- memo_append(frmResults_mData,prefix..'IP = '..string.format('%08X',event.rip))
- if is64bit then
- memo_append(frmResults_mData,' R8 = '..string.format('%08X',event.r8))
- memo_append(frmResults_mData,' R9 = '..string.format('%08X',event.r9))
- memo_append(frmResults_mData,'R10 = '..string.format('%08X',event.r10))
- memo_append(frmResults_mData,'R11 = '..string.format('%08X',event.r11))
- memo_append(frmResults_mData,'R12 = '..string.format('%08X',event.r12))
- memo_append(frmResults_mData,'R13 = '..string.format('%08X',event.r13))
- memo_append(frmResults_mData,'R14 = '..string.format('%08X',event.r14))
- memo_append(frmResults_mData,'R15 = '..string.format('%08X',event.r15))
- end
- memo_append(frmResults_mData,'')
- memo_append(frmResults_mData,'Stack copy = '..string.format('%08X',event.stackcopy))
- memo_append(frmResults_mData,'Stack size = '..string.format('%08X',event.stacksize))
- end
- function lbAddressesDblClick(sender)
- local items=listbox_getItems(frmResults_lbAddresses)
- local itemindex=listbox_getItemIndex(frmResults_lbAddresses)
- local address=tonumber('0x'..strings_getString(items, itemindex))
- local mb=getMemoryViewForm()
- local dv=memoryview_getDisassemblerView(mb)
- disassemblerview_setSelectedAddress(dv, address)
- form_show(mb)
- end
- end)
Advertisement
Advertisement