Universal Script 📌
2.0k Views
2.2k 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
1.7M
2.2M
Bumped 26 minutes ago
Key System

Script hub

#15 this week

Verified script badgeSnowy Hub 500+ Games & 25600+ Features

Script hub
14.5k
82.9k
Bumped 26 minutes ago
Key System

Script hub

Kronos New

Script hub
3.2M
753.1k
Bumped 3 hours ago
Key System

Script hub

Hall of Fame #8

Verified script badgeFlow Hub | 50 Games | Updated

Universal Script 📌
438
1.1k
Bumped 5 hours ago
Key System
Universal Script 📌
7.1k
141.6k
Bumped 6 hours ago
Script hub
45.7k
114.4k
Bumped 8 hours ago
Key System
Script hub
3.5M
448.8k
Bumped 8 hours ago
Key System

Script hub

Hall of Fame #4

Verified script badgeOverflow #1 *OP*