--// SERVICES
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local player = Players.LocalPlayer
--// GUI
local gui = Instance.new("ScreenGui")
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 320, 0, 200)
frame.Position = UDim2.new(0.5, -160, 0.5, -100)
frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
frame.Active = true
frame.Draggable = true
frame.Parent = gui
local input = Instance.new("TextBox")
input.Size = UDim2.new(0.8, 0, 0, 30)
input.Position = UDim2.new(0.1, 0, 0.3, 0)
input.Text = "1"
input.Parent = frame
local toggle = Instance.new("TextButton")
toggle.Size = UDim2.new(0.8, 0, 0, 30)
toggle.Position = UDim2.new(0.1, 0, 0.6, 0)
toggle.Text = "Start"
toggle.Parent = frame
--// STATE
local running = false
--// CAMERA REMOTE (Compact Camera in Backpack)
local function getCameraRemote()
local backpack = player:WaitForChild("Backpack")
local cameraTool = backpack:WaitForChild("Compact Camera", 5) -- 5 second timeout
if not cameraTool then
warn("Compact Camera not found in Backpack!")
return nil
end
return cameraTool:WaitForChild("RemoteEvent")
end
--// SELL REMOTE
local sellRemote = ReplicatedStorage:WaitForChild("Events"):WaitForChild("DataEvent")
-- Updated arguments you provided
local photoArgs = {
"GivePhotoTool",
{
CFrame.new(-322.901611328125, 45.401695251464844, -0.37628138065338135,
-0.8775712847709656, -0.0007074501481838524, 0.47944575548171997,
-0.0000012002185485471273, 0.999998927116394, 0.0014733498683199286,
-0.47944629192352295, 0.001292391330935061, -0.8775703310966492),
1.9832000999999764
}
}
local calculateArgs = {
"CalculateValue",
{
{ -- List of parts (cleaned up - you can add/remove as needed)
workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
workspace:WaitForChild("Map"):WaitForChild("Part"),
workspace:WaitForChild("Map"):WaitForChild("Part"),
workspace:WaitForChild("Map"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Stud"),
workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
workspace:WaitForChild("Map"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Stud"),
workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Stud"),
workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Stud"),
workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part"),
workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part")
},
CFrame.new(-322.901611328125, 45.401695251464844, -0.37628138065338135,
-0.8775712847709656, -0.0007074501481838524, 0.47944575548171997,
-0.0000012002185485471273, 0.999998927116394, 0.0014733498683199286,
-0.47944629192352295, 0.001292391330935061, -0.8775703310966492),
1.9832000999999764
}
}
--// MAIN LOOP
local function loop()
while running do
local delayTime = tonumber(input.Text) or 1
local char = player.Character or player.CharacterAdded:Wait()
local camRemote = getCameraRemote()
if not camRemote then
warn("Camera Remote not found - stopping loop")
running = false
toggle.Text = "Start"
break
end
-- 1. Give Photo Tool
camRemote:FireServer(unpack(photoArgs))
task.wait(delayTime)
-- 2. Calculate Value
camRemote:FireServer(unpack(calculateArgs))
task.wait(delayTime)
-- 3. Sell Inventory
sellRemote:FireServer("Sell Inventory")
task.wait(delayTime)
end
end
--// BUTTON
toggle.MouseButton1Click:Connect(function()
running = not running
toggle.Text = running and "Stop" or "Start"
if running then
task.spawn(loop)
end
end)ps2 script open source
No comments yet. Be the first to comment!
1--// SERVICES
2local Players = game:GetService("Players")
3local ReplicatedStorage = game:GetService("ReplicatedStorage")
4
5local player = Players.LocalPlayer
6
7--// GUI
8local gui = Instance.new("ScreenGui")
9gui.ResetOnSpawn = false
10gui.Parent = player:WaitForChild("PlayerGui")
11
12local frame = Instance.new("Frame")
13frame.Size = UDim2.new(0, 320, 0, 200)
14frame.Position = UDim2.new(0.5, -160, 0.5, -100)
15frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
16frame.Active = true
17frame.Draggable = true
18frame.Parent = gui
19
20local input = Instance.new("TextBox")
21input.Size = UDim2.new(0.8, 0, 0, 30)
22input.Position = UDim2.new(0.1, 0, 0.3, 0)
23input.Text = "1"
24input.Parent = frame
25
26local toggle = Instance.new("TextButton")
27toggle.Size = UDim2.new(0.8, 0, 0, 30)
28toggle.Position = UDim2.new(0.1, 0, 0.6, 0)
29toggle.Text = "Start"
30toggle.Parent = frame
31
32--// STATE
33local running = false
34
35--// CAMERA REMOTE (Compact Camera in Backpack)
36local function getCameraRemote()
37 local backpack = player:WaitForChild("Backpack")
38 local cameraTool = backpack:WaitForChild("Compact Camera", 5) -- 5 second timeout
39 if not cameraTool then
40 warn("Compact Camera not found in Backpack!")
41 return nil
42 end
43 return cameraTool:WaitForChild("RemoteEvent")
44end
45
46--// SELL REMOTE
47local sellRemote = ReplicatedStorage:WaitForChild("Events"):WaitForChild("DataEvent")
48
49-- Updated arguments you provided
50local photoArgs = {
51 "GivePhotoTool",
52 {
53 CFrame.new(-322.901611328125, 45.401695251464844, -0.37628138065338135,
54 -0.8775712847709656, -0.0007074501481838524, 0.47944575548171997,
55 -0.0000012002185485471273, 0.999998927116394, 0.0014733498683199286,
56 -0.47944629192352295, 0.001292391330935061, -0.8775703310966492),
57 1.9832000999999764
58 }
59}
60
61local calculateArgs = {
62 "CalculateValue",
63 {
64 { -- List of parts (cleaned up - you can add/remove as needed)
65 workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part"),
66 workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part"),
67 workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part"),
68 workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
69 workspace:WaitForChild("Map"):WaitForChild("Part"),
70 workspace:WaitForChild("Map"):WaitForChild("Part"),
71 workspace:WaitForChild("Map"):WaitForChild("Part"),
72 workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part"),
73 workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
74 workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part"),
75 workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part"),
76 workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
77 workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
78 workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
79 workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
80 workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
81 workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
82 workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
83 workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
84 workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Stud"),
85 workspace:WaitForChild("Objects"):WaitForChild("FlowerTree"):WaitForChild("Part"),
86 workspace:WaitForChild("Map"):WaitForChild("Part"),
87 workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Part"),
88 workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Stud"),
89 workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Part"),
90 workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Part"),
91 workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Part"),
92 workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Part"),
93 workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Part"),
94 workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Stud"),
95 workspace:WaitForChild("Objects"):WaitForChild("Sycamore Tree"):WaitForChild("Stud"),
96 workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part"),
97 workspace:WaitForChild("Objects"):WaitForChild("Pine"):WaitForChild("Part")
98 },
99 CFrame.new(-322.901611328125, 45.401695251464844, -0.37628138065338135,
100 -0.8775712847709656, -0.0007074501481838524, 0.47944575548171997,
101 -0.0000012002185485471273, 0.999998927116394, 0.0014733498683199286,
102 -0.47944629192352295, 0.001292391330935061, -0.8775703310966492),
103 1.9832000999999764
104 }
105}
106
107--// MAIN LOOP
108local function loop()
109 while running do
110 local delayTime = tonumber(input.Text) or 1
111
112 local char = player.Character or player.CharacterAdded:Wait()
113 local camRemote = getCameraRemote()
114
115 if not camRemote then
116 warn("Camera Remote not found - stopping loop")
117 running = false
118 toggle.Text = "Start"
119 break
120 end
121
122 -- 1. Give Photo Tool
123 camRemote:FireServer(unpack(photoArgs))
124 task.wait(delayTime)
125
126 -- 2. Calculate Value
127 camRemote:FireServer(unpack(calculateArgs))
128 task.wait(delayTime)
129
130 -- 3. Sell Inventory
131 sellRemote:FireServer("Sell Inventory")
132 task.wait(delayTime)
133 end
134end
135
136--// BUTTON
137toggle.MouseButton1Click:Connect(function()
138 running = not running
139 toggle.Text = running and "Stop" or "Start"
140
141 if running then
142 task.spawn(loop)
143 end
144end)