Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[torch by lookingbloxed]--
- if game:GetService("RunService"):IsClient() then error("This aint it chief") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do print("Made by lookingBloxed")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Script1 = Instance.new("Script")
- Part2 = Instance.new("Part")
- Texture3 = Instance.new("Texture")
- Decal4 = Instance.new("Decal")
- Decal5 = Instance.new("Decal")
- Decal6 = Instance.new("Decal")
- Decal7 = Instance.new("Decal")
- Decal8 = Instance.new("Decal")
- Weld9 = Instance.new("Weld")
- Part10 = Instance.new("Part")
- SpotLight11 = Instance.new("SpotLight")
- Part12 = Instance.new("Part")
- SpotLight13 = Instance.new("SpotLight")
- Part14 = Instance.new("Part")
- SpotLight15 = Instance.new("SpotLight")
- Part16 = Instance.new("Part")
- SpotLight17 = Instance.new("SpotLight")
- Part18 = Instance.new("Part")
- Tool0.Name = "torch (minecraft) tool"
- Tool0.Parent = mas
- Tool0.Grip = CFrame.new(0, -0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Tool0.GripPos = Vector3.new(0, -0.5, 0)
- Script1.Name = "Weld"
- Script1.Parent = Tool0
- table.insert(cors,sandbox(Script1,function()
- local tool = script.Parent
- local MasterCFrameValues = {}
- local meta = {
- __call = function(tab,arg)
- for i = 1, #tab do
- if tab[i][1] == arg then
- return tab[i][2]
- end
- end
- return CFrame.new()
- end}
- setmetatable(MasterCFrameValues,meta)
- local ch = tool:GetChildren()
- for i = 1, #ch do
- if ch[i]:IsA("BasePart") then
- table.insert(MasterCFrameValues,{ch[i],ch[i].CFrame:inverse()})
- ch[i].Anchored = false
- if ch[i].Name ~= "Handle" then
- ch[i].CanCollide = false
- else
- ch[i].CanCollide = true
- end
- end
- end
- function weld()
- local han = tool:FindFirstChild("Handle")
- if not han then
- print("Handle went bye bye")
- return
- end
- local ch = han:GetChildren()
- for i = 1, #ch do
- if ch[i]:IsA("Weld") then
- ch[i]:remove()
- end
- end
- local ch = tool:GetChildren()
- for i = 1, #ch do
- if ch[i] ~= han and ch[i]:IsA("BasePart") then
- local w = Instance.new("Weld")
- w.Part0 = han
- w.Part1 = ch[i]
- w.C0 = MasterCFrameValues(han)
- w.C1 = MasterCFrameValues(ch[i])
- w.Parent = han
- end
- end
- end
- weld()
- tool.Equipped:connect(weld)
- end))
- Part2.Name = "Handle"
- Part2.Parent = Tool0
- Part2.CFrame = CFrame.new(5.49240112, 1.33501148, -70.6059875, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part2.Position = Vector3.new(5.49240112, 1.33501148, -70.6059875)
- Part2.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part2.Size = Vector3.new(0.600000024, 2.66999888, 0.600000024)
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.BrickColor = BrickColor.new("Bright yellow")
- Part2.Material = Enum.Material.Foil
- Part2.TopSurface = Enum.SurfaceType.Weld
- Part2.brickColor = BrickColor.new("Bright yellow")
- Part2.FormFactor = Enum.FormFactor.Custom
- Part2.formFactor = Enum.FormFactor.Custom
- Texture3.Parent = Part2
- Texture3.Texture = "http://www.roblox.com/asset/?id=15845700"
- Texture3.Transparency = 0.30000001192093
- Texture3.Face = Enum.NormalId.Bottom
- Texture3.StudsPerTileU = 4
- Texture3.StudsPerTileV = 4
- Decal4.Parent = Part2
- Decal4.Texture = "http://www.roblox.com/asset/?id=61211135"
- Decal4.Face = Enum.NormalId.Back
- Decal5.Parent = Part2
- Decal5.Texture = "http://www.roblox.com/asset/?id=61211135"
- Decal5.Face = Enum.NormalId.Left
- Decal6.Parent = Part2
- Decal6.Texture = "http://www.roblox.com/asset/?id=61211135"
- Decal6.Face = Enum.NormalId.Right
- Decal7.Parent = Part2
- Decal7.Texture = "http://www.roblox.com/asset/?id=61211168"
- Decal7.Face = Enum.NormalId.Top
- Decal8.Parent = Part2
- Decal8.Texture = "http://www.roblox.com/asset/?id=61211135"
- Weld9.Parent = Part2
- Weld9.C0 = CFrame.new(-256, 10, 256, -1, 0, 0, 0, 0, 1, 0, 1, 0)
- Weld9.C1 = CFrame.new(-277.985168, -1.33501148, 326.605988, -1, 0, 0, 0, 0, 1, 0, 1, 0)
- Weld9.Part0 = nil
- Weld9.Part1 = Part2
- Weld9.part1 = Part2
- Part10.Name = "Light"
- Part10.Parent = Tool0
- Part10.CFrame = CFrame.new(5.69241285, 1.50001395, -70.6059875, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Part10.Orientation = Vector3.new(0, -90, 0)
- Part10.Position = Vector3.new(5.69241285, 1.50001395, -70.6059875)
- Part10.Rotation = Vector3.new(0, -90, 0)
- Part10.Transparency = 1
- Part10.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part10.BottomSurface = Enum.SurfaceType.Weld
- Part10.TopSurface = Enum.SurfaceType.Smooth
- Part10.FormFactor = Enum.FormFactor.Custom
- Part10.formFactor = Enum.FormFactor.Custom
- SpotLight11.Parent = Part10
- SpotLight11.Brightness = 0.5
- SpotLight11.Angle = 180
- Part12.Name = "Light"
- Part12.Parent = Tool0
- Part12.CFrame = CFrame.new(5.29241896, 1.49000394, -70.6059875, 0, 0, 0.999999702, 0, 1, 0, -0.999999702, 0, 0)
- Part12.Orientation = Vector3.new(0, 90, 0)
- Part12.Position = Vector3.new(5.29241896, 1.49000394, -70.6059875)
- Part12.Rotation = Vector3.new(0, 89.9599991, 0)
- Part12.Transparency = 1
- Part12.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part12.BottomSurface = Enum.SurfaceType.Weld
- Part12.TopSurface = Enum.SurfaceType.Smooth
- Part12.FormFactor = Enum.FormFactor.Custom
- Part12.formFactor = Enum.FormFactor.Custom
- SpotLight13.Parent = Part12
- SpotLight13.Brightness = 0.5
- SpotLight13.Angle = 180
- Part14.Name = "Light"
- Part14.Parent = Tool0
- Part14.CFrame = CFrame.new(5.4924159, 1.49000394, -70.4059906, -0.999999404, 0, -1.1920929e-07, 1.4901155e-08, 0.999999762, 8.8817842e-16, 7.4505806e-08, 1.46936794e-39, -0.999999523)
- Part14.Orientation = Vector3.new(0, -180, 0)
- Part14.Position = Vector3.new(5.4924159, 1.49000394, -70.4059906)
- Part14.Rotation = Vector3.new(-180, 0, -180)
- Part14.Transparency = 1
- Part14.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part14.BottomSurface = Enum.SurfaceType.Weld
- Part14.TopSurface = Enum.SurfaceType.Smooth
- Part14.FormFactor = Enum.FormFactor.Custom
- Part14.formFactor = Enum.FormFactor.Custom
- SpotLight15.Parent = Part14
- SpotLight15.Brightness = 0.5
- SpotLight15.Angle = 180
- Part16.Name = "Light"
- Part16.Parent = Tool0
- Part16.CFrame = CFrame.new(5.4924159, 1.49000394, -70.8059845, 1, 0, -1.22101008e-31, 0, 1, 0, -1.22101008e-31, 0, 1)
- Part16.Position = Vector3.new(5.4924159, 1.49000394, -70.8059845)
- Part16.Transparency = 1
- Part16.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part16.BottomSurface = Enum.SurfaceType.Weld
- Part16.TopSurface = Enum.SurfaceType.Smooth
- Part16.FormFactor = Enum.FormFactor.Custom
- Part16.formFactor = Enum.FormFactor.Custom
- SpotLight17.Parent = Part16
- SpotLight17.Brightness = 0.5
- SpotLight17.Angle = 180
- Part18.Name = "Fire"
- Part18.Parent = Tool0
- Part18.CFrame = CFrame.new(5.4924159, 1.50001395, -70.6059875, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part18.Position = Vector3.new(5.4924159, 1.50001395, -70.6059875)
- Part18.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
- Part18.BottomSurface = Enum.SurfaceType.Weld
- Part18.TopSurface = Enum.SurfaceType.Smooth
- Part18.FormFactor = Enum.FormFactor.Custom
- Part18.formFactor = Enum.FormFactor.Custom
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement