Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
37 views8 pages

Main Lua

The document is a Lua script for a game that creates a user interface using Rayfield, allowing players to execute various functions such as flying, adjusting walk speed, and aim locking. It includes features for Discord integration, a key system, and notifications for user actions. The script also contains detailed functions for controlling player movement and targeting other players in the game.

Uploaded by

tuande389
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)
37 views8 pages

Main Lua

The document is a Lua script for a game that creates a user interface using Rayfield, allowing players to execute various functions such as flying, adjusting walk speed, and aim locking. It includes features for Discord integration, a key system, and notifications for user actions. The script also contains detailed functions for controlling player movement and targeting other players in the game.

Uploaded by

tuande389
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
You are on page 1/ 8

local Rayfield = loadstring(game:HttpGet('https://sirius.

menu/rayfield'))()

local Window = Rayfield:CreateWindow({


Name = "Niagra",
LoadingTitle = "Niagra Hub",
LoadingSubtitle = "by _parper",
ConfigurationSaving = {
Enabled = false,
FolderName = nil, -- Create a custom folder for your hub/game
FileName = "NiagraDahoodScript"
},
Discord = {
Enabled = true,
Invite = "YTRzZscT", -- The Discord invite code, do not include discord.gg/.
E.g. discord.gg/ABCD would be ABCD
RememberJoins = true -- Set this to false to make them join the discord every
time they load it up
},
KeySystem = false, -- Set this to true to use our key system
KeySettings = {
Title = "Untitled",
Subtitle = "Key System",
Note = "No method of obtaining the key is provided",
FileName = "Key", -- It is recommended to use something unique as other
scripts using Rayfield may overwrite your key file
SaveKey = true, -- The user's key will be saved, but if you change the key,
they will be unable to use your script
GrabKeyFromSite = false, -- If this is true, set Key below to the RAW site
you would like Rayfield to get the key from
Key = {"Hello"} -- List of keys that will be accepted by the system, can be
RAW file links (pastebin, github etc) or simple strings ("hello","key22")
}
})

local MainTab = Window:CreateTab("Main", nil) -- Title, Image


local MainSection = MainTab:CreateSection("Main")

Rayfield:Notify({
Title = "EXECUTED",
Content = "GOOD LUCK",
Duration = 3,
Image = nil,
Actions = { -- Notification Buttons
Ignore = {
Name = "ADVANCE",
Callback = function()
print("The user tapped Okay!")
end
},
},
})

local Button = MainTab:CreateButton({


Name = "Fly(X)",
Callback = function()
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()

localplayer = plr
if workspace:FindFirstChild("Core") then
workspace.Core:Destroy()
end

local Core = Instance.new("Part")


Core.Name = "Core"
Core.Size = Vector3.new(0.05, 0.05, 0.05)

spawn(function()
Core.Parent = workspace
local Weld = Instance.new("Weld", Core)
Weld.Part0 = Core
Weld.Part1 = localplayer.Character.LowerTorso
Weld.C0 = CFrame.new(0, 0, 0)
end)

workspace:WaitForChild("Core")

local torso = workspace.Core


flying = true
local speed=10
local keys={a=false,d=false,w=false,s=false}
local e1
local e2
local function start()
local pos = Instance.new("BodyPosition",torso)
local gyro = Instance.new("BodyGyro",torso)
pos.Name="EPIXPOS"
pos.maxForce = Vector3.new(math.huge, math.huge, math.huge)
pos.position = torso.Position
gyro.maxTorque = Vector3.new(9e9, 9e9, 9e9)
gyro.cframe = torso.CFrame
repeat
wait()
localplayer.Character.Humanoid.PlatformStand=true
local new=gyro.cframe - gyro.cframe.p + pos.position
if not keys.w and not keys.s and not keys.a and not keys.d then
speed=5
end
if keys.w then
new = new + workspace.CurrentCamera.CoordinateFrame.lookVector * speed
speed=speed+0
end
if keys.s then
new = new - workspace.CurrentCamera.CoordinateFrame.lookVector * speed
speed=speed+0
end
if keys.d then
new = new * CFrame.new(speed,0,0)
speed=speed+0
end
if keys.a then
new = new * CFrame.new(-speed,0,0)
speed=speed+0
end
if speed>10 then
speed=5
end
pos.position=new.p
if keys.w then
gyro.cframe = workspace.CurrentCamera.CoordinateFrame*CFrame.Angles(-
math.rad(speed*0),0,0)
elseif keys.s then
gyro.cframe =
workspace.CurrentCamera.CoordinateFrame*CFrame.Angles(math.rad(speed*0),0,0)
else
gyro.cframe = workspace.CurrentCamera.CoordinateFrame
end
until flying == false
if gyro then gyro:Destroy() end
if pos then pos:Destroy() end
flying=false
localplayer.Character.Humanoid.PlatformStand=false
speed=10
end
e1=mouse.KeyDown:connect(function(key)
if not torso or not torso.Parent then flying=false e1:disconnect() e2:disconnect()
return end
if key=="w" then
keys.w=true
elseif key=="s" then
keys.s=true
elseif key=="a" then
keys.a=true
elseif key=="d" then
keys.d=true
elseif key=="x" then
if flying==true then
flying=false
else
flying=true
start()
end
end
end)
e2=mouse.KeyUp:connect(function(key)
if key=="w" then
keys.w=false
elseif key=="s" then
keys.s=false
elseif key=="a" then
keys.a=false
elseif key=="d" then
keys.d=false
end
end)
end,
})

local Slider = MainTab:CreateSlider({


Name = "WalkSpeed",
Range = {0, 1000},
Increment = 1,
Suffix = "Speed",
CurrentValue = 16,
Flag = "Slider1", -- A flag is the identifier for the configuration file, make
sure every element has a different flag if you're using configuration saving to
ensure no overlaps
Callback = function(Value)
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = (Value)
end,
})

local Button = MainTab:CreateButton({


Name = "Speed Tools(Z)",
Callback = function()
local AkaliNotif =
loadstring(game:HttpGet("https://raw.githubusercontent.com/Kinlei/Dynissimo/main/
Scripts/AkaliNotif.lua"))();
local Notify = AkaliNotif.Notify;
Notify({
Description = "Subscribe to parper.dahood on YouTube";
Title = "_parper On Discord";
Duration = 15;
});
getgenv().Speed = true
getgenv().FakeMacro = true
loadstring(game:HttpGet("https://raw.githubusercontent.com/Allvideo/nukermode/
main/Kit%20tools.txt"))()
end,
})

local MainTab = Window:CreateTab("Combat") -- Title, Image


local MainSection = MainTab:CreateSection("Aimlock")

local Button = MainTab:CreateButton({


Name = "Aimlock(Q)",
Callback = function()
getgenv().Prediction = 0.15038
getgenv().AimPart = "HumanoidRootPart"
getgenv().Key = "Q"
getgenv().DisableKey = "P"

getgenv().FOV = true
getgenv().ShowFOV = false
getgenv().FOVSize = 55

--// Variables (Service)

local Players = game:GetService("Players")


local RS = game:GetService("RunService")
local WS = game:GetService("Workspace")
local GS = game:GetService("GuiService")
local SG = game:GetService("StarterGui")

--// Variables (regular)

local LP = Players.LocalPlayer
local Mouse = LP:GetMouse()
local Camera = WS.CurrentCamera
local GetGuiInset = GS.GetGuiInset

local AimlockState = true


local Locked
local Victim
local SelectedKey = getgenv().Key
local SelectedDisableKey = getgenv().DisableKey

--// Notification function

function Notify(tx)
SG:SetCore("SendNotification", {
Title = "Cam Lock Enabled | .gg/YTRzZscT",
Text = tx,
Duration = 5
})
end

--// Check if aimlock is loaded

if getgenv().Loaded == true then


Notify("Aimlock is already loaded!")
return
end

getgenv().Loaded = true

--// FOV Circle

local fov = Drawing.new("Circle")


fov.Filled = false
fov.Transparency = 1
fov.Thickness = 1
fov.Color = Color3.fromRGB(255, 255, 0)
fov.NumSides = 1000

--// Functions

function update()
if getgenv().FOV == true then
if fov then
fov.Radius = getgenv().FOVSize * 2
fov.Visible = getgenv().ShowFOV
fov.Position = Vector2.new(Mouse.X, Mouse.Y + GetGuiInset(GS).Y)

return fov
end
end
end

function WTVP(arg)
return Camera:WorldToViewportPoint(arg)
end

function WTSP(arg)
return Camera.WorldToScreenPoint(Camera, arg)
end

function getClosest()
local closestPlayer
local shortestDistance = math.huge

for i, v in pairs(game.Players:GetPlayers()) do
local notKO = v.Character:WaitForChild("BodyEffects")["K.O"].Value ~= true
local notGrabbed = v.Character:FindFirstChild("GRABBING_COINSTRAINT") ==
nil

if v ~= game.Players.LocalPlayer and v.Character and


v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health ~= 0 and
v.Character:FindFirstChild(getgenv().AimPart) and notKO and notGrabbed then
local pos =
Camera:WorldToViewportPoint(v.Character.PrimaryPart.Position)
local magnitude = (Vector2.new(pos.X, pos.Y) - Vector2.new(Mouse.X,
Mouse.Y)).magnitude

if (getgenv().FOV) then
if (fov.Radius > magnitude and magnitude < shortestDistance) then
closestPlayer = v
shortestDistance = magnitude
end
else
if (magnitude < shortestDistance) then
closestPlayer = v
shortestDistance = magnitude
end
end
end
end
return closestPlayer
end

--// Checks if key is down

Mouse.KeyDown:Connect(function(k)
SelectedKey = SelectedKey:lower()
SelectedDisableKey = SelectedDisableKey:lower()
if k == SelectedKey then
if AimlockState == true then
Locked = not Locked
if Locked then
Victim = getClosest()

Notify("Locked onto:
"..tostring(Victim.Character.Humanoid.DisplayName))
else
if Victim ~= nil then
Victim = nil

Notify("Unlocked!")
end
end
else
Notify("Aimlock is not enabled!")
end
end
if k == SelectedDisableKey then
AimlockState = not AimlockState
end
end)

--// Loop update FOV and loop camera lock onto target

RS.RenderStepped:Connect(function()
update()
if AimlockState == true then
if Victim ~= nil then
Camera.CFrame = CFrame.new(Camera.CFrame.p,
Victim.Character[getgenv().AimPart].Position +
Victim.Character[getgenv().AimPart].Velocity*getgenv().Prediction)
end
end
end)
while wait() do
if getgenv().AutoPrediction == true then
local pingvalue = game:GetService("Stats").Network.ServerStatsItem["Data
Ping"]:GetValueString()
local split = string.split(pingvalue,'(')
local ping = tonumber(split[1])
if ping < 225 then
getgenv().Prediction = 1.4
elseif ping < 215 then
getgenv().Prediction = 1.2
elseif ping < 205 then
getgenv().Prediction = 1.0
elseif ping < 190 then
getgenv().Prediction = 0.10
elseif ping < 180 then
getgenv().Prediction = 0.12
elseif ping < 170 then
getgenv().Prediction = 0.15
elseif ping < 160 then
getgenv().Prediction = 0.18
elseif ping < 150 then
getgenv().Prediction = 0.110
elseif ping < 140 then
getgenv().Prediction = 0.113
elseif ping < 130 then
getgenv().Prediction = 0.116
elseif ping < 120 then
getgenv().Prediction = 0.120
elseif ping < 110 then
getgenv().Prediction = 0.124
elseif ping < 105 then
getgenv().Prediction = 0.127
elseif ping < 90 then
getgenv().Prediction = 0.130
elseif ping < 80 then
getgenv().Prediction = 0.133
elseif ping < 70 then
getgenv().Prediction = 0.136
elseif ping < 60 then
getgenv().Prediction = 0.15038
elseif ping < 50 then
getgenv().Prediction = 0.15038
elseif ping < 40 then
getgenv().Prediction = 0.145
elseif ping < 30 then
getgenv().Prediction = 0.155
elseif ping < 20 then
getgenv().Prediction = 0.157
end
end
end
end,
})

You might also like