View difference between Paste ID: ZNgjLdqS and UkHTyVVW
SHOW: | | - or go back to the newest paste.
1
Maxhealth = "inf"
2
Player = game.Players.LocalPlayer
3
	Character = Player.Character
4
	local txt = Instance.new("BillboardGui", Character)
5
	txt.Adornee = Character.Head
6
	txt.Name = "_status"
7
	txt.Size = UDim2.new(2, 0, 1.2, 0)
8
	txt.StudsOffset = Vector3.new(-9, 8, 0)
9
	local text = Instance.new("TextLabel", txt)
10
	text.Size = UDim2.new(10, 0, 7, 0)
11
	text.FontSize = "Size24"
12
	text.TextScaled = true
13
	text.TextTransparency = 0
14
	text.BackgroundTransparency = 1 
15
	text.TextTransparency = 0
16
	text.TextStrokeTransparency = 0
17
	text.Font = "Fantasy"
18
	text.TextStrokeColor3 = Color3.new(50,50,50)
19
        text.Text = "Stone arc"
20
21
----- Script made by Pedrorb03 -----
22
laser = nil
23
laserRot = 0
24
pos2 = Vector3.new(0,0,0)
25
counter = 0
26
function chargeLaser()
27
	local part = Instance.new("Part")  
28
	part.Name = "ChargingLaser"
29
	game:GetService("Debris"):AddItem(part,1) 
30
	part.Parent = game.Players.LocalPlayer.Character
31
	part.BackSurface = Enum.SurfaceType.SmoothNoOutlines
32
	part.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
33
	part.TopSurface = Enum.SurfaceType.SmoothNoOutlines
34
	part.BottomSurface = Enum.SurfaceType.SmoothNoOutlines	
35
	part.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
36
	part.RightSurface = Enum.SurfaceType.SmoothNoOutlines
37
    part.Material = Enum.Material.Neon
38
    part.Anchored = true
39
    part.CanCollide = false
40
    part.Size = Vector3.new(0.5,0.5,0.5)
41
    local light = math.random(50,150)
42
    local rotx = math.random(-360,360)
43
local roty = math.random(-360,360)
44
local rotz = math.random(-360,360)
45
    part.Color = Color3.fromRGB(light,light,light)
46
part.Transparency = 0.4
47
part.CFrame = game.Players.LocalPlayer.Character["Right Arm"].CFrame:toWorldSpace(CFrame.new(Vector3.new(0,-1.1,0))) *CFrame.Angles(math.rad(rotx),math.rad(roty),math.rad(rotz))
48
    for i=0.4,1,0.1 do
49
	wait()
50
	part.Size = Vector3.new(0.5+i,0.5+i,0.5+i)
51
	part.Transparency = i
52
part.CFrame = game.Players.LocalPlayer.Character["Right Arm"].CFrame:toWorldSpace(CFrame.new(Vector3.new(0,-1.1,0))) *CFrame.Angles(math.rad(rotx),math.rad(roty),math.rad(rotz))
53
end
54
part:remove()
55
end
56
function chargeLaser2()
57
	local part = Instance.new("Part") 
58
	game:GetService("Debris"):AddItem(part,1) 
59
	part.Name = "ChargingLaser2"
60
	part.Parent = game.Players.LocalPlayer.Character
61
	part.BackSurface = Enum.SurfaceType.SmoothNoOutlines
62
	part.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
63
	part.TopSurface = Enum.SurfaceType.SmoothNoOutlines
64
	part.BottomSurface = Enum.SurfaceType.SmoothNoOutlines	
65
	part.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
66
	part.RightSurface = Enum.SurfaceType.SmoothNoOutlines
67
    part.Material = Enum.Material.Neon
68
    part.Anchored = true
69
    part.CanCollide = false
70
    part.Size = Vector3.new(2,2,2)
71
    local light = math.random(50,150)
72
    local rotx = math.random(-360,360)
73
local roty = math.random(-360,360)
74
local rotz = math.random(-360,360)
75
    part.Color = Color3.fromRGB(light,light,light)
76
part.Transparency = 0.4
77
part.CFrame = CFrame.new(pos2) *CFrame.Angles(math.rad(rotx),math.rad(roty),math.rad(rotz))
78
    for i=0.4,1,0.1 do
79
	wait()
80
	part.Size = Vector3.new(2+i,2+i,2+i)
81
	part.Transparency = i
82
part.CFrame = CFrame.new(pos2) *CFrame.Angles(math.rad(rotx),math.rad(roty),math.rad(rotz))
83
end
84
part:remove()
85
end
86
87
88
89
90
game:GetService("RunService").RenderStepped:connect(function()
91
	counter = counter +1
92
	if counter >= 3 then
93
		counter = 0
94
		chargeLaser()
95
		if laser ~= nil then
96
			chargeLaser2(pos2)
97
		end
98
	end
99
100
	laserRot = laserRot+1
101
	if laser ~= nil then
102
		local pos1 = game.Players.LocalPlayer.Character.ChargingLaser.Position
103
		pos2 = game.Players.LocalPlayer:GetMouse().Hit.p
104
		
105
		laser.Size = Vector3.new(0.75,0.75,(pos1-pos2).magnitude)
106
		laser.CFrame = CFrame.new((pos1+pos2)/2,pos1)*CFrame.Angles(0,0,math.rad(laserRot))
107
		
108
		local ray = Ray.new(pos1,(pos2-pos1).unit*600)
109
        local hit,position,normal = game.Workspace:FindPartOnRay(ray,game.Players.LocalPlayer.Character)
110
		if hit then
111
		
112
			
113
			hit.Name = "nil"
114
			hit.Material = Enum.Material.Concrete
115
116
			local c= hit.Color.r+hit.Color.g+hit.Color.b
117
			
118
			c = c*255
119
		c = c/3
120
			hit.Color = Color3.fromRGB(c,c,c)
121
			
122
		
123
			for _,child in pairs(hit:GetChildren()) do
124
				if child:IsA("BasePart") then
125
					
126
			
127
					child.Name = "nil"
128
			child.Material = Enum.Material.Concrete
129
				local c= child.Color.r+child.Color.g+child.Color.b
130
		
131
			c = c*255
132
			c = c/3
133
			child.Color = Color3.fromRGB(c,c,c)
134
		
135
				end
136
				if not child:IsA("BasePart") then
137
					child:remove()
138
				end
139
			end
140
		end
141
	end
142
end)
143
game:GetService("UserInputService").InputBegan:connect(function(key)
144
	if key.KeyCode == Enum.KeyCode.F then
145
	game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0*CFrame.Angles(0,0,math.rad(90))
146
	laser = Instance.new("Part")  
147
	laser.Name = "Laser"
148
	laser.Transparency = 0.25
149
	laser.Parent = game.Players.LocalPlayer.Character
150
	laser.BackSurface = Enum.SurfaceType.SmoothNoOutlines
151
	laser.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
152
	laser.TopSurface = Enum.SurfaceType.SmoothNoOutlines
153
	laser.BottomSurface = Enum.SurfaceType.SmoothNoOutlines	
154
	laser.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
155
	laser.RightSurface = Enum.SurfaceType.SmoothNoOutlines
156
    laser.Material = Enum.Material.Neon
157
    laser.Anchored = true
158
    laser.CanCollide = false
159
    laser.Size = Vector3.new(0.75,0.75,0.75)
160
    laser.Color = Color3.fromRGB(100,100,100)
161
162
	end
163
end)
164
game:GetService("UserInputService").InputEnded:connect(function(key)
165
	if key.KeyCode == Enum.KeyCode.F then
166
	game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0 = game.Players.LocalPlayer.Character.Torso["Right Shoulder"].C0*CFrame.Angles(0,0,math.rad(-90))
167
	laser:remove()
168
	laser = nil
169
	end
170
end)