mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-14 14:51:55 +00:00
anti exploit remotes and skybox script
This commit is contained in:
@@ -36,6 +36,8 @@ function Actions.constructor(LocalPlayer: LocalPlayer)
|
|||||||
else
|
else
|
||||||
warn(`[Server Actions]: Got an unknown type, Key="{typeof(Key)}" Value="{Key}" from: "{Messenger.Name}"`)
|
warn(`[Server Actions]: Got an unknown type, Key="{typeof(Key)}" Value="{Key}" from: "{Messenger.Name}"`)
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
Messenger:Kick(`"{Messenger.Name}", {Messenger.UserId} r="{Remote.Name}", 1="{tostring(Key)}"`)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
@@ -59,15 +59,16 @@ function Flashlight.constructor(LocalPlayer: LocalPlayer, HumanoidRootPart: Huma
|
|||||||
warn("[Server Flashlight]: UDP event was already created, duplicating...", debug.traceback())
|
warn("[Server Flashlight]: UDP event was already created, duplicating...", debug.traceback())
|
||||||
end
|
end
|
||||||
FlashlightUDP_Event = Flashlight_UDP.OnServerEvent:Connect(function(Messenger: Player, CameraEuler: EulerXYZ_struct)
|
FlashlightUDP_Event = Flashlight_UDP.OnServerEvent:Connect(function(Messenger: Player, CameraEuler: EulerXYZ_struct)
|
||||||
--The compiler/optimization level should inline this
|
if Messenger.UserId == LocalPlayer.UserId then
|
||||||
local ExtraCheck = CameraEuler[4] and CameraEuler[4] == 3
|
if CameraEuler[4] and CameraEuler[4] == 3 then
|
||||||
|
local RootPartCFrame = HumanoidRootPart.CFrame
|
||||||
if Messenger.UserId == LocalPlayer.UserId and ExtraCheck then
|
FlashlightPart.CFrame = CFrame.new(
|
||||||
local RootPartCFrame = HumanoidRootPart.CFrame
|
RootPartCFrame.X,
|
||||||
FlashlightPart.CFrame = CFrame.new(
|
RootPartCFrame.Y+Flashlight.HeadHeight,
|
||||||
RootPartCFrame.X,
|
RootPartCFrame.Z)*CFrame.Angles(CameraEuler[1], CameraEuler[2], CameraEuler[3])
|
||||||
RootPartCFrame.Y+Flashlight.HeadHeight,
|
end
|
||||||
RootPartCFrame.Z)*CFrame.Angles(CameraEuler[1],CameraEuler[2],CameraEuler[3])
|
else
|
||||||
|
Messenger:Kick(`"{Messenger.Name}", {Messenger.UserId} r="{Flashlight_UDP.Name}", 1="{tostring(CameraEuler)}"`)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ end);
|
|||||||
--reset
|
--reset
|
||||||
print("TODO reached -", script.Name..".lua")
|
print("TODO reached -", script.Name..".lua")
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
Messenger:Kick(`"{Messenger.Name}", {Messenger.UserId} r="{Spine.Remote.Name}", 1="{tostring(CameraPosition)}", 2="{tostring(IsFirstPerson)}"`)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,14 @@
|
|||||||
--!native
|
--!native
|
||||||
--!strict
|
--!strict
|
||||||
|
|
||||||
local Lighting = game:GetService("Lighting")
|
|
||||||
|
|
||||||
type LightingProps = { [string]: Color3 | number | boolean | string }
|
type LightingProps = { [string]: Color3 | number | boolean | string }
|
||||||
|
|
||||||
|
export type Effects = {
|
||||||
|
ColorCorrection: ColorCorrectionEffect
|
||||||
|
}
|
||||||
|
|
||||||
|
local Lighting = game:GetService("Lighting")
|
||||||
|
|
||||||
local Lighting_PropsTree: LightingProps = {
|
local Lighting_PropsTree: LightingProps = {
|
||||||
["Ambient"] = Color3.fromRGB(40,40,40),
|
["Ambient"] = Color3.fromRGB(40,40,40),
|
||||||
["Brightness"] = 1,
|
["Brightness"] = 1,
|
||||||
@@ -25,13 +29,33 @@ local Lighting_PropsTree: LightingProps = {
|
|||||||
["FogStart"] = 100000,
|
["FogStart"] = 100000,
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Effects = {
|
local function Skybox(): (Sky, Atmosphere)
|
||||||
ColorCorrection: ColorCorrectionEffect
|
local SkyBox = Instance.new("Sky") :: Sky
|
||||||
}
|
SkyBox.SkyboxBk = "rbxassetid://48020371"
|
||||||
|
SkyBox.SkyboxDn = "rbxassetid://48020144"
|
||||||
|
SkyBox.SkyboxFt = "rbxassetid://48020234"
|
||||||
|
SkyBox.SkyboxLf = "rbxassetid://48020211"
|
||||||
|
SkyBox.SkyboxRt = "rbxassetid://48020254"
|
||||||
|
SkyBox.SkyboxUp = "rbxassetid://48020383"
|
||||||
|
SkyBox.MoonTextureId = ""
|
||||||
|
SkyBox.StarCount = 500
|
||||||
|
|
||||||
|
local Atmosphere = Instance.new("Atmosphere") :: Atmosphere
|
||||||
|
Atmosphere.Density = .429
|
||||||
|
Atmosphere.Offset = 0
|
||||||
|
Atmosphere.Color = Color3.new(0,0,0)
|
||||||
|
Atmosphere.Decay = Color3.new(0,0,0)
|
||||||
|
Atmosphere.Glare = .1
|
||||||
|
Atmosphere.Haze = 1.5
|
||||||
|
|
||||||
|
return SkyBox, Atmosphere
|
||||||
|
end
|
||||||
|
|
||||||
return function(): Effects
|
return function(): Effects
|
||||||
|
Lighting:ClearAllChildren()
|
||||||
|
|
||||||
--VFX Effects for later
|
--VFX Effects for later
|
||||||
local ColorCorrection = Instance.new("ColorCorrectionEffect")
|
local ColorCorrection = Instance.new("ColorCorrectionEffect") :: ColorCorrectionEffect
|
||||||
ColorCorrection.Parent = Lighting
|
ColorCorrection.Parent = Lighting
|
||||||
|
|
||||||
for Light_Prop, Light_Value in Lighting_PropsTree do
|
for Light_Prop, Light_Value in Lighting_PropsTree do
|
||||||
@@ -43,6 +67,10 @@ return function(): Effects
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local Sky, Atmosphere = Skybox()
|
||||||
|
Sky.Parent = Lighting
|
||||||
|
Atmosphere.Parent = Lighting
|
||||||
|
|
||||||
return {
|
return {
|
||||||
ColorCorrection = ColorCorrection
|
ColorCorrection = ColorCorrection
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ local EditorEntities = Instance.new("BindableFunction")
|
|||||||
EditorEntities.Name = "StudioIndexedEntities"
|
EditorEntities.Name = "StudioIndexedEntities"
|
||||||
EditorEntities.Parent = ServerStorage
|
EditorEntities.Parent = ServerStorage
|
||||||
|
|
||||||
local StudioEntities = HideEditorEntities.indexAll(not RS:IsStudio())
|
local StudioEntities = HideEditorEntities.indexAll(not false)
|
||||||
|
|
||||||
StarterPlayer_Stuff()
|
StarterPlayer_Stuff()
|
||||||
Lighting_Stuff()
|
Lighting_Stuff()
|
||||||
|
|||||||
Reference in New Issue
Block a user