SHOW:
|
|
- or go back to the newest paste.
1 | --void Script bbuilder fe script converter V2 | |
2 | ||
3 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
4 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
5 | local RealPlayer = Player | |
6 | do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end | |
7 | ||
8 | wait(0) | |
9 | local Parts = { | |
10 | game.Players.LocalPlayer.Character.Torso | |
11 | } | |
12 | local w = {} | |
13 | for i = 2, 24 do | |
14 | Parts[i] = Instance.new("Part", game.Players.LocalPlayer.Character) | |
15 | Parts[i].BrickColor = BrickColor.Black() | |
16 | Parts[i].Material = "Granite" | |
17 | Parts[i].CanCollide = false | |
18 | Parts[i].Locked = false | |
19 | Parts[i].formFactor = "Symmetric" | |
20 | Parts[i].Size = Vector3.new(1.5, 3, 3) | |
21 | function onTouched(part) | |
22 | local h = Parts[i].Parent:findFirstChild("Humanoid") | |
23 | if h ~= nil then | |
24 | h.Health = h.Health - 0 | |
25 | wait(0) | |
26 | end | |
27 | end | |
28 | Parts[i].Touched:connect(onTouched) | |
29 | Mesh = Instance.new("BlockMesh", Parts[i]) | |
30 | Mesh.Name = "Mesh" | |
31 | if i > 75 then | |
32 | mult = (i - 25) / 1 | |
33 | else | |
34 | mult = 0 | |
35 | end | |
36 | Mesh.Scale = Vector3.new(math.abs(0.5 - (i - 0) / 50) + 0 + mult, 0.3 - (i - 0.15) / 69, 0.6) | |
37 | w[i - 1] = Instance.new("Weld", Parts[i]) | |
38 | w[i - 1].Part0 = Parts[i - 1] | |
39 | w[i - 1].Part1 = Parts[i] | |
40 | w[i - 1].C0 = CFrame.new(0, 0, 0.75) | |
41 | w[i - 1].C1 = CFrame.new(0, 0, -0.75) | |
42 | end | |
43 | w[1].C0 = CFrame.new(0, -0.35, 0) | |
44 | function Smooth(WhereTo0, Welds) | |
45 | local CR0 = CFrame.new(Welds[1].C1:toEulerAnglesXYZ()).p | |
46 | local CR1 = CFrame.new(WhereTo0).p | |
47 | local AddTo0 = (CR1 - CR0) / 6.9 | |
48 | for a = 1, #Welds do | |
49 | Welds[a].C1 = Welds[a].C1 * CFrame.fromEulerAnglesXYZ(AddTo0.x, AddTo0.y, AddTo0.z) | |
50 | end | |
51 | end | |
52 | local scr = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui) | |
53 | local absx = scr.AbsoluteSize.X | |
54 | local absy = scr.AbsoluteSize.Y | |
55 | scr:Destroy() | |
56 | local mouse = game.Players.LocalPlayer:GetMouse() | |
57 | game:GetService("RunService").RenderStepped:connect(function() | |
58 | local r = CFrame.new(Vector3.new((mouse.Y - absy / 2) / absy, (mouse.X - absx / 2) / absx, 0.025)).p | |
59 | local y = r.y | |
60 | local x = r.x | |
61 | local z = r.z | |
62 | Smooth(Vector3.new(y, x, -z), w) | |
63 | end) | |
64 | wait(0) | |
65 | local Parts = { | |
66 | game.Players.LocalPlayer.Character.Torso | |
67 | } | |
68 | local w = {} | |
69 | for i = 2, 24 do | |
70 | Parts[i] = Instance.new("Part", game.Players.LocalPlayer.Character) | |
71 | Parts[i].BrickColor = BrickColor.Black() | |
72 | Parts[i].Material = "Granite" | |
73 | Parts[i].CanCollide = false | |
74 | Parts[i].Locked = false | |
75 | Parts[i].formFactor = "Symmetric" | |
76 | Parts[i].Size = Vector3.new(1.1, 0.9, 2.5) | |
77 | function onTouched(part) | |
78 | local h = Parts[i].Parent:findFirstChild("Humanoid") | |
79 | if h ~= nil then | |
80 | h.Health = h.Health - 0 | |
81 | wait(0) | |
82 | end | |
83 | end | |
84 | Parts[i].Touched:connect(onTouched) | |
85 | Mesh = Instance.new("BlockMesh", Parts[i]) | |
86 | Mesh.Name = "Mesh" | |
87 | if i > 75 then | |
88 | mult = (i - 25) / 1 | |
89 | else | |
90 | mult = 0 | |
91 | end | |
92 | Mesh.Scale = Vector3.new(math.abs(0.5 - (i - 0) / 50) + 0 + mult, 0.3 - (i - 0.15) / 99, 0.6) | |
93 | w[i - 1] = Instance.new("Weld", Parts[i]) | |
94 | w[i - 1].Part0 = Parts[i - 1] | |
95 | w[i - 1].Part1 = Parts[i] | |
96 | w[i - 1].C0 = CFrame.new(0, 0, 0.69) | |
97 | w[i - 1].C1 = CFrame.new(0, 0, -0.69) | |
98 | end | |
99 | w[1].C0 = CFrame.new(0, -0.35, 0) | |
100 | function Smooth(WhereTo0, Welds) | |
101 | local CR0 = CFrame.new(Welds[1].C1:toEulerAnglesXYZ()).p | |
102 | local CR1 = CFrame.new(WhereTo0).p | |
103 | local AddTo0 = (CR1 - CR0) / 6.9 | |
104 | for a = 1, #Welds do | |
105 | Welds[a].C1 = Welds[a].C1 * CFrame.fromEulerAnglesXYZ(AddTo0.x, AddTo0.y, AddTo0.z) | |
106 | end | |
107 | end | |
108 | local scr = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui) | |
109 | local absx = scr.AbsoluteSize.X | |
110 | local absy = scr.AbsoluteSize.Y | |
111 | scr:Destroy() | |
112 | local mouse = game.Players.LocalPlayer:GetMouse() | |
113 | game:GetService("RunService").RenderStepped:connect(function() | |
114 | local r = CFrame.new(Vector3.new((mouse.Y - absy / 2) / absy, (mouse.X - absx / 2) / absx, 0.025)).p | |
115 | local y = r.y | |
116 | local x = r.x | |
117 | local z = r.z | |
118 | Smooth(Vector3.new(y, x, -z), w) | |
119 | end) |