How do I scale context-action-buttions to be scaled for all devices?

My game uses context action ui buttions in-order to support mobile but for one device its scaled correctly but for larger mobile devices it looks small can anybody help?

This is how the buttions looks on iphone 4S devices

And this is how the buttions look on a samsung GT-N5110 tablet

This is the code for spawning the buttions

ContextActionService:BindAction("Sprinttoggled", sprinttoggle, true)
ContextActionService:BindAction("Block", Blocktoggle, true)
ContextActionService:SetImage("Sprinttoggled", "rbxassetid://14722754437")
ContextActionService:SetPosition("Sprinttoggled",UDim2.new(0,-5,0,0))
local SprintButtion = ContextActionService:GetButton("Sprinttoggled")
if SprintButtion then
	SprintButtion.Size = UDim2.new(0,50,0,50)
end
ContextActionService:SetTitle("Block","Block")
ContextActionService:SetPosition("Block",UDim2.new(0,50,0,1))
local BlockButtion = ContextActionService:GetButton("Block")
if BlockButtion then
	BlockButtion.Size = UDim2.new(0,50,0,50)
end

If you have solutions please tell!

I don’t know how to do this using a script, but if you need a button that will shrink and increase correctly, then in Properties in the ui element edit not offset but scale(x;y) and also do not forget that this property will decrease and increase relative to its parent object. Also make sure that the width and length are divisible by 2. This is what I follow when making UI.

Screen

perhaps the first value should be edited and not the second in the script