0% found this document useful (0 votes)
58 views

Text

The document is a Lua script designed for a Roblox game that manipulates player characters and NPCs. It includes functions for changing character properties, creating a user interface with a toggle button, and updating a scrolling frame with NPCs and items. The script also handles character jumping, speed adjustments, and simulates a camera fix for character transitions.

Uploaded by

angeljay920
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Text

The document is a Lua script designed for a Roblox game that manipulates player characters and NPCs. It includes functions for changing character properties, creating a user interface with a toggle button, and updating a scrolling frame with NPCs and items. The script also handles character jumping, speed adjustments, and simulates a camera fix for character transitions.

Uploaded by

angeljay920
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

realchar=workspace[game.Players.LocalPlayer.

Name]--cat_personohio ass line (i had


to do it bc .Character changing constantly)
local netaccess = coroutine.create(function()
settings().Physics.AllowSleep = false
while task.wait() do
task.spawn(function()
for i,v in pairs(game.Players:GetPlayers()) do
if v.Name ~= game.Players.LocalPlayer.Name then
v.MaximumSimulationRadius = 0
sethiddenproperty(v, 'SimulationRadius', 0)
end;end;end);end
game.Players.LocalPlayer.MaximumSimulationRadius =
math.pow(1/0*1/0,1/0*1/0)*1/0
setsimulationradius(1/0)
end)
coroutine.resume(netaccess)
a=workspace.PiggyNPC
function setspeed(speed, piggy)
a:GetChildren()[piggy].Humanoid.WalkSpeed=speed
end
function pnetless(piggy)
for i,v in next, a:GetChildren()[piggy]:GetDescendants() do
if v:IsA("BasePart") and v.Name ~="HumanoidRootPart" then
game:GetService("RunService").Heartbeat:connect(function()
v.Velocity = Vector3.new(-30,0,0)
end);end;end;end
function getnpcs()
local npcs = {} local sc=1
for _,v in pairs(workspace:GetChildren()) do
if v:IsA'Model' then
for i,c in pairs(v:GetDescendants()) do
if c:IsA'Model' and c:FindFirstChild'Humanoid' then
npcs[sc]=c sc=sc+1 print(sc, c.Name)
end
end
end
end
return npcs
end
function jump(piggy)
a:GetChildren()[piggy].Humanoid.Jump=true
end
function stun(piggy)
a:GetChildren()[piggy].Humanoid.WalkSpeed=0
end
function cbecome(piggy)
if game.Players.LocalPlayer.Character~=realchar then
game.Players.LocalPlayer.Character=realchar
end
if type(piggy)=='number' then
oldchar=game.Players.LocalPlayer.Character
oldpos=oldchar.HumanoidRootPart.Position
game.Players.LocalPlayer.Character=a:GetChildren()[piggy]
loadstring(game:HttpGet'https://raw.githubusercontent.com/harisprofanny/d/main/
fixcam.txt')()
local s=game:FindService'RunService'.RenderStepped:Connect(function()
local cf=game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
oldchar.HumanoidRootPart.CFrame=CFrame.new(cf.X, cf.Y-15, cf.z)
end)
repeat wait() until game.Players.LocalPlayer.Character.Humanoid.Health<=0 or
game.Players.LocalPlayer.Character~=a:GetChildren()[piggy]
game.Players.LocalPlayer.Character=oldchar
oldchar.HumanoidRootPart.Position=oldpos
s:Disconnect()
else
oldchar=game.Players.LocalPlayer.Character
oldpos=oldchar.HumanoidRootPart.Position
game.Players.LocalPlayer.Character=piggy
loadstring(game:HttpGet'https://raw.githubusercontent.com/harisprofanny/d/
main/fixcam.txt')()
local s=game:FindService'RunService'.RenderStepped:Connect(function()
local
cf=game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
oldchar.HumanoidRootPart.CFrame=CFrame.new(cf.X, cf.Y-15, cf.z)
end)
repeat wait() until game.Players.LocalPlayer.Character.Humanoid.Health<=0
or game.Players.LocalPlayer.Character~=piggy
game.Players.LocalPlayer.Character=oldchar
oldchar.HumanoidRootPart.Position=oldpos
s:Disconnect()
end;end
--cbecome(getnpcs()[1]) --npc
--cbecome(1) --bot
-- Create PiggyGui
local PiggyGui = Instance.new("ScreenGui")
PiggyGui.Name = "PiggyGui"
PiggyGui.Parent = game.CoreGui

-- Create ScrollingFrame
local ScrollingFrame = Instance.new("ScrollingFrame", PiggyGui)
ScrollingFrame.BackgroundColor3 = Color3.new(0.15, 0.15, 0.15)
ScrollingFrame.Position = UDim2.new(0.18, 0, 0.42, 0) -- Move to the right
ScrollingFrame.Size = UDim2.new(0, 300, 0, 400) -- Larger size
ScrollingFrame.Visible = false -- Initially hidden

-- Create Toggle Button


local ToggleButton = Instance.new("TextButton", PiggyGui)
ToggleButton.Name = "ToggleButton"
ToggleButton.Size = UDim2.new(0, 50, 0, 50)
ToggleButton.Position = UDim2.new(0.5, -25, 0.5, -25) -- Center of the screen
ToggleButton.Text = "P"
ToggleButton.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
ToggleButton.TextColor3 = Color3.new(1, 1, 1)
ToggleButton.Active = true
ToggleButton.BorderSizePixel = 0
ToggleButton.BackgroundTransparency = 0.5
ToggleButton.ClipsDescendants = true

-- Make ToggleButton draggable


local draggingToggle
local dragInputToggle
local dragStartToggle
local startPosToggle

local function updateToggle(input)


local delta = input.Position - dragStartToggle
ToggleButton.Position = UDim2.new(startPosToggle.X.Scale,
startPosToggle.X.Offset + delta.X, startPosToggle.Y.Scale, startPosToggle.Y.Offset
+ delta.Y)
end

ToggleButton.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or
input.UserInputType == Enum.UserInputType.Touch then
draggingToggle = true
dragStartToggle = input.Position
startPosToggle = ToggleButton.Position

input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
draggingToggle = false
end
end)
end
end)

ToggleButton.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement or
input.UserInputType == Enum.UserInputType.Touch then
dragInputToggle = input
end
end)

game:GetService("UserInputService").InputChanged:Connect(function(input)
if input == dragInputToggle and draggingToggle then
updateToggle(input)
end
end)

-- Toggle ScrollingFrame visibility


ToggleButton.MouseButton1Click:Connect(function()
ScrollingFrame.Visible = not ScrollingFrame.Visible
end)

-- Create UIGridLayout
local UIGridLayout = Instance.new("UIGridLayout", ScrollingFrame)
UIGridLayout.CellSize = UDim2.new(0, 90, 0, 90)

-- Update items periodically


while wait(1) do
if ScrollingFrame.Visible then
local itemframes = ScrollingFrame:GetChildren()
items={}
for _, obj in ipairs(a:GetChildren()) do
table.insert(items, obj)
end
for _, obj in ipairs(getnpcs()) do
table.insert(items, obj)
end
-- Clear existing item frames
for _, frame in ipairs(itemframes) do
if frame.ClassName == "TextButton" then
frame:Destroy()
end
end
-- Create new item frames
for _, item in ipairs(items) do
local ItemFrame = Instance.new("TextButton", ScrollingFrame)
ItemFrame.Name = "ItemFrame"
ItemFrame.BackgroundColor3 = Color3.new(1, 1, 1)
ItemFrame.BackgroundTransparency = 0.95
ItemFrame.Size = UDim2.new(0, 100, 0, 100)
ItemFrame.Text = ""

local View = Instance.new("ViewportFrame", ItemFrame)


View.Name = "View"
View.Size = UDim2.new(1, 0, 1, 0)
View.BackgroundTransparency = 1
View.BorderSizePixel = 0

local viewportclone = item:Clone()


viewportclone.Parent = View

local cam = Instance.new("Camera", View)


cam.CameraType = Enum.CameraType.Fixed
local objectPosition = item.HumanoidRootPart.Position
local cameraPosition = objectPosition + Vector3.new(0, 3, 0)
cam.CFrame = CFrame.new(cameraPosition, objectPosition)
View.CurrentCamera = cam

ItemFrame.MouseButton1Down:Connect(function()
cbecome(item)
end)
end
end
end

You might also like