RobloxScripTTPoster

(Doors) Toma's Lantern Script

Dec 26th, 2022
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.63 KB | None | 0 0
  1. local Achievements = loadstring(game:HttpGet("https://raw.githubusercontent.com/RegularVynixu/Utilities/main/Doors/Custom%20Achievements/Source.lua"))()
  2.  
  3. -- Creates and displays your custom achievement
  4. Achievements.Get({
  5. Title = "Lanterned",
  6. Desc = "You Have Aquired The Lantern",
  7. Reason = "Use It To Protect Yourself",
  8. Image = "https://tr.rbxcdn.com/65c40cf06a422acfd2e0aeb668eab2b0/420/420/Model/Png",
  9. })firesignal(game.ReplicatedStorage.Bricks.Caption.OnClientEvent, "Lantern By Toma")
  10. wait(2)
  11. firesignal(game.ReplicatedStorage.Bricks.Caption.OnClientEvent, "Toma#2080")
  12. wait(2)
  13. firesignal(game.ReplicatedStorage.Bricks.Caption.OnClientEvent, "With The Help Of Zepsyy")
  14. local function IsVisible(part)
  15. local vec, found=workspace.CurrentCamera:WorldToViewportPoint(part.Position)
  16. local onscreen = found and vec.Z > 0
  17. local cfg = RaycastParams.new()
  18. cfg.FilterType = Enum.RaycastFilterType.Blacklist
  19. cfg.FilterDescendantsInstances = {part}
  20.  
  21. local cast = workspace:Raycast(part.Position, (game.Players.LocalPlayer.Character.UpperTorso.Position - part.Position), cfg)
  22. if onscreen then
  23. if cast and (cast and cast.Instance).Parent==game.Players.LocalPlayer.Character then
  24. return true
  25. end
  26. end
  27. end
  28.  
  29. local Equipped = false
  30.  
  31. -- Edit this --
  32. getgenv().spawnKey = Enum.KeyCode.F4
  33. ---------------
  34.  
  35. -- Services
  36.  
  37. local Players = game:GetService("Players")
  38. local UIS = game:GetService("UserInputService")
  39.  
  40. -- Variables
  41.  
  42. local Plr = Players.LocalPlayer
  43. local Char = Plr.Character or Plr.CharacterAdded:Wait()
  44. local Hum = Char:WaitForChild("Humanoid")
  45. local Root = Char:WaitForChild("HumanoidRootPart")
  46. local RightArm = Char:WaitForChild("RightUpperArm")
  47. local LeftArm = Char:WaitForChild("LeftUpperArm")
  48.  
  49. local RightC1 = RightArm.RightShoulder.C1
  50. local LeftC1 = LeftArm.LeftShoulder.C1
  51.  
  52. local SelfModules = {
  53. Functions = loadstring(
  54. game:HttpGet("https://raw.githubusercontent.com/RegularVynixu/Utilities/main/Functions.lua")
  55. )(),
  56. CustomShop = loadstring(
  57. game:HttpGet(
  58. "https://raw.githubusercontent.com/RegularVynixu/Utilities/main/Doors/Custom%20Shop%20Items/Source.lua"
  59. )
  60. )(),
  61. }
  62.  
  63. local ModuleScripts = {
  64. MainGame = require(Plr.PlayerGui.MainUI.Initiator.Main_Game),
  65. SeekIntro = require(Plr.PlayerGui.MainUI.Initiator.Main_Game.RemoteListener.Cutscenes.SeekIntro),
  66. }
  67.  
  68. -- Functions
  69.  
  70. local function setupCrucifix(tool)
  71. tool.Equipped:Connect(function()
  72. Equipped = true
  73. Char:SetAttribute("Hiding", true)
  74. for _, v in next, Hum:GetPlayingAnimationTracks() do
  75. v:Stop()
  76. end
  77.  
  78. RightArm.Name = "R_Arm"
  79. LeftArm.Name = "L_Arm"
  80.  
  81. RightArm.RightShoulder.C1 = RightC1 * CFrame.Angles(math.rad(-90), math.rad(-15), 0)
  82. LeftArm.LeftShoulder.C1 = LeftC1
  83. * CFrame.new(-0.2, -0.3, -0.5)
  84. * CFrame.Angles(math.rad(-125), math.rad(25), math.rad(25))
  85. end)
  86.  
  87. tool.Unequipped:Connect(function()
  88. Equipped = false
  89. Char:SetAttribute("Hiding", nil)
  90. RightArm.Name = "RightUpperArm"
  91. LeftArm.Name = "LeftUpperArm"
  92.  
  93. RightArm.RightShoulder.C1 = RightC1
  94. LeftArm.LeftShoulder.C1 = LeftC1
  95. end)
  96. end
  97.  
  98. -- Scripts
  99.  
  100. local CrucifixTool = game:GetObjects("rbxassetid://11852289991")[1]
  101. CrucifixTool.Name = "Crucifix"
  102. CrucifixTool.Parent = game.Players.LocalPlayer.Backpack
  103.  
  104. -- game.UserInputService.InputBegan:Connect(function(input, proc)
  105. -- if proc then return end
  106.  
  107. -- if input.KeyCode == input.KeyCode[getgenv().spawnKey] then
  108. -- local CrucifixTool = game:GetObjects("rbxassetid://11590476113")[1]
  109. -- CrucifixTool.Name = "Crucifix"
  110. -- CrucifixTool.Parent = game.Players.LocalPlayer.Backpack
  111. -- end
  112. -- end)
  113. -- Input handler
  114.  
  115. setupCrucifix(CrucifixTool)
  116.  
  117. local Players = game:GetService("Players")
  118. local UIS = game:GetService("UserInputService")
  119.  
  120. -- Variables
  121.  
  122. local Plr = Players.LocalPlayer
  123. local Char = Plr.Character or Plr.CharacterAdded:Wait()
  124. local Hum = Char:WaitForChild("Humanoid")
  125. local Root = Char:WaitForChild("HumanoidRootPart")
  126.  
  127. local dupeCrucifix = Instance.new("BindableEvent")
  128. local function func(ins)
  129. wait(.01) -- Wait for the attribute
  130. if ins:GetAttribute("IsCustomEntity")==true and ins:GetAttribute("ClonedByCrucifix")~=true then
  131. local Chains = game:GetObjects("rbxassetid://11852289991")[1]
  132. Chains.Parent = workspace
  133. local chained = true
  134. local posTime = false
  135. local rotTime = false
  136. local tweenTime = false
  137. local intFound = true
  138.  
  139. game:GetService("RunService").RenderStepped:Connect(function()
  140. if Equipped then
  141. if ins.Parent~=nil and ins.PrimaryPart and IsVisible(ins.PrimaryPart) and (Root.Position-ins.PrimaryPart.Position).magnitude <= 25 then
  142. local c=ins:Clone()
  143. c:SetAttribute("ClonedByCrucifix", true)
  144. c.RushNew.Anchored=true
  145. c.Parent=ins.Parent
  146. ins:Destroy()
  147. dupeCrucifix:Fire(6,c.RushNew)
  148.  
  149.  
  150.  
  151. -- Chains.PrimaryPart.Orientation = Chains.PrimaryPart.Orientation + Vector3.new(0, 3, 0)
  152.  
  153. local EntityRoot = c:FindFirstChild("RushNew")
  154.  
  155. if EntityRoot then
  156.  
  157.  
  158.  
  159. local Fake_FaceAttach = Instance.new("Attachment")
  160. Fake_FaceAttach.Parent = EntityRoot
  161.  
  162.  
  163. for i, beam in pairs(Chains:GetDescendants()) do
  164. if beam:IsA("BasePart") then
  165. beam.CanCollide = false
  166. end
  167. if beam.Name == "Beam" then
  168. beam.Attachment1 = Fake_FaceAttach
  169. end
  170. end
  171.  
  172. if not posTime then
  173. Chains:SetPrimaryPartCFrame(
  174. EntityRoot.CFrame * CFrame.new(0, -3.5, 0) * CFrame.Angles(math.rad(90), 0, 0)
  175. )
  176. posTime = true
  177. end
  178.  
  179. task.wait(1.35)
  180. if not tweenTime then
  181.  
  182. task.spawn(function()
  183. while task.wait() do
  184. if Chains:FindFirstChild('Base') then
  185. Chains.Base.CFrame = Chains.Base.CFrame * CFrame.Angles(0,0 , math.rad(0.5))
  186. end
  187. end
  188. end)
  189.  
  190. task.spawn(function()
  191. while task.wait() do
  192. for i, beam in pairs(Chains:GetDescendants()) do
  193. if beam.Name == "Beam" then
  194. beam.TextureLength = beam.TextureLength+0.035
  195. end
  196. end
  197. end
  198. end)
  199.  
  200.  
  201. game.TweenService
  202. :Create(
  203. EntityRoot,
  204. TweenInfo.new(6),
  205. { CFrame = EntityRoot.CFrame * CFrame.new(0, 50, 0) }
  206. )
  207. :Play()
  208.  
  209.  
  210. tweenTime = true
  211. task.wait(1.5)
  212. intFound = false
  213. game:GetService("Debris"):AddItem(c, 0)
  214. game:GetService("Debris"):AddItem(Chains, 0)
  215. end
  216. end
  217. end
  218. end
  219. end)
  220. elseif ins.Name=="Lookman" then
  221. local c=ins
  222. task.spawn(function()
  223. repeat task.wait() until IsVisible(c.Core) and Equipped and c.Core.Attachment.Eyes.Enabled==true
  224. local pos=c.Core.Position
  225. dupeCrucifix:Fire(18.364, c.Core)
  226. task.spawn(function()
  227. c:SetAttribute("Killing", true)
  228. ModuleScripts.MainGame.camShaker:ShakeOnce(10, 10, 5, 0.15)
  229. wait(5)
  230. c.Core.Initiate:Stop()
  231. for i=1,3 do
  232. c.Core.Repent:Play()
  233. c.Core.Attachment.Angry.Enabled=true
  234. ModuleScripts.MainGame.camShaker:ShakeOnce(8, 8, 1.3, 0.15)
  235. delay(c.Core.Repent.TimeLength, function() c.Core.Attachment.Angry.Enabled=false end)
  236. wait(4)
  237. end
  238. c.Core.Scream:Play();
  239. ModuleScripts.MainGame.camShaker:ShakeOnce(8, 8, c.Core.Scream.TimeLength, 0.15);
  240. (c.Core:FindFirstChild"whisper" or c.Core:FindFirstChild"Ambience"):Stop()
  241. for _, l in pairs(c:GetDescendants()) do
  242. if l:IsA("PointLight") then
  243. l.Enabled=false
  244. end
  245. end
  246. game:GetService("TweenService"):Create(c.Core, TweenInfo.new(c.Core.Scream.TimeLength, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {
  247. CFrame=CFrame.new(c.Core.CFrame.X, c.Core.CFrame.Y-12, c.Core.CFrame.Z)
  248. }):Play()
  249. end)
  250. local col=game.Players.LocalPlayer.Character.Collision
  251.  
  252. local function CFrameToOrientation(cf)
  253. local x, y, z = cf:ToOrientation()
  254. return Vector3.new(math.deg(x), math.deg(y), math.deg(z))
  255. end
  256.  
  257. while c.Parent~=nil and c.Core.Attachment.Eyes.Enabled==true do
  258. -- who's the boss now huh?
  259. col.Orientation = CFrameToOrientation(CFrame.lookAt(col.Position, pos)*CFrame.Angles(0, math.pi, 0))
  260. task.wait()
  261. end
  262. end)
  263. elseif ins.Name=="Shade" and ins.Parent==workspace.CurrentCamera and ins:GetAttribute("ClonedByCrucifix")==nil then
  264. task.spawn(function()
  265. repeat task.wait() until IsVisible(ins) and (Root.Position-ins.Position).Magnitude <= 12.5 and Equipped
  266.  
  267. local clone = ins:Clone()
  268.  
  269. clone.CFrame = ins.CFrame
  270. clone.Parent = ins.Parent
  271. clone.Anchored = true
  272.  
  273. ins:Remove()
  274.  
  275. dupeCrucifix:Fire(13, ins)
  276. ModuleScripts.MainGame.camShaker:ShakeOnce(40, 10, 5, 0.15)
  277.  
  278.  
  279.  
  280. for _, thing in pairs(clone:GetDescendants()) do
  281. if thing:IsA("SpotLight") then
  282. game:GetService("TweenService"):Create(thing, TweenInfo.new(5), {
  283. Brightness=thing.Brightness*5
  284. }):Play()
  285. elseif thing:IsA("Sound") and thing.Name~="Burst" then
  286. game:GetService("TweenService"):Create(thing, TweenInfo.new(5), {
  287. Volume=0
  288. }):Play()
  289. elseif thing:IsA("TouchTransmitter") then thing:Destroy() end
  290. end
  291.  
  292. for _, pc in pairs(clone:GetDescendants()) do
  293. if pc:IsA("ParticleEmitter") then
  294. pc.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 0, 4)), ColorSequenceKeypoint.new(0.48, Color3.fromRGB(182, 0, 3)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(255, 0, 4))}
  295. end
  296. end
  297.  
  298. local Original_color = {}
  299.  
  300. local light
  301. light = game.Lighting["Ambience_Shade"]
  302. game:GetService("TweenService"):Create(light, TweenInfo.new(1), {
  303.  
  304.  
  305. }):Play()
  306.  
  307. wait(5)
  308.  
  309. clone.Burst.PlaybackSpeed=0.5
  310. clone.Burst:Stop()
  311. clone.Burst:Play()
  312. light.TintColor = Color3.fromRGB(215,253,255)
  313. game:GetService("TweenService"):Create(clone, TweenInfo.new(6), {
  314. CFrame=CFrame.new(clone.CFrame.X, clone.CFrame.Y-12, clone.CFrame.Z)
  315. }):Play()
  316. wait(8.2)
  317.  
  318. game:GetService("Debris"):AddItem(clone, 0)
  319. game.ReplicatedStorage.Bricks.ShadeResult:FireServer()
  320. end)
  321. end
  322. end
  323.  
  324. workspace.ChildAdded:Connect(func)
  325. workspace.CurrentCamera.ChildAdded:Connect(func)
  326. for _, thing in pairs(workspace:GetChildren()) do
  327. func(thing)
  328. end
  329. dupeCrucifix.Event:Connect(function(time, entityRoot)
  330. local Cross = game:GetObjects("11852289991")[1]
  331. Cross.Parent = workspace
  332.  
  333. local fakeCross = Cross.Handle
  334.  
  335. -- fakeCross:FindFirstChild("EffectLight").Enabled = true
  336.  
  337. ModuleScripts.MainGame.camShaker:ShakeOnce(35, 25, 0.15, 0.15)
  338. -- you tell me i didnt make?
  339. fakeCross.CFrame = CFrame.lookAt(CrucifixTool.Handle.Position, entityRoot.Position)
  340.  
  341. -- hl.Parent = model
  342. -- hl.FillTransparency = 1
  343. -- hl.OutlineColor = Color3.fromRGB(75, 177, 255)
  344. fakeCross.Anchored = true
  345.  
  346. CrucifixTool:Destroy()
  347.  
  348. -- for i, v in pairs(fakeCross:GetChildren()) do
  349. -- if v.Name == "E" and v:IsA("BasePart") then
  350. -- v.Transparency = 0
  351. -- v.CanCollide = false
  352. -- end
  353. -- if v:IsA("Motor6D") then
  354. -- v.Name = "Motor6D"
  355. -- end
  356. -- end
  357.  
  358. task.wait(time)
  359. fakeCross.Anchored = false
  360. fakeCross.CanCollide = true
  361. task.wait(0.5)
  362. Cross:Remove()
  363. end)
Add Comment
Please, Sign In to add comment