0% found this document useful (0 votes)
95 views3 pages

Proximity Prompt UI Script for Roblox

Bherbhuhvhjhbv Fdsdgygxfy thjyethjvfgh Fhty54yjvfhjjhghuh

Uploaded by

nerdychris2010
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views3 pages

Proximity Prompt UI Script for Roblox

Bherbhuhvhjhbv Fdsdgygxfy thjyethjvfgh Fhty54yjvfhjjhghuh

Uploaded by

nerdychris2010
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

local interactables = {}

local RunService = game:GetService("RunService")


local PPS = game:GetService("ProximityPromptService")
local UIS = game:GetService("UserInputService")
local TS = game:GetService("TweenService")
local Player = game:GetService("Players").LocalPlayer
local CurrentCamera = [Link]
local PromptFrame = [Link]
local MobilePrompt = [Link]
local MainUI = [Link]
local Highlight = [Link]
local PromptPropertiesConnection : RBXScriptConnection = nil
local PromptImages = {
Hide = "";
Interact = "";
};

function MobilePromptUpdate(boolean:boolean)
if ([Link]) then
if (boolean) then
[Link] = true
TS:Create(MobilePrompt, [Link](0.2),
{BackgroundTransparency = 0.7}):Play()
TS:Create([Link], [Link](0.2),
{Transparency = 0}):Play()
TS:Create([Link], [Link](0.2),
{ImageTransparency = 0}):Play()
else
TS:Create(MobilePrompt, [Link](0.2),
{BackgroundTransparency = 1}):Play()
TS:Create([Link], [Link](0.2),
{Transparency = 1}):Play()
TS:Create([Link], [Link](0.2),
{ImageTransparency = 1}):Play()
end
end
end

function UpdatePrompt(Prompt:ProximityPrompt, boolean:boolean)


if (boolean) then
if ([Link]) then
if ([Link] == [Link]) then
[Link] = true
PromptPropertiesConnection =
[Link]:Connect(function()
[Link] = [Link]
[Link] = "-
"..[Link]
[Link] =
[Link]
end)
if ([Link]) then
[Link] = [Link](0.265,
0,0.625, 0)
[Link] = false
end
[Link] = 0.3
[Link] = [Link](0.375, 0,0.296, 0)
TS:Create([Link], [Link](0.5), {Scale =
1}):Play()
MobilePromptUpdate(true)
[Link]:Connect(function()
Prompt:InputHoldBegin()
end)
[Link]:Connect(function()
Prompt:InputHoldEnd()
end)
[Link]:Connect(function()
local EmptyBar = [Link](0, 0,0, 11)
local FullBar = [Link](0, 100,0, 11)
local ScaleEmptyBar = TS:Create([Link],
[Link](0.1), {Size = EmptyBar})
local ScaleFullBar = TS:Create([Link],
[Link]([Link]), {Size = FullBar})
ScaleEmptyBar:Cancel()
ScaleFullBar:Play()
TS:Create([Link], [Link](0.3),
{Position = [Link](0.375, 0,0.400, 0)}):Play()
[Link]:Connect(function()
ScaleFullBar:Cancel()
ScaleEmptyBar:Play()
TS:Create([Link],
[Link](0.3), {Position = [Link](0.375, 0,0.375, 0)}):Play()
end)
end)
local CameraCFramePosition
local Parent = [Link]
if (Parent) then
if not (Parent:IsA("BasePart")) then
if (Parent:IsA("Model")) then
CameraCFramePosition =
Parent:GetPivot().Position
elseif (Parent:IsA("Attachment")) then
CameraCFramePosition =
[Link]
end
else
CameraCFramePosition =
Parent:GetPivot().Position
end
end
local CameraScreenPoint =
CurrentCamera:WorldToScreenPoint(CameraCFramePosition - [Link](0, 0.2, 0))
[Link] = [Link](0,
[Link](CameraScreenPoint.X, 80, [Link].X - 80), 0,
[Link](CameraScreenPoint.Y, 80, [Link].Y - 80))
TS:Create(Highlight, [Link](0.2),
{OutlineTransparency = 0}):Play()
[Link] = false
end
end
else
[Link] = false
[Link] = nil
[Link] = false
TS:Create(Highlight, [Link](0.2), {OutlineTransparency =
0}):Play()
[Link] = true
TS:Create([Link], [Link](0.5), {Scale =
0.3}):Play()
MobilePromptUpdate(false)
if (PromptPropertiesConnection) then
PromptPropertiesConnection:Disconnect()
end
end
end

[Link]:Connect(function(Prompt)
UpdatePrompt(Prompt,true)
end)
[Link]:Connect(function(Prompt)
UpdatePrompt(Prompt,false)
end)
return interactables

You might also like