-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathUniversal.lua
152 lines (148 loc) · 4.9 KB
/
Universal.lua
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
--[[
Credits
Infinite Yield - InfJump
engospy - RemoteEvent
Kavo Owner - kavo ui
7GrandDadPGN (xylex) - Vape Entity
--]]
local entityLibrary = shared.vapeentity
local kavo = shared.kavogui
local FunctionsLibrary = shared.funcslib
local nightbedStore = shared.NBStore
local nightbedService = shared.NBService
local robloxService = shared.rblxService
local nightbedData
-- local Settings = {
-- ['InfiniteJump'] = false,
-- ['Speed'] = {
-- ['Enabled'] = false,
-- ['Value'] = 16
-- },
-- ['Cape'] = false,
-- ['InstantInteract'] = false
-- }
local run = function(func) func() end
local Tabs = shared.Tabs
local Sections = {
['InfiniteJump'] = Tabs['Blatant'].CreateSection('InfiniteJump'),
['Speed'] = Tabs['Blatant'].CreateSection('Speed'),
['InstantInteract'] = Tabs['Utility'].CreateSection('InstantInteract')
}
shared.Sections = Sections
local cloneref = cloneref or function(obj) return obj end
local httpService = cloneref(game.GetService(game, 'HttpService'))
local githubRequest = function(scripturl)
return game:HttpGet('https://raw.githubusercontent.com/NTDCore/NightbedForRoblox/'..httpService:JSONDecode(game:HttpGet('https://api.github.com/repos/NTDCore/NightbedForRoblox/commits'))[1].sha..'/'..scripturl, true)
end
local InfiniteJumpConnection
local InstantInteractConnection
local playersService = cloneref(game:GetService('Players'))
local lplr = playersService.LocalPlayer
local oldchar = lplr.Character
local workspace = cloneref(game:GetService('Workspace'))
local gameCamera = workspace.CurrentCamera
local InputService = cloneref(game:GetService('UserInputService'))
local proximityPromptService = cloneref(game:GetService('ProximityPromptService'))
run(function()
local InfiniteJump = {Enabled = false}
InfiniteJump = Sections['InfiniteJump'].CreateToggle({
Name = 'InfiniteJump',
Function = function(callback)
if callback then
Settings['InfiniteJump'] = true
task.spawn(function()
InfiniteJumpConnection = InputService.JumpRequest:connect(function(jump)
oldchar.Humanoid:ChangeState('Jumping')
end)
end)
else
Settings['InfiniteJump'] = false
InfiniteJumpConnection:Disconnect()
end
end,
HoverText = 'Make you can jump any place'
})
local Speed = {Enabled = false}
local speedval = {Value = 16}
Speed = Sections['Speed'].CreateToggle({
Name = 'Speed',
Function = function(callback)
Settings['Speed']['Enabled'] = callback
if callback then
Settings['Speed']['Enabled'] = true
oldchar.Humanoid.WalkSpeed = speedval.Value
else
Settings['Speed']['Enabled'] = false
oldchar.Humanoid.WalkSpeed = 16
end
end,
HoverText = 'Make you Faster'
})
speedval = Sections['Speed'].CreateSlider({
['Name'] = 'Speed Value',
['HoverText'] = 'Move Faster',
['Max'] = 100,
['Min'] = 0,
['Function'] = function(s)
speedval['Value'] = s
Settings['Speed']['Value'] = s
Speed.ToggleButton()
Speed.ToggleButton()
end,
['Default'] = 16
})
local InstantInteract = {Enabled = false}
InstantInteract = Sections['InstantInteract'].CreateToggle({
['Name'] = 'InstantInteract',
['Function'] = function(callback)
Settings['InstantInteract'] = callback
if callback then
InstantInteractConnection = proximityPromptService.PromptButtonHoldBegan:Connect(function(prompt)
fireproximityprompt(prompt)
end)
else
InstantInteractConnection:Disconnect()
end
end
})
-- function SaveSettings()
-- writefile('Nightbed/Profiles/Universal.json',game:GetService('HttpService'):JSONEncode(Settings))
-- end
-- spawn(function()
-- repeat
-- --writefile('Nightbed/Profiles/Universal.json',game:GetService('HttpService'):JSONEncode(Settings))
-- SaveSettings()
-- task.wait(1.3)
-- until not shared.NBInjected
-- end)
-- local suc, res = pcall(function() return game:GetService('HttpService'):JSONDecode(readfile('Nightbed/Profiles/Universal.json')) end)
-- if suc and type(res) == 'table' then
-- Settings = res
-- task.wait()
-- if InfiniteJump then
-- InfiniteJump.ToggleButton(Settings['InfiniteJump'])
-- end
-- if Speed then
-- Speed.ToggleButton(Settings['Speed']['Enabled'])
-- speedval.SetSlider(Settings['Speed']['Value'])
-- --speedval.Value = Settings['Speed']['Value']
-- end
-- if InstantInteract then
-- InstantInteract.ToggleButton(Settings['InstantInteract'])
-- end
-- end
local MainLoaded = function()
local customModuleURL = 'https://raw.githubusercontent.com/NTDCore/NightbedForRoblox/'..httpService:JSONDecode(game:HttpGet('https://api.github.com/repos/NTDCore/NightbedForRoblox/commits'))[1].sha..'/CustomModules/'..game.PlaceId..'.lua'
local customModuleScript = game:HttpGet(customModuleURL, true)
if customModuleScript then
local success, error = pcall(function()
loadstring(customModuleScript)()
end)
if not success then
warn('Failed To Loaded Modules: ' .. tostring(error))
--loadstring(githubRequest('Universal.lua'))()
end
end
end
MainLoaded()
end)