Kenken_I

Untitled

Jul 15th, 2025
7
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.41 KB | None | 0 0
  1. local TweenService = game:GetService("TweenService")
  2. local Players = game:GetService("Players")
  3. local player = Players.LocalPlayer
  4. local playerGui = player:WaitForChild("PlayerGui")
  5.  
  6. -- Anti-hook protector snippet (place early to protect all loadstring calls)
  7. local orig_loadstring = loadstring
  8. local orig_load = load
  9. local orig_require = require
  10.  
  11. local dummy_code = "return function() end"
  12.  
  13. local function is_hooked(fn, original)
  14. return tostring(fn) ~= tostring(original)
  15. end
  16.  
  17. loadstring = function(code, ...)
  18. if is_hooked(loadstring, orig_loadstring) or is_hooked(load, orig_load) or is_hooked(require, orig_require) then
  19. -- Hook detected: silently return dummy function (no error, no notification)
  20. return orig_loadstring(dummy_code)
  21. end
  22. return orig_loadstring(code, ...)
  23. end
  24.  
  25. load = function(code, ...)
  26. if is_hooked(loadstring, orig_loadstring) or is_hooked(load, orig_load) or is_hooked(require, orig_require) then
  27. return orig_load(dummy_code)
  28. end
  29. return orig_load(code, ...)
  30. end
  31.  
  32. require = function(...)
  33. if is_hooked(loadstring, orig_loadstring) or is_hooked(load, orig_load) or is_hooked(require, orig_require) then
  34. error("require is hooked - aborted")
  35. end
  36. return orig_require(...)
  37. end
  38.  
  39. -- GUI setup
  40. local screenGui = Instance.new("ScreenGui")
  41. screenGui.Name = "MoveGui"
  42. screenGui.ResetOnSpawn = false
  43. screenGui.Parent = playerGui
  44.  
  45. local frame = Instance.new("Frame")
  46. frame.Size = UDim2.new(0, 180, 0, 140)
  47. frame.Position = UDim2.new(0.5, -90, 0.5, -70)
  48. frame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  49. frame.BorderSizePixel = 0
  50. frame.Active = true
  51. frame.Draggable = true
  52. frame.Parent = screenGui
  53.  
  54. local corner = Instance.new("UICorner")
  55. corner.CornerRadius = UDim.new(0, 10)
  56. corner.Parent = frame
  57.  
  58. local title = Instance.new("TextLabel")
  59. title.Size = UDim2.new(1, 0, 0, 30)
  60. title.BackgroundTransparency = 1
  61. title.Text = "ken_i v1"
  62. title.TextColor3 = Color3.new(1, 1, 1)
  63. title.Font = Enum.Font.SourceSansBold
  64. title.TextSize = 18
  65. title.Parent = frame
  66.  
  67. -- Button creator with round edges
  68. local function createButton(name, posY)
  69. local btn = Instance.new("TextButton")
  70. btn.Size = UDim2.new(0, 160, 0, 35)
  71. btn.Position = UDim2.new(0, 10, 0, posY)
  72. btn.BackgroundColor3 = Color3.fromRGB(70, 130, 180)
  73. btn.TextColor3 = Color3.new(1, 1, 1)
  74. btn.Text = name
  75. btn.Font = Enum.Font.SourceSansBold
  76. btn.TextSize = 16
  77. btn.Parent = frame
  78.  
  79. local btnCorner = Instance.new("UICorner")
  80. btnCorner.CornerRadius = UDim.new(0, 8)
  81. btnCorner.Parent = btn
  82.  
  83. return btn
  84. end
  85.  
  86. local saveZoneBtn = createButton("Save Collect Zone Position", 40)
  87. local activateBtn = createButton("Activate Forward + Up", 85)
  88. activateBtn.Visible = false
  89.  
  90. local savedCollectPosition = nil
  91. local speed = (19 / 0.65) * 1.06 -- +6% speed
  92.  
  93. local function moveForwardThenUp()
  94. local character = player.Character
  95. if not character then return end
  96. local root = character:FindFirstChild("HumanoidRootPart")
  97. if not root then return end
  98.  
  99. local distance = 48
  100. local forward = root.CFrame.LookVector
  101. local targetPos = root.Position + (forward * distance)
  102. local targetCFrame = CFrame.new(targetPos, targetPos + forward)
  103. local duration = distance / speed
  104.  
  105. local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
  106. local tween = TweenService:Create(root, tweenInfo, {CFrame = targetCFrame})
  107. tween:Play()
  108.  
  109. tween.Completed:Connect(function()
  110. local upPos = root.Position + Vector3.new(0, 300, 0)
  111. root.CFrame = CFrame.new(upPos, upPos + forward)
  112.  
  113. if savedCollectPosition then
  114. task.delay(0.1, function()
  115. local currentPos = root.Position
  116. local dist = (savedCollectPosition - currentPos).Magnitude
  117. local look = (savedCollectPosition - currentPos).Unit
  118. local savedCFrame = CFrame.new(savedCollectPosition, savedCollectPosition + look)
  119. local dur = dist / speed
  120.  
  121. local tween2 = TweenService:Create(root, TweenInfo.new(dur, Enum.EasingStyle.Sine), {CFrame = savedCFrame})
  122. tween2:Play()
  123. end)
  124. end
  125. end)
  126. end
  127.  
  128. saveZoneBtn.MouseButton1Click:Connect(function()
  129. local character = player.Character
  130. if character and character:FindFirstChild("HumanoidRootPart") then
  131. savedCollectPosition = character.HumanoidRootPart.Position
  132. warn("Player go by your base")
  133. saveZoneBtn.Visible = false
  134. activateBtn.Visible = true
  135. end
  136. end)
  137.  
  138. activateBtn.MouseButton1Click:Connect(moveForwardThenUp)
  139.  
Advertisement
Add Comment
Please, Sign In to add comment