
2.0k Views
2.2k Executions
SunRay Effect Studio Lite
Universal Script 📌
ProDev_ScripterFirst script
1 year ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
It makes SunRays. Looks cool.
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
0Log in to join the conversation. Login
No comments yet. Be the first!







