Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do print("FE Compatibility code V2 by Mokiros")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 --Made by LordRevorius the 420mememaster
- lmaohat = Instance.new("Accessory")
- lmaohat.Name = "Sheik"
- lmaohat.AttachmentForward = Vector3.new(0, 0.148, -0.989)
- lmaohat.AttachmentPos = Vector3.new(0, 0.35, 0.07)
- lmaohat.AttachmentRight = Vector3.new(1, 0, 0)
- lmaohat.AttachmentUp = Vector3.new(0, 0.989, 0.148)
- lmaohandle = Instance.new("Part")
- lmaohandle.Parent = lmaohat
- lmaohandle.Name = "Handle"
- lmaohandle.Size = Vector3.new(2, 1.2, 2)
- lmaoatta = Instance.new("Attachment")
- lmaoatta.Name = "HatAttachment"
- lmaoatta.Parent = lmaohandle
- lmaoatta.Axis = Vector3.new(1, -0, -0)
- lmaoatta.SecondaryAxis = Vector3.new(0, 0.989, 0.148)
- lmaoatta.Position = Vector3.new(0, 0.449, 0.085)
- lmaoatta.Rotation = Vector3.new(8.511, 0, -0)
- lmaomesh = Instance.new("SpecialMesh")
- lmaomesh.Parent = lmaohandle
- lmaomesh.MeshId = "http://www.roblox.com/asset/?id=12305010"
- lmaomesh.TextureId = "http://www.roblox.com/asset/?id=167764345"
- lmaomesh.Scale = Vector3.new(1, 1, 1)
- local Player = game:GetService("Players").LocalPlayer
- local Backpack = Player:WaitForChild("Backpack")
- local Character = Player.Character
- if not Character:FindFirstChild("Shirt") then
- NewShirt = Instance.new("Shirt", Character)
- NewShirt.Name = "Shirt"
- end
- if not Character:FindFirstChild("Pants") then
- NewPants = Instance.new("Pants", Character)
- NewPants.Name = "Pants"
- end
- for _, v in pairs(Character:GetChildren()) do
- if v:IsA("Accessory") then
- v:Destroy()
- end
- end
- for _, v in pairs(Character:GetChildren()) do
- if v:IsA("CharacterMesh") then
- v:Destroy()
- end
- end
- for _, v in pairs(Character:GetChildren()) do
- if v:IsA("ShirtGraphic") then
- v:Destroy()
- end
- end
- lmaohat.Parent = Character
- Character["Shirt"].ShirtTemplate = "http://www.roblox.com/asset/?id=590311692"
- Character["Pants"].PantsTemplate = "http://www.roblox.com/asset/?id=686633812"
- local Torso = Character:WaitForChild("Torso")
- local Left_Arm = Character:WaitForChild("Left Arm")
- local Right_Arm = Character:WaitForChild("Right Arm")
- local LeftShoulder = Torso:WaitForChild("Left Shoulder")
- local RightShoulder = Torso:WaitForChild("Right Shoulder")
- local RA_Weld = Instance.new("Weld")
- local LA_Weld = Instance.new("Weld")
- local Tool = Instance.new("Tool",Backpack)
- local Handle = Instance.new("Part", Tool)
- local Mesh = Instance.new("SpecialMesh", Handle)
- Mesh.Scale = Vector3.new(.9,.9,.9)
- Tool.Name = "I got a rock"
- Handle.Name = "Handle"
- Mesh.MeshType = "FileMesh"
- Mesh.MeshId = "http://www.roblox.com/asset/?id=1290033"
- Mesh.TextureId = "http://www.roblox.com/asset/?id=1290030"
- function AngleOfReach(distance, altitude, velocity)
- local theta = math.atan((velocity^2 + math.sqrt(velocity^4 -196.2*(196.2*distance^2 + 2*altitude*velocity^2)))/(196.2*distance))
- if theta ~= theta then
- theta = math.pi/4
- end
- return(theta)
- end
- local thr = false
- Tool.Equipped:connect(function(Mouse)
- RightShoulder.Parent = nil
- LeftShoulder.Parent = nil
- LA_Weld.Parent = Torso
- RA_Weld.Parent = Torso
- LA_Weld.Part0 = Torso
- LA_Weld.Part1 = Left_Arm
- RA_Weld.Part0 = Torso
- RA_Weld.Part1 = Right_Arm
- RA_Weld.C0 = CFrame.new(1.5, 0, 0)
- LA_Weld.C0 = CFrame.new(-1.5, 0, 0)
- local StartRA = RA_Weld.C0
- local StartLA = LA_Weld.C0
- for Index = .1, 1, .1 do
- RA_Weld.C0 = StartRA:lerp(CFrame.new(1, 1.25, 0) * CFrame.Angles(math.rad(220), 0, math.rad(-40)), Index)
- LA_Weld.C0 = StartLA:lerp(CFrame.new(-1, 1.25, 0) * CFrame.Angles(math.rad(220), 0, math.rad(40)), Index)
- wait()
- end
- StartRA = RA_Weld.C0
- StartLA = LA_Weld.C0
- Mouse.Button1Down:connect(function()
- if thr then return end
- thr = true
- for Index = .1, 1, .2 do
- RA_Weld.C0 = StartRA:lerp(CFrame.new(.75, 1.25, 0) * CFrame.Angles(math.rad(160), 0, math.rad(-40)), Index)
- LA_Weld.C0 = StartLA:lerp(CFrame.new(-.75, 1.25, 0) * CFrame.Angles(math.rad(160), 0, math.rad(40)), Index)
- wait()
- end
- Handle.Transparency = 1
- StartRA = RA_Weld.C0
- StartLA = LA_Weld.C0
- local Velocity = 100
- local mousePosition = Mouse.Hit
- local handlePos = Vector3.new(Tool.Handle.Position.X, 0, Tool.Handle.Position.Z) -- remove Y from the equation, it's not needed
- local mousePos = Vector3.new(mousePosition.X, 0, mousePosition.Z) -- ditto
- local distance = (handlePos - mousePos).magnitude -- Get the distance between the handle and the mouse
- local altitude = mousePosition.Y - Tool.Handle.Position.Y
- local angle = AngleOfReach(distance, altitude, Velocity) -- Calculate the angle
- local stone = Tool.Handle:Clone()
- stone.Parent = workspace
- stone.Transparency = 0
- stone.CanCollide = false
- stone.CFrame = Tool.Handle.CFrame
- stone.Velocity = (CFrame.new(stone.Position, Vector3.new(mousePosition.X, stone.Position.Y, mousePosition.Z)) * CFrame.Angles(angle, 0, 0)).lookVector * Velocity -- Throwing 'n stuff, it probably didn't need to be this long
- wait(.07)
- stone.CanCollide = true
- wait()
- local HitConnection
- local Hit = false
- HitConnection = stone.Touched:connect(function(Part)
- if Hit then return end
- if not Part:IsDescendantOf(Character) then
- Hit = true
- local HitCharacter
- if Part.Parent:IsA("Accessory") or Part.Parent:IsA("Tool") then
- HitCharacter = Part.Parent.Parent
- else
- HitCharacter = Part.Parent
- end
- local HitHumanoid = HitCharacter:FindFirstChild("Humanoid")
- if HitHumanoid then
- HitHumanoid:TakeDamage(35)
- hitmarker = Instance.new("Sound")
- hitmarker.Parent = HitCharacter.Head
- hitmarker.SoundId = "rbxassetid://131864673"
- hitmarker.Volume = 10
- hitmarker:Play()
- wait(1)
- hitmarker:Destroy()
- end
- HitConnection:disconnect()
- end
- end)
- for Index = .1, 1, .2 do
- RA_Weld.C0 = StartRA:lerp(CFrame.new(1, 1.25, 0) * CFrame.Angles(math.rad(220), 0, math.rad(-40)), Index)
- LA_Weld.C0 = StartLA:lerp(CFrame.new(-1, 1.25, 0) * CFrame.Angles(math.rad(220), 0, math.rad(40)), Index)
- wait()
- end
- StartRA = RA_Weld.C0
- StartLA = LA_Weld.C0
- wait(.5)
- thr = false
- Handle.Transparency = 0
- end)
- Mouse.Button2Down:connect(function()
- if thr then return end
- thr = true
- for Index = .1, 1, .2 do
- RA_Weld.C0 = StartRA:lerp(CFrame.new(.75, 1.25, -1.3) * CFrame.Angles(math.rad(110), 0, math.rad(-40)), Index)
- LA_Weld.C0 = StartLA:lerp(CFrame.new(-.75, 1.25, -1.3) * CFrame.Angles(math.rad(110), 0, math.rad(40)), Index)
- wait()
- end
- local stone = Handle:clone()
- stone.Parent = Handle
- local w = Instance.new("Weld",stone)
- w.Part0 = stone
- w.Part1 = Handle
- local Hit = false
- HitConnection = stone.Touched:connect(function(Part)
- if Hit then return end
- if not Part:IsDescendantOf(Character) then
- Hit = true
- local HitCharacter
- if Part.Parent:IsA("Accessory") or Part.Parent:IsA("Tool") then
- HitCharacter = Part.Parent.Parent
- else
- HitCharacter = Part.Parent
- end
- local HitHumanoid = HitCharacter:FindFirstChild("Humanoid")
- if HitHumanoid then
- HitHumanoid:TakeDamage(35)
- hitmarker = Instance.new("Sound")
- hitmarker.Parent = HitCharacter.Head
- hitmarker.SoundId = "rbxassetid://131864673"
- hitmarker.Volume = 10
- hitmarker:Play()
- wait(1)
- hitmarker:Destroy()
- end
- end
- end)
- StartRA = RA_Weld.C0
- StartLA = LA_Weld.C0
- wait()
- stone:Destroy()
- HitConnection:disconnect()
- for Index = .1, 1, .2 do
- RA_Weld.C0 = StartRA:lerp(CFrame.new(1, 1.25, 0) * CFrame.Angles(math.rad(220), 0, math.rad(-40)), Index)
- LA_Weld.C0 = StartLA:lerp(CFrame.new(-1, 1.25, 0) * CFrame.Angles(math.rad(220), 0, math.rad(40)), Index)
- wait()
- end
- StartRA = RA_Weld.C0
- StartLA = LA_Weld.C0
- wait(.5)
- thr = false
- end)
- end)
- Tool.Unequipped:connect(function(Mouse)
- LA_Weld.Parent = nil
- RA_Weld.Parent = nil
- RightShoulder.Parent = Torso
- LeftShoulder.Parent = Torso
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement