Universal Script πŸ“Œ
2.1k Views
3.0k Executions

SunRay Effect Studio Lite

Universal Script πŸ“Œ
ProDev_Scripter
ProDev_ScripterFirst script
1 year ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

It makes SunRays. Looks cool.

View Raw
local RAY_IMAGE = "rbxassetid://1084982817"
local SUN_IMAGE = "rbxassetid://277033149"
local RAY_COLOR = Color3.new(1, 1, 1)
local RAY_ROTATION = -25
local MIN_BRIGHT_TRANS = 0.5
local SUN_SIZE = Vector2.new(0.2, 0.2)
local SUN_OFFSET = Vector2.new(0.004, 0.004)
local TWEEN_SPEED = 0.5
local RAY_DIST = {1.7; 0.3; -0.3; -0.9;}
local RAY_SIZES = {0.7; 0.2; 1.2; 0.45;}
local RAY_TRANS = {0.8; 0.7; 0.9; 0.6;}
local SUN_RAY_SIZE = 20
local SUN_RAY_TRANS = 0
local SUN_RAY_COLOR = Color3.new(1, 1, 0.95)
local lighting = game:GetService("Lighting")
local runService = game:GetService("RunService")
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local camera = workspace.CurrentCamera
local realMod = 1

local function Clip(n, l, h)
	if n < l then return l end
	if n > h then return h end
	return n
end

local function GetSunPosition()
	local screenPoint = camera:WorldToScreenPoint(camera.CoordinateFrame.p + lighting:GetSunDirection())
	return Vector2.new(screenPoint.x, screenPoint.y), screenPoint.z > 0
end

local function ScreenCenter()
	return camera.ViewportSize / 2
end

local function IsObstructed(ignore)
	return workspace:FindPartOnRay(Ray.new(camera.CoordinateFrame.p, lighting:GetSunDirection() * 900), ignore) ~= nil
end



Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

More universal scripts

See all
Script hub
33.0k
298.1k
Bumped 27 minutes ago
Script hub
23.6k
5.2k
Bumped 28 minutes ago
Key System
Paid
High QualityΒ Offering
Universal Script πŸ“Œ
175
527
Bumped 57 minutes ago
Universal Script πŸ“Œ
1.6k
30.2k
Bumped 58 minutes ago
Script hub
4.1M
558.5k
Bumped 1 hour ago
Key System

Script hub

Hall of Fame #3

Verified script badgeOverflow 35 Supported Games

Script hub
5.5k
28.9k
Bumped 2 hours ago
Key System
Script hub
14.0k
28.5k
Bumped 3 hours ago