Daily Rewards unlimited claim exploit

This commit is contained in:
MrARM
2023-04-23 16:04:59 -05:00
parent ed05edcdb9
commit 7cdfacb78d
2 changed files with 212 additions and 1 deletions

View File

@@ -42,6 +42,15 @@ if (gluesteak.SCRIPT:match("disconnect")) then
-- Kill the original script
return false
end
--
-- Exploit: unlimited PS rewards claim
if (gluesteak.SCRIPT:match("cl_drewardsbox")) then
-- Replace the original disconnect script with our own.
gluesteak.include("./redir/gl_drewardsbox.lua")
-- Kill the original script
return false
end
--
-- Blacklists
@@ -75,4 +84,4 @@ if (gluesteak.SCRIPT:match("cc_rcon")) then
-- Dinkleburg server remote lua exec
return false
end
--
--

202
redir/gl_drewardsbox.lua Normal file
View File

@@ -0,0 +1,202 @@
local PANEL = {}
function PANEL:Init( )
self:SetSkin( Pointshop2.Config.DermaSkin )
self:SetText( "" )
self.day = 0
self.label = vgui.Create( "DLabel", self )
self.label:Dock( FILL )
self.label:DockMargin( 10, 10, 10, 10 )
self.label:SetFont( self:GetSkin().SmallTitleFont )
self.label:SetContentAlignment( 3 )
self.label2 = vgui.Create( "DLabel", self )
self.label2:Dock( FILL )
self.label2:DockMargin( 10, 10, 10, 10 )
self.label2:SetFont( self:GetSkin().TextFont )
self.label2:SetContentAlignment( 5 )
self.label2:SetColor( Color( 0, 255, 0 ) )
self.label2:SetText( "CLAIMED" )
self.label2:SetVisible( false )
hook.Add( "Rewards_UpdateInfo", self, function( self, uses )
self:SetOpened( uses[tonumber(self.day)] )
end )
hook.Add( "PS2_OnSettingsUpdate", self, function( self )
self:Update( )
end )
end
function PANEL:SetOpened( opened )
self.opened = opened
self:Update( )
end
function PANEL:SetDay( day )
self.day = day
self.label:SetText( day )
self:Update( )
end
function PANEL:Update( )
self.label2:SetVisible( self.opened )
end
function PANEL:Paint( w, h )
local color
if self.opened then
color = Color( 0, 255, 0 )
self:SetColor( color )
self.label2:SetVisible( true )
self.label2:SetText( "CLAIMED" )
self.label2:SetColor( color )
elseif self.Hovered or self:IsChildHovered( 3 ) then
color = self:GetSkin( ).Highlight
elseif self.day < RewardsView:getInstance( ):GetStreak( ) then
color = self:GetSkin( ).ButtonColor
self:SetColor( color )
self.label2:SetVisible( true )
self.label2:SetText( "EXPIRED" )
self.label2:SetColor( color )
elseif self.day == RewardsView:getInstance( ):GetStreak( ) then
color = self:GetSkin( ).BrightPanel
self:SetColor( color )
self.label2:SetVisible( true )
self.label2:SetColor( color )
self.label2:SetText( "Click to E-Claim" )
else
color = self:GetSkin( ).BrightPanel
self:SetColor( color )
self.label2:SetVisible( false )
end
self.label:SetColor( color )
surface.SetDrawColor( color )
surface.DrawOutlinedRect( 0, 0, w, h )
end
function PANEL:DoClick( )
print("Dbg: PS reward click")
if self.opened then
--return
end
if self.day < RewardsView:getInstance( ):GetStreak( ) then
--return Derma_Message( "Sorry, but that day is already over :(", "Try Again" )
end
if self.day != RewardsView:getInstance( ):GetStreak( ) then
--return Derma_Message( "You're not at that day yet", "Try Again" )
end
RewardsView:getInstance( ):ClaimDay( )
:Fail( function( err )
Pointshop2View:getInstance( ):displayError( err )
end )
end
vgui.Register( "DRewardsBox", PANEL, "DButton" )