-
Notifications
You must be signed in to change notification settings - Fork 0
/
savecpugpu
137 lines (110 loc) · 3.23 KB
/
savecpugpu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
local screenSaver = Instance.new("ScreenGui")
local savingFrame = Instance.new("Frame")
local dvd_logo = Instance.new("ImageLabel")
local TextLabel = Instance.new("TextLabel")
screenSaver.Name = "screenSaver"
screenSaver.Enabled = false
screenSaver.Parent = game:GetService("CoreGui")
screenSaver.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
savingFrame.Name = "savingFrame"
savingFrame.Parent = screenSaver
savingFrame.BackgroundColor3 = Color3.fromRGB(18, 18, 18)
savingFrame.BorderSizePixel = 0
if _G.ShowUp == true then
savingFrame.Position = UDim2.new(0, 0, 0, 0)
savingFrame.Size = UDim2.new(1, 0,1, 0)
else
savingFrame.Position = UDim2.new(0, 0, -0.0984251946, 0)
savingFrame.Size = UDim2.new(1, 0, 1.09842515, 0)
end
dvd_logo.Name = "dvd_logo"
dvd_logo.Parent = savingFrame
dvd_logo.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
dvd_logo.BackgroundTransparency = 1.000
dvd_logo.Position = UDim2.new(0.5, -50, 0.5, -50)
dvd_logo.Size = UDim2.new(0, 100, 0, 100)
dvd_logo.Image = "http://www.roblox.com/asset/?id=7371850353"
TextLabel.Parent = dvd_logo
TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
TextLabel.BackgroundTransparency = 1.000
TextLabel.Position = UDim2.new(0.049999997, 0, 1, 0)
TextLabel.Size = UDim2.new(0, 89, 0, 30)
TextLabel.Font = Enum.Font.Michroma
TextLabel.Text = "Currently Saving GPU"
TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
TextLabel.TextScaled = true
TextLabel.TextSize = 20.000
TextLabel.TextWrapped = true
-- Scripts:
local function SOVAXG_fake_script() -- savingFrame.LocalScript
local script = Instance.new('LocalScript', savingFrame)
local rs = game:GetService("RunService")
local x
local y
local xspeed = 10
local yspeed = 10
local dvd = script.Parent.dvd_logo
local cam = workspace.CurrentCamera
local r, g, b
local width = cam.ViewportSize.X
local height = cam.ViewportSize.Y
function pickColor()
r = math.random(100, 256)
g = math.random(100, 256)
b = math.random(100, 256)
end
x = math.random(0, width)
y = math.random(0, height)
pickColor()
rs.RenderStepped:Connect(function()
x = x + xspeed
y = y + yspeed
dvd.Position = UDim2.fromOffset(x, y)
dvd.ImageColor3 = Color3.fromRGB(r, g, b)
if x + dvd.AbsoluteSize.X >= width then
xspeed = -xspeed
x = width - dvd.AbsoluteSize.X
pickColor()
elseif x <= 0 then
xspeed = -xspeed
x = 0
pickColor()
end
if y + dvd.AbsoluteSize.Y >= height then
yspeed = -yspeed
y = height - dvd.AbsoluteSize.Y
pickColor()
elseif y <= 0 then
yspeed = -yspeed
y = 0
pickColor()
end
end)
end
coroutine.wrap(SOVAXG_fake_script)()
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
function savegpu()
setfpscap(20)
screenSaver.Enabled = true
RunService:Set3dRenderingEnabled(false)
end
function unsavegpu()
setfpscap(165)
screenSaver.Enabled = false
RunService:Set3dRenderingEnabled(true)
end
local WindowFocusReleasedFunction = function()
savegpu()
return
end
local WindowFocusedFunction = function()
unsavegpu()
return
end
local Initialize = function()
UserInputService.WindowFocusReleased:Connect(WindowFocusReleasedFunction)
UserInputService.WindowFocused:Connect(WindowFocusedFunction)
return
end
Initialize()