HackBAN001

try46

Aug 31st, 2025
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.53 KB | Gaming | 0 0
  1. local Players=game:GetService("Players")local ReplicatedStorage=game:GetService("ReplicatedStorage")local RunService=game:GetService("RunService")local isServer=RunService:IsServer()local Player=Players.LocalPlayer if isServer then local GrantPermanentFruit=Instance.new("RemoteEvent")GrantPermanentFruit.Name="GrantPermanentFruit"GrantPermanentFruit.Parent=ReplicatedStorage local EquipFruitEvent=Instance.new("RemoteEvent")EquipFruitEvent.Name="EquipFruit"EquipFruitEvent.Parent=ReplicatedStorage local GetInventory=Instance.new("RemoteFunction")GetInventory.Name="GetInventory"GetInventory.Parent=ReplicatedStorage local Fruits={{Name="Buddha",InternalNames={"Buddha-Buddha","Buddha","BuddhaFruit","Fruit_Buddha","Buddha_Fruit"},Description="Giant transformation"},{Name="Kitsune",InternalNames={"Kitsune-Kitsune","Kitsune","KitsuneFruit","Fruit_Kitsune","Kitsune_Fruit"},Description="Fox form, speed boost"},{Name="DragonWest",InternalNames={"Dragon-Dragon","Dragon","DragonFruit","Fruit_Dragon","Dragon_Fruit"},Description="Fire-based attacks"},{Name="Dough",InternalNames={"Dough-Dough","Dough","DoughFruit","Fruit_Dough","Dough_Fruit"},Description="Sticky dough"},{Name="Gravity",InternalNames={"Gravity-Gravity","Gravity","GravityFruit","Fruit_Gravity","Gravity_Fruit"},Description="Gravitational control"}}local PlayerInventories={}local ActiveFruits={}Players.PlayerAdded:Connect(function(player)PlayerInventories[player]={}ActiveFruits[player]=nil player.CharacterAdded:Connect(function(character)ActiveFruits[player]=nil end)end)Players.PlayerRemoving:Connect(function(player)PlayerInventories[player]=nil ActiveFruits[player]=nil end)GetInventory.OnServerInvoke=function(player)return PlayerInventories[player]or{}end GrantPermanentFruit.OnServerEvent:Connect(function(player,fruitName)local fruit=nil for _,f in ipairs(Fruits)do if f.Name==fruitName then fruit=f break end end if fruit then if not PlayerInventories[player]then PlayerInventories[player]={}end if not table.find(PlayerInventories[player],fruitName)then table.insert(PlayerInventories[player],fruitName)print("Granted "..fruit.Name.." to "..player.Name)for _,internalName in ipairs(fruit.InternalNames)do for _,func in ipairs({"BuyFruit","StoreFruit","SetInventoryFruit","GiveFruit","AddFruit",":givefruit"})do local success,err=pcall(function()local remotes=ReplicatedStorage:FindFirstChild("Remotes")local shopRemote=remotes and(remotes:FindFirstChild("Main")or remotes:FindFirstChild("Shop")or remotes:FindFirstChild("FruitShop")or remotes:FindFirstChild("Comm"))if shopRemote then shopRemote:FireServer(func,internalName)print("Server tried "..func.." "..internalName)else local commRemote=ReplicatedStorage:FindFirstChild("CommF_")or ReplicatedStorage:FindFirstChild("CommE_")or ReplicatedStorage:FindFirstChild("Comm")or ReplicatedStorage:FindFirstChild("FruitInventory")if commRemote then commRemote:FireServer(func,internalName)print("Server tried "..func.." "..internalName)else print("Server: No valid RemoteEvent for "..func.." "..internalName)end end end)if not success then print("Server grant failed for "..func.." "..internalName..": "..tostring(err))end end end end end end)EquipFruitEvent.OnServerEvent:Connect(function(player,fruitName)local fruit=nil for _,f in ipairs(Fruits)do if f.Name==fruitName then fruit=f break end end if fruit and PlayerInventories[player]and table.find(PlayerInventories[player],fruitName)and ActiveFruits[player]~=fruitName then ActiveFruits[player]=fruitName print(player.Name.." equipped "..fruit.Name)for _,internalName in ipairs(fruit.InternalNames)do for _,func in ipairs({"EquipFruit","SetFruit","UseFruit",":equipfruit"})do local success,err=pcall(function()local remotes=ReplicatedStorage:FindFirstChild("Remotes")local equipRemote=remotes and(remotes:FindFirstChild("Main")or remotes:FindFirstChild("Shop")or remotes:FindFirstChild("FruitShop")or remotes:FindFirstChild("Comm"))if equipRemote then equipRemote:FireServer(func,internalName)print("Server tried "..func.." "..internalName)else local commRemote=ReplicatedStorage:FindFirstChild("CommF_")or ReplicatedStorage:FindFirstChild("CommE_")or ReplicatedStorage:FindFirstChild("Comm")or ReplicatedStorage:FindFirstChild("FruitInventory")if commRemote then commRemote:FireServer(func,internalName)print("Server tried "..func.." "..internalName)else print("Server: No valid equip RemoteEvent for "..func.." "..internalName)end end end)if not success then print("Server equip failed for "..func.." "..internalName..": "..tostring(err))end end end end end)end spawn(function()local success,err=pcall(function()local GrantPermanentFruit=ReplicatedStorage:FindFirstChild("GrantPermanentFruit")or Instance.new("RemoteEvent")local EquipFruitEvent=ReplicatedStorage:FindFirstChild("EquipFruit")or Instance.new("RemoteEvent")local GetInventory=ReplicatedStorage:FindFirstChild("GetInventory")or Instance.new("RemoteFunction")local ScreenGui=Instance.new("ScreenGui")ScreenGui.Name="BloxFruitsTestGUI"ScreenGui.Parent=Player.PlayerGui ScreenGui.IgnoreGuiInset=true ScreenGui.ZIndexBehavior=Enum.ZIndexBehavior.Global print("ScreenGui created")local Frame=Instance.new("Frame")Frame.Size=UDim2.new(0,400,0,400)Frame.Position=UDim2.new(0.5,-200,0.5,-200)Frame.BackgroundColor3=Color3.fromRGB(50,50,50)Frame.BorderSizePixel=2 Frame.ZIndex=10 Frame.Visible=true Frame.Parent=ScreenGui print("Frame created")local s1,err1=pcall(function()local Title=Instance.new("TextLabel")Title.Size=UDim2.new(1,0,0,50)Title.Position=UDim2.new(0,0,0,0)Title.Text="Blox Fruits Permanent Fruit Test"Title.TextColor3=Color3.fromRGB(255,255,255)Title.BackgroundColor3=Color3.fromRGB(30,30,30)Title.TextScaled=true Title.ZIndex=11 Title.Visible=true Title.Parent=Frame print("Title created")end)if not s1 then print("Title creation failed: "..tostring(err1))end local s2,err2=pcall(function()local ScrollingFrame=Instance.new("ScrollingFrame")ScrollingFrame.Size=UDim2.new(1,-20,0,240)ScrollingFrame.Position=UDim2.new(0,10,0,60)ScrollingFrame.BackgroundTransparency=1 ScrollingFrame.CanvasSize=UDim2.new(0,0,0,400)ScrollingFrame.ZIndex=11 ScrollingFrame.Visible=true ScrollingFrame.Parent=Frame print("ScrollingFrame created")local InventoryLabel=Instance.new("TextLabel")InventoryLabel.Size=UDim2.new(1,-20,0,90)InventoryLabel.Position=UDim2.new(0,10,0,310)InventoryLabel.Text="Inventory: None"InventoryLabel.TextColor3=Color3.fromRGB(255,255,255)InventoryLabel.BackgroundColor3=Color3.fromRGB(70,70,70)InventoryLabel.TextScaled=true InventoryLabel.TextWrapped=true InventoryLabel.ZIndex=11 InventoryLabel.Visible=true InventoryLabel.Parent=Frame print("InventoryLabel created")local Fruits={{Name="Buddha",InternalNames={"Buddha-Buddha","Buddha","BuddhaFruit","Fruit_Buddha","Buddha_Fruit"},Description="Giant transformation"},{Name="Kitsune",InternalNames={"Kitsune-Kitsune","Kitsune","KitsuneFruit","Fruit_Kitsune","Kitsune_Fruit"},Description="Fox form, speed boost"},{Name="DragonWest",InternalNames={"Dragon-Dragon","Dragon","DragonFruit","Fruit_Dragon","Dragon_Fruit"},Description="Fire-based attacks"},{Name="Dough",InternalNames={"Dough-Dough","Dough","DoughFruit","Fruit_Dough","Dough_Fruit"},Description="Sticky dough"},{Name="Gravity",InternalNames={"Gravity-Gravity","Gravity","GravityFruit","Fruit_Gravity","Gravity_Fruit"},Description="Gravitational control"}}local function updateInventory()local success,inv=pcall(function()return GetInventory:InvokeServer()end)if success then local text="Inventory: "..(next(inv)and table.concat(inv,", ")or"None")InventoryLabel.Text=text print("Inventory updated: "..text)else print("Inventory update failed: "..tostring(inv))end end local yOffset=0 for _,fruit in ipairs(Fruits)do local s3,err3=pcall(function()local FruitLabel=Instance.new("TextLabel")FruitLabel.Size=UDim2.new(1,-10,0,40)FruitLabel.Position=UDim2.new(0,5,0,yOffset)FruitLabel.Text=fruit.Name..": "..fruit.Description FruitLabel.TextColor3=Color3.fromRGB(255,255,255)FruitLabel.BackgroundTransparency=1 FruitLabel.TextScaled=true FruitLabel.TextXAlignment=Enum.TextXAlignment.Left FruitLabel.ZIndex=11 FruitLabel.Visible=true FruitLabel.Parent=ScrollingFrame print("FruitLabel created for "..fruit.Name)local GrantButton=Instance.new("TextButton")GrantButton.Size=UDim2.new(0,100,0,30)GrantButton.Position=UDim2.new(0,5,0,yOffset+40)GrantButton.Text="Grant "..fruit.Name GrantButton.BackgroundColor3=Color3.fromRGB(0,120,0)GrantButton.TextColor3=Color3.fromRGB(255,255,255)GrantButton.ZIndex=11 GrantButton.Visible=true GrantButton.Parent=ScrollingFrame print("GrantButton created for "..fruit.Name)local EquipButton=Instance.new("TextButton")EquipButton.Size=UDim2.new(0,100,0,30)EquipButton.Position=UDim2.new(0,115,0,yOffset+40)EquipButton.Text="Equip "..fruit.Name EquipButton.BackgroundColor3=Color3.fromRGB(0,0,120)EquipButton.TextColor3=Color3.fromRGB(255,255,255)EquipButton.ZIndex=11 EquipButton.Visible=true EquipButton.Parent=ScrollingFrame print("EquipButton created for "..fruit.Name)GrantButton.MouseButton1Click:Connect(function()local success,err=pcall(function()GrantPermanentFruit:FireServer(fruit.Name)end)if success then print("Fired GrantPermanentFruit for "..fruit.Name)else print("GrantPermanentFruit failed: "..tostring(err))end wait(0.5)updateInventory()for _,internalName in ipairs(fruit.InternalNames)do for _,func in ipairs({"BuyFruit","StoreFruit","SetInventoryFruit","GiveFruit","AddFruit",":givefruit"})do local success,err=pcall(function()local remotes=ReplicatedStorage:FindFirstChild("Remotes")local shopRemote=remotes and(remotes:FindFirstChild("Main")or remotes:FindFirstChild("Shop")or remotes:FindFirstChild("FruitShop")or remotes:FindFirstChild("Comm"))if shopRemote then shopRemote:FireServer(func,internalName)print("Client tried "..func.." "..internalName)else local commRemote=ReplicatedStorage:FindFirstChild("CommF_")or ReplicatedStorage:FindFirstChild("CommE_")or ReplicatedStorage:FindFirstChild("Comm")or ReplicatedStorage:FindFirstChild("FruitInventory")if commRemote then commRemote:FireServer(func,internalName)print("Client tried "..func.." "..internalName)else print("Client: No valid RemoteEvent for "..func.." "..internalName)end end end)if not success then print("Client grant failed for "..func.." "..internalName..": "..tostring(err))end end end end)EquipButton.MouseButton1Click:Connect(function()local success,err=pcall(function()EquipFruitEvent:FireServer(fruit.Name)end)if success then print("Fired EquipFruit for "..fruit.Name)else print("EquipFruit failed: "..tostring(err))end for _,internalName in ipairs(fruit.InternalNames)do for _,func in ipairs({"EquipFruit","SetFruit","UseFruit",":equipfruit"})do local success,err=pcall(function()local remotes=ReplicatedStorage:FindFirstChild("Remotes")local equipRemote=remotes and(remotes:FindFirstChild("Main")or remotes:FindFirstChild("Shop")or remotes:FindFirstChild("FruitShop")or remotes:FindFirstChild("Comm"))if equipRemote then equipRemote:FireServer(func,internalName)print("Client tried "..func.." "..internalName)else local commRemote=ReplicatedStorage:FindFirstChild("CommF_")or ReplicatedStorage:FindFirstChild("CommE_")or ReplicatedStorage:FindFirstChild("Comm")or ReplicatedStorage:FindFirstChild("FruitInventory")if commRemote then commRemote:FireServer(func,internalName)print("Client tried "..func.." "..internalName)else print("Client: No valid equip RemoteEvent for "..func.." "..internalName)end end end)if not success then print("Client equip failed for "..func.." "..internalName..": "..tostring(err))end end end end)yOffset=yOffset+80 end end)if not s3 then print("FruitLabel/Button creation failed: "..tostring(err3))end end updateInventory()end)if not s2 then print("ScrollingFrame creation failed: "..tostring(err2))end end)if not success then print("GUI creation failed: "..tostring(err))end end)
Advertisement
Add Comment
Please, Sign In to add comment