PROJECT FIVE NIGHTS AT RICARDOS ZIP
I TRY To IMPORT THE ZIP BUT I CANT WHEN I UPLOAD IT IT LOADS THEN DISSAPEARS, LIKE SHREK
--shrek.script
local function start(self)
msg.post("#sprite", "play_animation", {id = hash("shrek_idle")} )
go.set_scale(vmath.vector3(0.3, 0.3, 0.3))
go.set_position(vmath.vector3(0, 80, 1))
self.scale = true
end
local function attack(self)
self.attacking = true
msg.post("#sprite", "play_animation", {id = hash("shrek_active")} )
self.attack_timer = delay.seconds(4, function(self)
msg.post("/manager#manager", "shrek")
end)
end
local function dwell(self)
go.set_position(vmath.vector3(self.player_pos.x, self.player_pos.y, 50), "black")
go.set_scale(vmath.vector3(7, 7, 7))
for x = self.player_pos.x + 640, self.player_pos.x - 640, -10 do
go.set_position(vmath.vector3(x, self.player_pos.y, 51))
if x <= self.player_pos.x - 640 then
go.set_position(vmath.vector3(0, -5000, 0), "black")
go.set_position(vmath.vector3(0, -5000, 0))
end
end
end
function init(self)
msg.post(".", "acquire_input_focus")
self.busy = false
self.scale = false
self.scale_count = 0.3
self.mask = false
self.mask_already = false
self.attacking = false
end
function update(self, dt)
if self.busy == false then
self.chance = rnd.range(1, 1000)
if self.chance > 1 then
start(self)
self.busy = true
end
end
if self.scale == true then
self.scale_count = self.scale_count + 0.025
if self.scale_count < 0.8 then
go.set_scale(vmath.vector3(self.scale_count, self.scale_count, self.scale_count))
else
go.set_scale(vmath.vector3(0.8, 0.8, 0.8))
msg.post("#sprite", "play_animation", {id = hash("shrek_ready")} )
self.scale_count = 0.3
self.scale = false
self.timer = delay.seconds(10, function(self)
self.attack = true
delay.cancel(self.timer)
end)
end
end
if self.attack == true then
self.chance = rnd.range(1, 1000)
if self.chance > 0 then
attack(self)
self.attack = false
end
end
if self.mask == true and self.attacking == true and self.mask_already == false then
delay.cancel(self.attack_timer)
msg.post("/screen#screen_notification", "shrek")
self.mask_already = true
end
end
function on_message(self, message_id, message, sender)
if message_id == hash("pos") then
self.player_pos = message.pos
dwell(self)
end
end
function on_input(self, action_id, action)
if action_id == hash("mask") then
if self.mask == true then
self.mask = false
elseif self.mask == false then
self.mask = true
end
end
end
i called it cyberserked because i was suppose to draw out driods but i was too lazy so i used dead memes instead
so shrek (those who know fnaf it is exactly like toy freddy from fnaf2) is suppose to show up walking down the corridor, then he stands there for 10 seconds and turns into attack mode randomly, then u have 4 seconds to react and wear a mask, if u do not react shrek sends a message to the jumpscare controller to jumpscare u, if u react he will dwell which is just having darkness covering the screen while shrek moves from right to left. the he is gone