Kai colors
Key RequiredUniversal

Kai colors

Universal ScriptKai_scriptsKai_scripts 612 views 92 executesUpdated Jun 18, 2026
5.0/ 5(2 votes)
20100% Positive
Lua Script•355 lines (11829 chars)
local ok, Rayfield = pcall(function()
    return loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
end)

if not ok or not Rayfield then
    local ScreenGui = Instance.new("ScreenGui")
    local Frame = Instance.new("Frame")
    local Label = Instance.new("TextLabel")
    ScreenGui.Parent = game.CoreGui
    Frame.Parent = ScreenGui
    Frame.Size = UDim2.new(0, 200, 0, 50)
    Frame.Position = UDim2.new(0.5, -100, 0, 10)
    Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
    Label.Parent = Frame
    Label.Size = UDim2.new(1, 0, 1, 0)
    Label.Text = "Rayfield failed! Enable HTTP requests."
    Label.TextColor3 = Color3.fromRGB(255, 0, 0)
    Label.BackgroundTransparency = 1
    return
end

local Window = Rayfield:CreateWindow({Name = "Portal Fruit Colors"})
local Tab = Window:CreateTab("Main")

-- Permanent Save System
getgenv().PortalColors = getgenv().PortalColors or {
    color1 = Color3.fromRGB(0, 162, 255),
    color2 = Color3.fromRGB(255, 0, 255),
    dualMode = false,
    spd = 2,
}

local color1 = getgenv().PortalColors.color1
local color2 = getgenv().PortalColors.color2
local spd = getgenv().PortalColors.spd
local dualMode = getgenv().PortalColors.dualMode
local autoV4 = false

local player = game.Players.LocalPlayer
local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")
local VirtualInputManager = game:GetService("VirtualInputManager")

local KEYWORDS = {
    "portal","rift","dimension","gate","warp","dash","void","tear",
    "space","tunnel","fruit","skill","move","effect","vfx","hit",
    "blast","aura","wave","slash","projectile","orb","v4","awaken",
    "awakening","godly","divine","ascend","transform","ultra","mode",
    "power","energy","pulse","surge","burst","glow","ring","halo",
    "thunder","lightning","flame","shadow","radiant","sphere","pillar",
    "nova","rune","mark","sigil","symbol","seal",
    "particle","emitter","trail","impact","explode","explosion",
    "magic","spell","cast","ability","ultimate","special","super",
    "attack","combo","charge","buff","debuff","status","stun",
    "fire","ice","water","wind","earth","poison","electric","holy",
    "death","soul","spirit","ghost","demon","angel","dragon",
    "hurt","damage","strike","smash","crush","shatter",
    "shield","barrier","wall","block","guard","defend",
    "heal","regen","restore","boost","speed","fly","jump",
    "smoke","cloud","mist","fog","dust","sand","snow",
    "star","moon","sun","galaxy","cosmic","astral","celestial",
    "zombie","arena","spawn","boss","mob","enemy","monster",
    "blood","gore","splat","flesh","dead","undead","infected",
    "weapon","gun","sword","knife","axe","bullet","shoot",
    "melee","ranged","shotgun","rifle","pistol","smg",
    "kill","respawn","revive","down","knock","critical",
    "upgrade","level","xp","coin","drop","loot","reward",
    "tower","base","survive","round","timer","countdown",
}

local BODY_PARTS = {
    head=true,torso=true,["left arm"]=true,["right arm"]=true,
    ["left leg"]=true,["right leg"]=true,humanoidrootpart=true,
    uppertorso=true,lowertorso=true,leftupperarm=true,leftelbow=true,
    leftlowerarm=true,leftwrist=true,lefthand=true,rightupperarm=true,
    rightelbow=true,rightlowerarm=true,rightwrist=true,righthand=true,
    leftupperleg=true,leftknee=true,leftlowerleg=true,leftankle=true,
    leftfoot=true,rightupperleg=true,rightknee=true,rightlowerleg=true,
    rightankle=true,rightfoot=true,handle=true,mesh=true,
}

local function nameMatches(name)
    if typeof(name) ~= "string" then return false end
    local lower = name:lower()
    for _, kw in ipairs(KEYWORDS) do
        if lower:find(kw, 1, true) then return true end
    end
    return false
end

local function isBodyPart(v)
    if not v or not v.Parent then return false end
    if BODY_PARTS[v.Name:lower()] then return true end
    local char = player.Character
    if char and v.Parent == char then return true end
    if v.Parent:FindFirstChildOfClass("Humanoid") then return true end
    return false
end

local function getColor()
    if dualMode then
        return Color3.new(
            (color1.R+color2.R)/2,
            (color1.G+color2.G)/2,
            (color1.B+color2.B)/2
        )
    end
    return color1
end

local function buildCS(original)
    if dualMode then return ColorSequence.new(color1, color2) end
    local ok2, kps = pcall(function() return original.Keypoints end)
    if not ok2 or not kps then return ColorSequence.new(color1) end
    if #kps == 2 then return ColorSequence.new(color1) end
    local new = {}
    for i, kp in ipairs(kps) do
        new[i] = ColorSequenceKeypoint.new(kp.Time, color1)
    end
    return ColorSequence.new(new)
end

local function apply(v)
    if not v or not v.Parent then return end
    pcall(function()
        local c = getColor()
        if v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Beam") then
            v.Color = buildCS(v.Color)
        elseif v:IsA("PointLight") or v:IsA("SpotLight") or v:IsA("SurfaceLight") then
            v.Color = c
        elseif v:IsA("BasePart") then
            if isBodyPart(v) then return end
            if v.Material == Enum.Material.Neon or nameMatches(v.Name) or v.Transparency > 0.3 then
                v.Color = c
                v.BrickColor = BrickColor.new(c)
            end
        elseif v:IsA("SpecialMesh") then
            local p = v.Parent
            if p and not isBodyPart(p) and nameMatches(p.Name) then
                v.VertexColor = Vector3.new(c.R, c.G, c.B)
            end
        elseif v:IsA("SurfaceAppearance") then
            local p = v.Parent
            if p and p:IsA("BasePart") and not isBodyPart(p) then p.Color = c end
        elseif v:IsA("Decal") or v:IsA("Texture") then
            local p = v.Parent
            if p and not isBodyPart(p) then v.Color = c end
        elseif v:IsA("SelectionBox") or v:IsA("SelectionSphere") then
            v.Color3 = c 
            v.SurfaceColor3 = c
        elseif v:IsA("ImageLabel") or v:IsA("ImageButton") then
            v.ImageColor3 = c
        elseif v:IsA("Frame") or v:IsA("TextLabel") or v:IsA("TextButton") then
            if v.BackgroundTransparency < 1 then v.BackgroundColor3 = c end
        end
    end)
end

local cached, conns = {}, {}

local function uncache(inst)
    cached[inst] = nil
    if conns[inst] then conns[inst]:Disconnect() conns[inst] = nil end
end

local function cache(inst)
    if not inst or cached[inst] then return end
    cached[inst] = true
    conns[inst] = inst.AncestryChanged:Connect(function()
        if not inst:IsDescendantOf(game) then uncache(inst) end
    end)
end

local function cacheDeep(obj)
    if not obj then return end
    pcall(function()
        apply(obj) cache(obj)
        for _, v in pairs(obj:GetDescendants()) do
            apply(v) cache(v)
        end
    end)
end

local function applyAllCached()
    for inst in pairs(cached) do
        if inst and inst.Parent then
            pcall(apply, inst)
        else
            uncache(inst)
        end
    end
end

local function applyChar()
    local char = player.Character
    if not char then return end
    for _, v in pairs(char:GetDescendants()) do
        if v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Beam") then
            pcall(function() v.Color = buildCS(v.Color) end)
        elseif v:IsA("PointLight") or v:IsA("SpotLight") or v:IsA("SurfaceLight") then
            pcall(function() v.Color = getColor() end)
        elseif v:IsA("BasePart") and not isBodyPart(v) and nameMatches(v.Name) then
            pcall(function()
                local c = getColor()
                v.Color = c
                v.BrickColor = BrickColor.new(c)
            end)
        end
    end
end

local rainbowConn, watcherConn, monitorConn

local function rainbowToggle(on)
    if rainbowConn then rainbowConn:Disconnect() rainbowConn = nil end
    if not on then return end
    local h = 0
    rainbowConn = RunService.RenderStepped:Connect(function(dt)
        h = (h + dt * spd * 0.1) % 1
        color1 = Color3.fromHSV(h, 1, 1)
        if dualMode then color2 = Color3.fromHSV((h + 0.5) % 1, 1, 1) end
    end)
end

local function startWatcher()
    if watcherConn then watcherConn:Disconnect() end
    watcherConn = Workspace.DescendantAdded:Connect(function(obj)
        if not obj or not obj.Parent then return end
        task.wait()
        if nameMatches(obj.Name) then
            cacheDeep(obj)
        elseif obj.Parent and nameMatches(obj.Parent.Name) then
            apply(obj) cache(obj)
        end
    end)
end

local function startMonitor()
    if monitorConn then monitorConn:Disconnect() end
    monitorConn = RunService.Heartbeat:Connect(function()
        applyChar()
        applyAllCached()
    end)
end

local function refreshAll()
    applyChar()
    applyAllCached()
end

local function saveColors()
    getgenv().PortalColors.color1 = color1
    getgenv().PortalColors.color2 = color2
    getgenv().PortalColors.dualMode = dualMode
    getgenv().PortalColors.spd = spd
    Rayfield:Notify({Title="Saved", Content="Colors saved permanently! Next script load will use these.", Duration=5})
end

-- ==================== AUTO V4 ====================
local function isPortalEquipped()
    local char = player.Character
    if not char then return false end
    local tool = char:FindFirstChildOfClass("Tool")
    return tool and tool.Name:find("Portal")
end

local function isV4Ready()
    local char = player.Character
    if not char then return false end
    local hum = char:FindFirstChild("Humanoid")
    if not hum or hum.Health <= 0 then return false end
    return true
end

local v4Conn

local function toggleAutoV4(state)
    autoV4 = state
    if v4Conn then v4Conn:Disconnect() v4Conn = nil end
    if not state then return end

    v4Conn = RunService.Heartbeat:Connect(function()
        if not autoV4 then return end
        if not isPortalEquipped() then return end
        if not isV4Ready() then return end

        pcall(function()
            VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.Y, false, game)
            task.wait(0.1)
            VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.Y, false, game)
        end)
        task.wait(15)
    end)
end

-- ==================== UI ====================

Tab:CreateColorPicker({Name="Color 1", Color=color1, Callback=function(v)
    rainbowToggle(false)
    color1 = v
    refreshAll()
end})

Tab:CreateColorPicker({Name="Color 2 (Dual Mode)", Color=color2, Callback=function(v)
    rainbowToggle(false)
    color2 = v
    refreshAll()
end})

Tab:CreateToggle({Name="Dual Color Mode", CurrentValue=dualMode, Callback=function(v)
    dualMode = v
    refreshAll()
end})

Tab:CreateToggle({Name="Rainbow", Callback=rainbowToggle})

Tab:CreateSlider({Name="Rainbow Speed", Range={0.5,5}, CurrentValue=spd, Callback=function(v) 
    spd = v 
end})

Tab:CreateToggle({Name="Auto V4 Transformation", CurrentValue=false, Callback=function(v)
    toggleAutoV4(v)
end})

Tab:CreateButton({Name="Save Colors Permanently", Callback=saveColors})

Tab:CreateButton({Name="Apply & Monitor", Callback=function()
    startMonitor() 
    startWatcher() 
    refreshAll()
end})

Tab:CreateButton({Name="Join Discord Server", Callback=function()
    setclipboard("https://discord.gg/3Gx5MDHqF")
    Rayfield:Notify({Title="Discord", Content="Invite copied!", Duration=3})
end})

player.CharacterAdded:Connect(function()
    task.wait(1.5)
    applyChar()
    startMonitor()
    startWatcher()
end)

local char = player.Character or player.CharacterAdded:Wait()
task.wait(2)
startMonitor()
startWatcher()
applyChar()

Rayfield:Notify({
    Title = "Portal Fruit Colors",
    Content = "Loaded! Use 'Save Colors Permanently' to keep your settings.",
    Duration = 6
})

Features & Information

Idk

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts