#Error code
1 messages · Page 1 of 1 (latest)
i neeed the full script
here all
coudl you copy and paste
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local camera = game.Workspace.CurrentCamera
local aimCF = CFrame.new()
local isAiming = false
local currenSwayAMT = 1
local swayAMT = .1;
local aimSwayAMT = .1;
local swayCF = CFrame.new()
local lastCameraCF = CFrame.new()
local framework = {
inventory = {
"AK74";
"BERETTA";
"Knife";
"Frag";
};
module = nil;
viewmodel = nil;
currentSlot = 1;
}
function loadslot(Item)
local viewmodelFolder = game.ReplicatedStorage.ViewModels
local moduleFolder = game.ReplicatedStorage.Modules
for i,v in pairs(camera:GetChildren())do
if v:IsA("Model") then
v:Destroy()
end
end
if moduleFolder:FindFirstChild(Item) then
framework.module = require(moduleFolder:FindFirstChild(Item))
if viewmodelFolder:FindFirstChild(Item) then
framework.viewmodel = viewmodelFolder:FindFirstChild(Item):Clone()
framework.viewmodel.Parent = camera
end
end
end
RunService.RenderStepped:Connect(function()
local rot = camera.CFrame:ToObjectSpace(lastCameraCF)
local X,Y,Z = rot:ToOrientation()
swayCF = swayCF:Lerp(CFrame.Angles(math.sin(X) * currenSwayAMT, math.sin(Y) * currenSwayAMT, 0), .1)
lastCameraCF = camera.CFrame
local humanoid = character:WaitForChild("Humanoid")
if humanoid then
local bobOffset = CFrame.new(humanoid.CameraOffset.X, humanoid.CameraOffset.Y, humanoid.CameraOffset.Z)
for i, v in pairs(camera:GetChildren()) do
if v:IsA("Model") then
v:SetPrimaryPartCFrame(camera.CFrame * swayCF * aimCF)
end
end
if isAiming and framework.viewmodel ~= nil and framework.module.canAim then
local offset = framework.viewmodel.AimPart.CFrame:ToObjectSpace(framework.viewmodel.PrimaryPart.CFrame)
aimCF = aimCF:Lerp(offset, framework.module.aimSmooth)
currenSwayAMT = aimSwayAMT
else
local offset = CFrame.new()
aimCF = aimCF:Lerp(offset, framework.module.aimSmooth)
currenSwayAMT = swayAMT
end
end
loadslot(framework.inventory[1])
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.One then
if framework.currentSlot ~= 1 then
loadslot(framework.inventory[1])
framework.currentSlot = 1
end
end
if input.KeyCode == Enum.KeyCode.Two then
if framework.currentSlot ~= 2 then
loadslot(framework.inventory[2])
framework.currentSlot = 2
end
end
if input.UserInputType == Enum.UserInputType.MouseButton2 then
isAiming = true
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton2 then
isAiming = false
end
end)
its end) not end on line 78
I already tried it and it didn't work
more errors
** You are now Level 1! **
whatd you change in that script
omg it was just missing an end) at the bottom
moving loadslot(framework.inventory[1]) outside of the RenderStepped connection and placing it before the InputBegan connection.
ur missing an end for if humanoid then
OHHHH
did it work
its working thank you so much
np
idk how i also oversaw those inputbegans, ig ur just him
How did you find the error so quickly?
hes just him
liek @gritty steeple said im him
the thing is, if it works, it's better not to touch it

EH-
5billion robux
no 5 trillion
nuhuh 5 quadrillion
oh ya 5 quintillion
cya
