Advertisement
ICreateScriptsHere

Blox Fruits Keyless Fruit Sniper Script V2

May 19th, 2024 (edited)
516
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.17 KB | Source Code | 0 0
  1. -- Made by test_acont01roblox dc and on roblox test_acont01
  2.  
  3. local TweenService = game:GetService("TweenService")
  4. local RunService = game:GetService("RunService")
  5. local Players = game:GetService("Players")
  6.  
  7. local scriptEnabled = true
  8. local searchInterval = 0.25 -- Search interval in seconds (4 times per second)
  9. local lastSearchTime = 0
  10. local teleporting = false -- Flag to indicate if teleportation is in progress
  11.  
  12. local BLOX_FRUITS_PLACE_ID = 2753915549
  13.  
  14. local function toggleScript(enabled)
  15.     scriptEnabled = enabled
  16.     print("Script " .. (enabled and "enabled!" or "disabled!"))
  17. end
  18.  
  19. local function createBillboardGui(fruitModel)
  20.     -- Create BillboardGui
  21.     local billboardGui = Instance.new("BillboardGui")
  22.     billboardGui.Adornee = fruitModel
  23.     billboardGui.Size = UDim2.new(0, 100, 0, 50)
  24.     billboardGui.StudsOffset = Vector3.new(0, 3, 0) -- Offsets the label above the fruit model
  25.     billboardGui.AlwaysOnTop = true
  26.  
  27.     local textLabel = Instance.new("TextLabel")
  28.     textLabel.Parent = billboardGui
  29.     textLabel.BackgroundTransparency = 1
  30.     textLabel.Size = UDim2.new(1, 0, 1, 0)
  31.     textLabel.Text = "Devil Fruit"
  32.     textLabel.TextColor3 = Color3.new(1, 1, 1)
  33.     textLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
  34.     textLabel.TextStrokeTransparency = 0
  35.     textLabel.TextScaled = true
  36.     textLabel.TextWrapped = true
  37.     textLabel.Font = Enum.Font.SourceSansBold
  38.  
  39.     -- Parent the BillboardGui to the fruitModel
  40.     billboardGui.Parent = fruitModel
  41. end
  42.  
  43. local function teleportTo(fruitModel)
  44.     if teleporting then return end
  45.     teleporting = true
  46.  
  47.     local character = Players.LocalPlayer.Character
  48.     local rootPart = character and character:FindFirstChild("HumanoidRootPart")
  49.     if rootPart then
  50.         local fruitPosition = fruitModel.Position
  51.         local distance = (rootPart.Position - fruitPosition).Magnitude
  52.         local tweenTime = distance / 500 -- Adjust for faster tween
  53.         local tweenInfo = TweenInfo.new(tweenTime, Enum.EasingStyle.Linear)
  54.         local tween = TweenService:Create(rootPart, tweenInfo, { CFrame = CFrame.new(fruitPosition) })
  55.         tween:Play()
  56.         tween.Completed:Connect(function()
  57.             rootPart.Anchored = false
  58.             teleporting = false -- Reset teleporting flag
  59.         end)
  60.     end
  61.  
  62.     -- Add Devil Fruit label
  63.     createBillboardGui(fruitModel)
  64. end
  65.  
  66. local function detectFruit()
  67.     if tick() - (lastSearchTime or 0) < searchInterval then return end
  68.     lastSearchTime = tick()
  69.  
  70.     local workspace = game.Workspace
  71.     local foundFruits = {}
  72.  
  73.     for _, tool in ipairs(workspace:GetChildren()) do
  74.         if tool:IsA("Tool") and tool:FindFirstChild("Fruit") then
  75.             table.insert(foundFruits, tool.Fruit)
  76.         end
  77.     end
  78.  
  79.     if #foundFruits > 0 then
  80.         return foundFruits -- Return a list of all found fruit models
  81.     end
  82. end
  83.  
  84. local function checkAnchored()
  85.     local character = Players.LocalPlayer.Character
  86.     local rootPart = character and character:FindFirstChild("HumanoidRootPart")
  87.     if rootPart and rootPart.Anchored then
  88.         print("Player detected by anti-cheat (Anchored HumanoidRootPart)")
  89.         Players.LocalPlayer:Kick("Player detected by anti-cheat (Anchored HumanoidRootPart)")
  90.     end
  91. end
  92.  
  93. local function mainLoop()
  94.     if scriptEnabled then
  95.         checkAnchored() -- Checks if the HumanoidRootPart is anchored
  96.  
  97.         if game.PlaceId == BLOX_FRUITS_PLACE_ID then
  98.             local foundFruits = detectFruit()
  99.             if foundFruits then
  100.                 print("Teleporting to fruit...")
  101.                 -- Teleport to the first found fruit model
  102.                 teleportTo(foundFruits[1])
  103.             end
  104.         else
  105.             toggleScript(false) -- Disable the script if the player joins another game
  106.             Players.LocalPlayer:Kick("Game not Supported") -- Kicks the Player With the message ("Game not Supported")
  107.         end
  108.     end
  109. end
  110.  
  111. RunService.Heartbeat:Connect(mainLoop)
  112.  
  113. local function onTeleport(targetPlaceId, targetSpawnName)
  114.     toggleScript(targetPlaceId == BLOX_FRUITS_PLACE_ID) -- Enable/disable script based on place ID
  115. end
  116.  
  117. Players.LocalPlayer.OnTeleport:Connect(onTeleport)
Advertisement
Comments
  • ICreateScriptsHere
    1 year (edited)
    # text 0.31 KB | 0 0
    1. Its an test Version the V1 works but im not sure if The V2 works bc i coudn't test bc Solara was down the V1 the auto store does not work so u need to use an autoclicker or Tiny Task V1: loadstring(game:HttpGet("https://pastebin.com/raw/E4ZaEE6N"))() V2: loadstring(game:HttpGet("https://pastebin.com/raw/3f7aBasF"))()
Add Comment
Please, Sign In to add comment
Advertisement